public void updateTableLevelMetrics(List<Pair<Entry, Long>> walEntries) {
    for (Pair<Entry, Long> walEntryWithSize : walEntries) {
      Entry entry = walEntryWithSize.getFirst();
      long entrySize = walEntryWithSize.getSecond();
      String tableName = entry.getKey().getTableName().getNameAsString();
      long writeTime = entry.getKey().getWriteTime();
      long age = EnvironmentEdgeManager.currentTime() - writeTime;

      // get the replication metrics source for table at the run time
      MetricsReplicationTableSource tableSource = this.getSingleSourceSourceByTable()
        .computeIfAbsent(tableName, t -> CompatibilitySingletonFactory
          .getInstance(MetricsReplicationSourceFactory.class).getTableSource(t));
      tableSource.setLastShippedAge(age);
      tableSource.incrShippedBytes(entrySize);
    }
  }
Update the table level replication metrics per table
@param walEntries List of pairs of WAL entry and it's size
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java