echauchot commented on code in PR #3:
URL: 
https://github.com/apache/flink-connector-cassandra/pull/3#discussion_r1100124063


##########
flink-connector-cassandra/src/main/java/org/apache/flink/connector/cassandra/source/split/CassandraSplit.java:
##########
@@ -48,6 +52,30 @@ public CassandraSplitState toSplitState() {
         return new CassandraSplitState(new HashSet<>(ringRanges), splitId());
     }
 
+    public void serialize(ObjectOutputStream objectOutputStream) throws 
IOException {
+        objectOutputStream.writeInt(ringRanges.size());
+        for (RingRange ringRange : ringRanges) {
+            objectOutputStream.writeObject(ringRange.getStart());
+            objectOutputStream.writeObject(ringRange.getEnd());
+        }
+    }
+
+    public static CassandraSplit deserialize(ObjectInputStream 
objectInputStream)
+            throws IOException {
+        try {
+            final int nbRingRanges = objectInputStream.readInt();
+            Set<RingRange> ringRanges = new HashSet<>(nbRingRanges);

Review Comment:
   resolving that there are no more ringRanges set



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to