Repository: incubator-reef
Updated Branches:
  refs/heads/branch-0.12.0-incubating 10622da32 -> 13a238d1b


[REEF-570] VortexTestSuite fails on Mesos

This addressed the issue by
  * In Vortex, directly create EStage without relying on Tang to avoid 
duplicate configurations.

JIRA:
  [REEF-570](https://issues.apache.org/jira/browse/REEF-570)

Pull Request:
  This closes #350


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

Branch: refs/heads/branch-0.12.0-incubating
Commit: 13a238d1ba4f1ddca06634773090be79dda0f985
Parents: 10622da
Author: John Yang <[email protected]>
Authored: Fri Aug 7 14:56:20 2015 +0800
Committer: Brian Cho <[email protected]>
Committed: Fri Aug 7 18:14:44 2015 +0900

----------------------------------------------------------------------
 .../org/apache/reef/vortex/driver/VortexDriver.java   |  8 +++++---
 .../apache/reef/vortex/driver/VortexMasterConf.java   | 14 ++++++++------
 2 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13a238d1/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexDriver.java
----------------------------------------------------------------------
diff --git 
a/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexDriver.java
 
b/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexDriver.java
index 4dedb1d..ef3061b 100644
--- 
a/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexDriver.java
+++ 
b/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexDriver.java
@@ -36,6 +36,7 @@ import org.apache.reef.vortex.evaluator.VortexWorker;
 import org.apache.reef.wake.EStage;
 import org.apache.reef.wake.EventHandler;
 import org.apache.reef.wake.impl.SingleThreadStage;
+import org.apache.reef.wake.impl.ThreadPoolStage;
 import org.apache.reef.wake.time.event.StartTime;
 
 import javax.inject.Inject;
@@ -71,13 +72,14 @@ final class VortexDriver {
   private VortexDriver(final EvaluatorRequestor evaluatorRequestor,
                        final VortexRequestor vortexRequestor,
                        final VortexMaster vortexMaster,
-                       final EStage<VortexStart> vortexStartEStage,
                        final VortexStart vortexStart,
+                       final VortexStartExecutor vortexStartExecutor,
                        final PendingTaskletScheduler pendingTaskletScheduler,
                        @Parameter(VortexMasterConf.WorkerMem.class) final int 
workerMem,
                        @Parameter(VortexMasterConf.WorkerNum.class) final int 
workerNum,
-                       @Parameter(VortexMasterConf.WorkerCores.class) final 
int workerCores) {
-    this.vortexStartEStage = vortexStartEStage;
+                       @Parameter(VortexMasterConf.WorkerCores.class) final 
int workerCores,
+                       
@Parameter(VortexMasterConf.NumberOfVortexStartThreads.class) final int 
numOfStartThreads) {
+    this.vortexStartEStage = new ThreadPoolStage<>(vortexStartExecutor, 
numOfStartThreads);
     this.vortexStart = vortexStart;
     this.pendingTaskletSchedulerEStage = new 
SingleThreadStage<>(pendingTaskletScheduler, 1);
     this.evaluatorRequestor = evaluatorRequestor;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13a238d1/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexMasterConf.java
----------------------------------------------------------------------
diff --git 
a/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexMasterConf.java
 
b/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexMasterConf.java
index 41b7ab2..358dcb7 100644
--- 
a/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexMasterConf.java
+++ 
b/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/driver/VortexMasterConf.java
@@ -27,9 +27,6 @@ import 
org.apache.reef.tang.formats.ConfigurationModuleBuilder;
 import org.apache.reef.tang.formats.RequiredImpl;
 import org.apache.reef.tang.formats.RequiredParameter;
 import org.apache.reef.vortex.api.VortexStart;
-import org.apache.reef.wake.EStage;
-import org.apache.reef.wake.StageConfiguration;
-import org.apache.reef.wake.impl.ThreadPoolStage;
 
 /**
  * Vortex Master configuration.
@@ -59,6 +56,13 @@ public final class VortexMasterConf extends 
ConfigurationModuleBuilder {
   }
 
   /**
+   * Number of Vortex Start Threads.
+   */
+  @NamedParameter(doc = "Number of Vortex Start Threads")
+  final class NumberOfVortexStartThreads implements Name<Integer> {
+  }
+
+  /**
    * Number of Workers.
    */
   public static final RequiredParameter<Integer> WORKER_NUM = new 
RequiredParameter<>();
@@ -91,8 +95,6 @@ public final class VortexMasterConf extends 
ConfigurationModuleBuilder {
       .bindNamedParameter(WorkerMem.class, WORKER_MEM)
       .bindNamedParameter(WorkerCores.class, WORKER_CORES)
       .bindImplementation(VortexStart.class, VORTEX_START)
-      .bindNamedParameter(StageConfiguration.NumberOfThreads.class, 
NUM_OF_VORTEX_START_THERAD)
-      .bindNamedParameter(StageConfiguration.StageHandler.class, 
VortexStartExecutor.class)
-      .bindImplementation(EStage.class, ThreadPoolStage.class)
+      .bindNamedParameter(NumberOfVortexStartThreads.class, 
NUM_OF_VORTEX_START_THERAD)
       .build();
 }

Reply via email to