[ 
https://issues.apache.org/jira/browse/HBASE-20695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512121#comment-16512121
 ] 

Guanghao Zhang commented on HBASE-20695:
----------------------------------------

Take a look about the patch again. The follow code may be better.
{code:java}
    long age = EnvironmentEdgeManager.currentTime() - timestamp;
this.getSingleSourceSourceByTable().computeIfAbsent(
        tableName, t -> CompatibilitySingletonFactory
            
.getInstance(MetricsReplicationSourceFactory.class).getSource(t)).setLastShippedAge(age);
{code}

Assert.assertNotEquals(0L, msr.getLastShippedAge())  can be removed.

Thanks.

> Implement table level RegionServer replication metrics 
> -------------------------------------------------------
>
>                 Key: HBASE-20695
>                 URL: https://issues.apache.org/jira/browse/HBASE-20695
>             Project: HBase
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Xu Cang
>            Assignee: Xu Cang
>            Priority: Minor
>         Attachments: HBASE-20695.master.001.patch, 
> HBASE-20695.master.002.patch, HBASE-20695.master.003.patch, 
> HBASE-20695.master.004.patch, HBASE-20695.master.005.patch, 
> HBASE-20695.master.006.patch, HBASE-20695.master.007.patch, 
> HBASE-20695.master.008.patch, HBASE-20695.master.009.patch
>
>
> Region server metrics now are mainly global metrics. It would be nice to have 
> table level metrics such as table level source.AgeOfLastShippedOp to indicate 
> operators which table's replication is lagging behind.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to