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_r193647591
########## File path: compiler/frontend/spark/src/main/java/edu/snu/nemo/compiler/frontend/spark/core/SparkFrontendUtils.java ########## @@ -102,9 +112,13 @@ public static Serializer deriveSerializerFrom(final SparkContext sparkContext) { // TODO #740: remove this part, and make it properly transfer with executor. File file = new File(resultFile + i); while (file.exists()) { - try (final FileInputStream fin = new FileInputStream(file)) { - try (final ObjectInputStream ois = new ObjectInputStream(fin)) { - result.addAll((List<T>) ois.readObject()); + try ( + final FileInputStream fis = new FileInputStream(file); + final ObjectInputStream dis = new ObjectInputStream(fis) + ) { + final int size = dis.readInt(); Review comment: Can add a little note referencing it to the `CollectTransform`'s `close` method, to make it easier for readers to link the part to each other? ---------------------------------------------------------------- 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