wonook 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_r202254889
########## 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: As the data can be collected multiple times in an application, I've made the change that ensures that the buffer is cleared every time of the function call to collect() ---------------------------------------------------------------- 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