JingsongLi commented on code in PR #111:
URL: https://github.com/apache/flink-table-store/pull/111#discussion_r868885469
##########
flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/source/FileStoreSource.java:
##########
@@ -182,4 +216,65 @@ public FileStoreSourceSplitSerializer getSplitSerializer()
{
public PendingSplitsCheckpointSerializer
getEnumeratorCheckpointSerializer() {
return new PendingSplitsCheckpointSerializer(getSplitSerializer());
}
+
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
+ if (specifiedManifestEntries != null) {
+ new PartitionedDataManifestSerializer(
+ fileStore.partitionType().getFieldCount(),
+ fileStore.keyType(),
+ fileStore.valueType())
+ .serialize(specifiedManifestEntries, out);
+ }
+ }
+
+ private void readObject(ObjectInputStream in) throws
ClassNotFoundException, IOException {
+ in.defaultReadObject();
+ if (in.available() > 0) {
+ specifiedManifestEntries =
+ new PartitionedDataManifestSerializer(
+ fileStore.partitionType().getFieldCount(),
+ fileStore.keyType(),
+ fileStore.valueType())
+ .deserialize(in);
+ }
+ }
+
+ @Override
+ public boolean equals(Object o) {
Review Comment:
We dont need to add `equals` and `hashCode` for this class.
The source is functional, not a pojo, and I don't think we need to implement
these interfaces
--
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]