juripetersen commented on code in PR #640:
URL: https://github.com/apache/incubator-wayang/pull/640#discussion_r2605540430
##########
wayang-platforms/wayang-spark/src/main/java/org/apache/wayang/spark/operators/SparkObjectFileSink.java:
##########
@@ -109,4 +125,34 @@ public boolean containsAction() {
return true;
}
+ private static Tuple2<NullWritable, BytesWritable> encodeBuffer(Object[]
buffer,
+ int
validLength,
+
ObjectFileSerializationMode mode) {
+ try {
+ byte[] payload = ObjectFileSerialization.serializeChunk(buffer,
validLength, mode);
+ BytesWritable writable = new BytesWritable(payload);
+ return new Tuple2<>(NullWritable.get(), writable);
Review Comment:
Could be simplified to:
```java
return new Tuple2<>(NullWritable.get(), new BytesWritable(payload));
```
Definitely needs a blank line before the return.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]