fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [2/5] incubator-fluo git commit: #683 - Stopped creating Oracle & Worker using FluoFactory so Twill can find dependencies
Date Fri, 01 Jul 2016 03:14:04 GMT
#683 - Stopped creating Oracle & Worker using FluoFactory so Twill can find dependencies


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

Branch: refs/heads/master
Commit: 7547863cdd6e531c28ee009d9bdcad529b034780
Parents: 28b9f2f
Author: Mike Walch <mwalch@gmail.com>
Authored: Tue Jun 28 16:47:47 2016 -0400
Committer: Mike Walch <mwalch@gmail.com>
Committed: Tue Jun 28 16:54:20 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/fluo/cluster/runnable/OracleRunnable.java   | 5 ++++-
 .../java/org/apache/fluo/cluster/runnable/WorkerRunnable.java   | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/7547863c/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/OracleRunnable.java
----------------------------------------------------------------------
diff --git a/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/OracleRunnable.java
b/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/OracleRunnable.java
index e4f2cea..5080037 100644
--- a/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/OracleRunnable.java
+++ b/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/OracleRunnable.java
@@ -24,6 +24,7 @@ import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.service.FluoOracle;
 import org.apache.fluo.cluster.util.LogbackUtil;
 import org.apache.fluo.core.metrics.MetricNames;
+import org.apache.fluo.core.oracle.FluoOracleImpl;
 import org.apache.fluo.core.util.UtilWaitThread;
 import org.apache.twill.api.AbstractTwillRunnable;
 import org.apache.twill.api.TwillContext;
@@ -76,7 +77,9 @@ public class OracleRunnable extends AbstractTwillRunnable {
         System.setProperty(MetricNames.METRICS_ID_PROP, "oracle-" + context.getInstanceId());
       }
 
-      FluoOracle oracle = FluoFactory.newOracle(config);
+      // FluoFactory cannot be used to create FluoOracle as Twill will not load its dependencies
+      // if it is loaded dynamically
+      FluoOracle oracle = new FluoOracleImpl(config);
       oracle.start();
       while (!shutdown.get()) {
         UtilWaitThread.sleep(10000);

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/7547863c/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/WorkerRunnable.java
----------------------------------------------------------------------
diff --git a/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/WorkerRunnable.java
b/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/WorkerRunnable.java
index f7fdbb9..9b7e6b7 100644
--- a/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/WorkerRunnable.java
+++ b/modules/cluster/src/main/java/org/apache/fluo/cluster/runnable/WorkerRunnable.java
@@ -25,6 +25,7 @@ import org.apache.fluo.api.service.FluoWorker;
 import org.apache.fluo.cluster.util.LogbackUtil;
 import org.apache.fluo.core.metrics.MetricNames;
 import org.apache.fluo.core.util.UtilWaitThread;
+import org.apache.fluo.core.worker.FluoWorkerImpl;
 import org.apache.twill.api.AbstractTwillRunnable;
 import org.apache.twill.api.TwillContext;
 import org.slf4j.Logger;
@@ -90,7 +91,9 @@ public class WorkerRunnable extends AbstractTwillRunnable {
         System.setProperty(MetricNames.METRICS_ID_PROP, "worker-" + context.getInstanceId());
       }
 
-      FluoWorker worker = FluoFactory.newWorker(config);
+      // FluoFactory cannot be used to create FluoWorker as Twill will not load its dependencies
+      // if it is loaded dynamically
+      FluoWorker worker = new FluoWorkerImpl(config);
       worker.start();
       while (!shutdown.get()) {
         UtilWaitThread.sleep(1000);


Mime
View raw message