wonook commented on a change in pull request #28: [NEMO-12] Frontend support for Scala Spark URL: https://github.com/apache/incubator-nemo/pull/28#discussion_r193319477
########## File path: compiler/frontend/spark/src/main/java/edu/snu/nemo/compiler/frontend/spark/transform/CollectTransform.java ########## @@ -57,11 +57,13 @@ public void onData(final T element) { @Override public void close() { try ( - FileOutputStream fos = new FileOutputStream(filename); - ObjectOutputStream oos = new ObjectOutputStream(fos) + final FileOutputStream fos = new FileOutputStream(filename); + final ObjectOutputStream oos = new ObjectOutputStream(fos) ) { - oos.writeObject(list); - oos.close(); + oos.writeInt(list.size()); // Write the length of list at first. Review comment: Is this also implemented in Spark? Do they write the length of the list before writing the actual list? ---------------------------------------------------------------- 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