wynot12 commented on a change in pull request #73: [Nemo-62] Support Multiple 
Jobs Submission in a Single User Program
URL: https://github.com/apache/incubator-nemo/pull/73#discussion_r201415610
 
 

 ##########
 File path: runtime/driver/src/main/java/edu/snu/nemo/driver/NemoDriver.java
 ##########
 @@ -154,9 +161,14 @@ public void onNext(final ActiveContext activeContext) {
    */
   public void startSchedulingUserApplication(final String dagString) {
     // Launch user application (with a new thread)
-    final ExecutorService userApplicationRunnerThread = 
Executors.newSingleThreadExecutor();
+    if (userApplicationRunnerThread == null) {
+      userApplicationRunnerThread = Executors.newSingleThreadExecutor();
+    }
+    // This should be able to run multiple times.
     userApplicationRunnerThread.execute(() -> 
userApplicationRunner.run(dagString));
 
 Review comment:
   What happens here?
   Did you intended multiple dag submissions go through this method 
concurrently?
   `userApplicationRunner.run` is a blocking call that waits for the dag to 
complete.
   Then why did you use `Executors.newSingleThreadExecutor()` for 
userApplicationRunnerThread?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to