fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject incubator-fluo git commit: fixes #662 Make oracle log time+timestamp periodically
Date Tue, 28 Jun 2016 17:32:50 GMT
Repository: incubator-fluo
Updated Branches:
  refs/heads/master 6fd86298c -> fee0ca74d


fixes #662 Make oracle log time+timestamp periodically


Project: http://git-wip-us.apache.org/repos/asf/incubator-fluo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fluo/commit/fee0ca74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fluo/tree/fee0ca74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fluo/diff/fee0ca74

Branch: refs/heads/master
Commit: fee0ca74d04aad8d0dc599817ac5deca19f92c44
Parents: 6fd8629
Author: garvit244 <garvitbansal244@gmail.com>
Authored: Tue Jun 28 19:57:00 2016 +0530
Committer: garvit244 <garvitbansal244@gmail.com>
Committed: Tue Jun 28 21:30:03 2016 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/fluo/core/oracle/OracleServer.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/fee0ca74/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleServer.java b/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleServer.java
index b83fd1c..2cb0bb1 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleServer.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleServer.java
@@ -161,11 +161,20 @@ public class OracleServer extends LeaderSelectorListenerAdapter implements
Oracl
           }
         }
       };
+      TimerTask logTask = new TimerTask() {
+        @Override
+        public void run() {
+          log.info("Current timestamp: {}", currentTs);
+        }
+      };
+
       timer = new Timer("Oracle gc update timer", true);
       long updatePeriod =
           env.getConfiguration().getLong(FluoConfigurationImpl.ZK_UPDATE_PERIOD_PROP,
               FluoConfigurationImpl.ZK_UPDATE_PERIOD_MS_DEFAULT);
+      long nextPeriod = 5 * 60 * 1000L;
       timer.schedule(tt, updatePeriod, updatePeriod);
+      timer.schedule(logTask, 0L, nextPeriod);
     }
 
     void stop() {


Mime
View raw message