HBASE-15052 Use EnvironmentEdgeManager in ReplicationSource

This commit is contained in:
Matteo Bertozzi 2016-01-11 09:37:08 -08:00
parent 894ce84b83
commit ec47a811a2
1 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,7 @@ import org.apache.hadoop.hbase.replication.ReplicationQueues;
import org.apache.hadoop.hbase.replication.SystemTableWALEntryFilter;
import org.apache.hadoop.hbase.replication.WALEntryFilter;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.hadoop.hbase.util.FSUtils;
import org.apache.hadoop.hbase.util.Threads;
import org.apache.hadoop.hbase.wal.DefaultWALProvider;
@ -640,7 +641,7 @@ public class ReplicationSource extends Thread
sleepMultiplier = 1;
// if there was nothing to ship and it's not an error
// set "ageOfLastShippedOp" to <now> to indicate that we're current
metrics.setAgeOfLastShippedOp(System.currentTimeMillis(), walGroupId);
metrics.setAgeOfLastShippedOp(EnvironmentEdgeManager.currentTime(), walGroupId);
}
if (sleepForRetries("Nothing to replicate", sleepMultiplier)) {
sleepMultiplier++;