joshelser commented on a change in pull request #2193:
URL: https://github.com/apache/hbase/pull/2193#discussion_r465103092
##########
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:
The rest of the global metrics are tied to some regular "workflow" of
replication, e.g. when a new file is queued.
We could piggy-back onto one of those, but I wasn't sure what would be an
"appropriate" time in which to report this, so I thought a regular period would
be better. Open to suggestions.
----------------------------------------------------------------
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]