Github user nltran commented on a diff in the pull request:
https://github.com/apache/flink/pull/967#discussion_r38295439
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/iterative/event/EventWithAggregatorsTest.java
---
@@ -123,6 +169,31 @@ private IterationEventWithAggregators
pipeThroughSerialization(IterationEventWit
return null;
}
}
+
+ private ClockTaskEvent pipeThroughSerialization2(ClockTaskEvent event) {
+ try {
+ ByteArrayOutputStream baos = new
ByteArrayOutputStream();
+ DataOutputStream out = new DataOutputStream(baos);
+ event.write(new OutputViewDataOutputStreamWrapper(out));
+ out.flush();
+
+ byte[] data = baos.toByteArray();
+ out.close();
+ baos.close();
+
+ DataInputStream in = new DataInputStream(new
ByteArrayInputStream(data));
+ ClockTaskEvent newEvent =
event.getClass().newInstance();
+ newEvent.read(new InputViewDataInputStreamWrapper(in));
+ in.close();
+
+ return newEvent;
+ } catch (Exception e) {
+ System.err.println(e.getMessage());
+ e.printStackTrace();
+ Assert.fail("Test threw an exception: " +
e.getMessage());
+ return null;
--- End diff --
I actually reproduced the same as in
```testSerializationOfEventWithAggregateValues```. What you say makes sense in
both cases though.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---