Jiabao-Sun commented on code in PR #1:
URL: 
https://github.com/apache/flink-connector-mongodb/pull/1#discussion_r1017559683


##########
flink-connector-mongodb/src/main/java/org/apache/flink/connector/mongodb/source/enumerator/MongoSourceEnumState.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.mongodb.source.enumerator;
+
+import org.apache.flink.annotation.PublicEvolving;
+import 
org.apache.flink.connector.mongodb.source.enumerator.assigner.MongoSplitAssigner;
+import 
org.apache.flink.connector.mongodb.source.reader.split.MongoSourceSplitReader;
+import org.apache.flink.connector.mongodb.source.split.MongoScanSourceSplit;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The state class for MongoDB source enumerator, used for storing the split 
state. This class is
+ * managed and controlled by {@link MongoSplitAssigner}.
+ */
+@PublicEvolving
+public class MongoSourceEnumState {
+
+    /** The Mongo collections remaining. */
+    private final List<String> remainingCollections;
+
+    /**
+     * The paths that are no longer in the enumerator checkpoint, but have 
been processed before.
+     */
+    private final List<String> alreadyProcessedCollections;

Review Comment:
   No, it doesn't.
   
   The `remainingCollections` stores the MongoDB collections (like table name) 
we need to read.
   The `alreadyProcessedCollections` stores the collections we have already 
read.
   These collection names are limited and can be determined at startup.
   
   Currently, we explicitly qualify database and collection, and store at most 
one collection name in it.
   Designing the state as a list is to maintain state compatibility for future 
support for multi-collection queries.



-- 
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