You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nemo.apache.org by GitBox <gi...@apache.org> on 2018/06/07 02:32:16 UTC
[GitHub] sanha commented on a change in pull request #28: [NEMO-12] Frontend
support for Scala Spark
sanha 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_r193611278
##########
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:
No, it is used to read the file (and not be returned as a part of the `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:
users@infra.apache.org
With regards,
Apache Git Services