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

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

bq. this.getSingleSourceSourceByTable().computeIfAbsent(tableName, k -> 
this.getSingleSourceSourceByTable(k));
this.getSingleSourceSourceByTable().computeIfAbsent(tableName, t -> 
CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class).getSource(t));

bq. public Map<String, MetricsReplicationSourceSource> 
getSingleSourceSourceByTable()
No use for this? If not, just remove it.

bq. public MetricsReplicationSourceSource getSingleSourceSourceByTable(String 
tableName)
@VisableForTest. And get from map directly.

bq. LOG.trace(String.format("Replicated %d entries or %d operations in %d ms", 
entries.size(), entryBatch.getNbOperations(),(endTimeNs - startTimeNs) / 
1000000));
LOG.trace(""Replicated {} entries or {} operations in {} ms", entries.size(), 
entryBatch.getNbOperations(),(endTimeNs - startTimeNs) / 1000000);

Please use TableName as parameter instead of string. And I don't follow the 
ut...... Add more ut for this?


> 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
>
>
> 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