rkhachatryan commented on code in PR #21468:
URL: https://github.com/apache/flink/pull/21468#discussion_r1051681637
##########
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/KvStateChangeLoggerImpl.java:
##########
@@ -78,21 +79,25 @@ public void namespacesMerged(Ns target, Collection<Ns>
sources) throws IOExcepti
}
@Override
- protected void serializeValue(Value value, DataOutputViewStreamWrapper
out) throws IOException {
+ protected void serializeValue(Value value, DataOutputView out) throws
IOException {
valueSerializer.serialize(value, out);
}
@Override
- protected void serializeScope(Ns ns, DataOutputViewStreamWrapper out)
throws IOException {
+ protected void serializeScope(Ns ns, DataOutputView out) throws
IOException {
keySerializer.serialize(keyContext.getCurrentKey(), out);
namespaceSerializer.serialize(ns, out);
}
- protected void writeDefaultValueAndTtl(DataOutputViewStreamWrapper out)
throws IOException {
+ protected void writeDefaultValueAndTtl(DataOutputView out) throws
IOException {
out.writeBoolean(ttlConfig.isEnabled());
if (ttlConfig.isEnabled()) {
- try (ObjectOutputStream o = new ObjectOutputStream(out)) {
- o.writeObject(ttlConfig);
+ try (ByteArrayOutputStreamWithPos outputStreamWithPos =
+ new ByteArrayOutputStreamWithPos();
Review Comment:
nit: do we really need position here? If not,
`java.io.ByteArrayOutputStream` would be sufficient.
--
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]