joshelser commented on a change in pull request #2193:
URL: https://github.com/apache/hbase/pull/2193#discussion_r465154338



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
##########
@@ -244,17 +248,22 @@ void addHFileRefsToQueue(TableName tableName, byte[] 
family, List<Pair<Path, Pat
 
     private final ReplicationSink replicationSink;
     private final ReplicationSourceManager replicationManager;
+    private final MetricsReplicationSourceSource globalMetricsSource;
 
     public ReplicationStatisticsTask(ReplicationSink replicationSink,
-        ReplicationSourceManager replicationManager) {
+        ReplicationSourceManager replicationManager, 
MetricsReplicationSourceSource globalMetricsSource) {
       this.replicationManager = replicationManager;
       this.replicationSink = replicationSink;
+      this.globalMetricsSource = globalMetricsSource;
     }
 
     @Override
     public void run() {
       printStats(this.replicationManager.getStats());
       printStats(this.replicationSink.getStats());
+
+      // Report how much data we've read off disk which is pending 
replication, across all sources
+      
globalMetricsSource.setWALReaderEditsBufferBytes(replicationManager.getTotalBufferUsed().get());

Review comment:
       Pushed this down into each source and it's not too bad.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to