You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/09/25 18:10:26 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #2460: HBASE-25098 ReplicationStatisticsChore runs in wrong time unit

virajjasani commented on a change in pull request #2460:
URL: https://github.com/apache/hbase/pull/2460#discussion_r495152290



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationSinkServiceImpl.java
##########
@@ -75,7 +75,8 @@ public void initialize(Server server, FileSystem fs, Path logdir, Path oldLogDir
   public void startReplicationService() throws IOException {
     this.replicationSink = new ReplicationSink(this.conf);
     this.server.getChoreService().scheduleChore(
-      new ReplicationStatisticsChore("ReplicationSinkStatistics", server, statsPeriod));
+        new ReplicationStatisticsChore("ReplicationSinkStatistics", server,
+            1000 * statsPeriodInSecond));

Review comment:
       You can use `TimeUnit.SECONDS.toMillis(statsPeriodInSecond)`

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java
##########
@@ -169,7 +169,8 @@ public void stopReplicationService() {
   public void startReplicationService() throws IOException {
     this.replicationManager.init();
     this.server.getChoreService().scheduleChore(
-      new ReplicationStatisticsChore("ReplicationSourceStatistics", server, statsPeriod));
+      new ReplicationStatisticsChore("ReplicationSourceStatistics", server,
+          1000 * statsPeriodInSecond));

Review comment:
       same here




----------------------------------------------------------------
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:
users@infra.apache.org