terrytlu commented on code in PR #6260:
URL: https://github.com/apache/hbase/pull/6260#discussion_r2060149892
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java:
##########
@@ -649,6 +655,40 @@ public void
logPositionAndCleanOldLogs(ReplicationSourceInterface source,
cleanOldLogs(walName, entryBatch.isEndOfFile(), source);
}
+ public void postAppend(final long size, final long time, final WALKey logkey,
+ final WALEdit logEdit) {
+ try {
+ long walReplAppendSize = 0;
+ List<ReplicationSourceInterface> replicationSources = getSources();
+ for (ReplicationSourceInterface replicationSourceI : replicationSources)
{
+ if (replicationSourceI instanceof ReplicationSource) {
+ MetricsSource source = replicationSourceI.getSourceMetrics();
+ ReplicationSource replicationSource = (ReplicationSource)
replicationSourceI;
+ WALEntryFilter filter = replicationSource.getWalEntryFilter();
+ WAL.Entry filtered = filter.filter(new WAL.Entry((WALKeyImpl)
logkey, logEdit));
+ if (filtered != null && filtered.getEdit() != null &&
!filtered.getEdit().isEmpty()) {
+ walReplAppendSize =
ReplicationSourceWALReader.getEntrySizeIncludeBulkLoad(filtered);
+ // get the replication metrics source for table at the run time
+ TableName tableName = logkey.getTableName();
+ MetricsReplicationTableSource tableSource =
+ source.getSingleSourceSourceByTable().computeIfAbsent(
Review Comment:
sorry for the late reply, fixed this.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]