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_r201398829
 
 

 ##########
 File path: client/src/main/java/edu/snu/nemo/client/JobLauncher.java
 ##########
 @@ -309,9 +361,13 @@ public static Configuration getBuiltJobConf() {
   /**
    * Get the collected data.
    *
+   * @param <T> the type of the data.
    * @return the collected data.
    */
   public static <T> List<T> getCollectedData() {
-    return (List<T>) collectedData;
+    final List<T> result = new ArrayList<>();
+    result.addAll((List<T>) COLLECTED_DATA);
+    COLLECTED_DATA.clear(); // flush after fetching.
+    return result;
   }
 
 Review comment:
   Could you explain the purpose of this change?

----------------------------------------------------------------
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