hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [1/4] git commit: HBASE-11822 Convert EnvironmentEdge#getCurrentTimeMillis to getCurrentTime
Date Sat, 30 Aug 2014 00:14:38 GMT
Repository: hbase
Updated Branches:
  refs/heads/master cdfc96f29 -> 651b6bab4


HBASE-11822 Convert EnvironmentEdge#getCurrentTimeMillis to getCurrentTime


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/651b6bab
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/651b6bab
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/651b6bab

Branch: refs/heads/master
Commit: 651b6bab495c4822e676b2da2109112940e49250
Parents: 3bfbd06
Author: stack <stack@apache.org>
Authored: Fri Aug 29 17:14:17 2014 -0700
Committer: stack <stack@apache.org>
Committed: Fri Aug 29 17:14:25 2014 -0700

----------------------------------------------------------------------
 .../hbase/coordination/ZKSplitLogManagerCoordination.java | 10 +++++-----
 .../hbase/coordination/ZkSplitLogWorkerCoordination.java  |  2 +-
 .../java/org/apache/hadoop/hbase/regionserver/HStore.java |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/651b6bab/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
index 243a37b..b7974f7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
@@ -203,7 +203,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
       // 2) after a configurable timeout if the server is not marked as dead but has still
not
       // finished the task. This allows to continue if the worker cannot actually handle
it,
       // for any reason.
-      final long time = EnvironmentEdgeManager.currentTimeMillis() - task.last_update;
+      final long time = EnvironmentEdgeManager.currentTime() - task.last_update;
       final boolean alive =
           details.getMaster().getServerManager() != null ? details.getMaster().getServerManager()
               .isServerOnline(task.cur_worker_name) : true;
@@ -233,7 +233,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     task.incarnation++;
     boolean result = resubmit(this.details.getServerName(), path, version);
     if (!result) {
-      task.heartbeatNoDetails(EnvironmentEdgeManager.currentTimeMillis());
+      task.heartbeatNoDetails(EnvironmentEdgeManager.currentTime());
       return false;
     }
     // don't count forced resubmits
@@ -551,7 +551,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
       if (task.isUnassigned()) {
         LOG.info("task " + path + " acquired by " + workerName);
       }
-      task.heartbeat(EnvironmentEdgeManager.currentTimeMillis(), new_version, workerName);
+      task.heartbeat(EnvironmentEdgeManager.currentTime(), new_version, workerName);
       SplitLogCounters.tot_mgr_heartbeat.incrementAndGet();
     } else {
       // duplicate heartbeats - heartbeats w/o zk node version
@@ -599,7 +599,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
   @Override
   public void markRegionsRecovering(final ServerName serverName, Set<HRegionInfo> userRegions)
       throws IOException, InterruptedIOException {
-    this.lastRecoveringNodeCreationTime = EnvironmentEdgeManager.currentTimeMillis();
+    this.lastRecoveringNodeCreationTime = EnvironmentEdgeManager.currentTime();
     for (HRegionInfo region : userRegions) {
       String regionEncodeName = region.getEncodedName();
       long retries = this.zkretries;
@@ -665,7 +665,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     task = details.getTasks().get(path);
     if (task != null || ZKSplitLog.isRescanNode(watcher, path)) {
       if (task != null) {
-        task.heartbeatNoDetails(EnvironmentEdgeManager.currentTimeMillis());
+        task.heartbeatNoDetails(EnvironmentEdgeManager.currentTime());
       }
       getDataSetWatch(path, zkretries);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/651b6bab/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
index 3989211..ee37259 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
@@ -298,7 +298,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
 
       @Override
       public boolean progress() {
-        long t = EnvironmentEdgeManager.currentTimeMillis();
+        long t = EnvironmentEdgeManager.currentTime();
         if ((t - last_report_at) > reportPeriod) {
           last_report_at = t;
           int latestZKVersion =

http://git-wip-us.apache.org/repos/asf/hbase/blob/651b6bab/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index d746fa6..cbda424 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -707,7 +707,7 @@ public class HStore implements Store {
       }
 
       if (verifyBulkLoads) {
-        long verificationStartTime = EnvironmentEdgeManager.currentTimeMillis();
+        long verificationStartTime = EnvironmentEdgeManager.currentTime();
         LOG.info("Full verification started for bulk load hfile: " + srcPath.toString());
         Cell prevKV = null;
         HFileScanner scanner = reader.getScanner(false, false, false);
@@ -735,7 +735,7 @@ public class HStore implements Store {
           prevKV = kv;
         } while (scanner.next());
       LOG.info("Full verification complete for bulk load hfile: " + srcPath.toString()
-         + " took " + (EnvironmentEdgeManager.currentTimeMillis() - verificationStartTime)
+         + " took " + (EnvironmentEdgeManager.currentTime() - verificationStartTime)
          + " ms");
       }
     } finally {


Mime
View raw message