devmadhuu commented on code in PR #6272:
URL: https://github.com/apache/ozone/pull/6272#discussion_r1582795024


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/SCMDBMetaDataInitializationTask.java:
##########
@@ -0,0 +1,176 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.hadoop.ozone.recon.tasks;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
+import org.apache.hadoop.hdds.utils.db.Table;
+import org.apache.hadoop.ozone.recon.scm.ReconSCMMetadataProcessingTask;
+import org.apache.hadoop.ozone.recon.scm.ReconScmMetadataManager;
+import org.apache.hadoop.ozone.recon.spi.ReconContainerMetadataManager;
+import org.jooq.tools.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.inject.Inject;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Class to iterate over the SCM DB metadata events for containers, pipelines, 
nodes
+ * and update recon's corresponding in-memory data using their respective 
manager
+ * and state manager classes.
+ */

Review Comment:
   > In our offline discussions, it has been clarified that we are presently 
only updating three tables: CONTAINERS_TABLE, PIPELINES_TABLE, and 
SEQUENCE_ID_TABLE. Therefore, it is essential to update the corresponding Java 
document to ensure clarity for both reviewers and developers, preventing any 
confusion.
   > 
   > ```
   > /**
   >  * The SCMDBMetaDataInitializationTask class is responsible for processing 
delta updates
   >  * from the Storage Container Manager (SCM) database and applying them to 
the Recon
   >  * component's in-memory data structures. This task focuses on three 
specific tables:
   >  * CONTAINERS_TABLE, PIPELINES_TABLE, and SEQUENCE_ID_TABLE.
   >  *
   >  * By focusing on these three tables, the SCMDBMetaDataInitializationTask 
ensures
   >  * that Recon's in-memory data structures for containers, pipelines, and 
sequence IDs
   >  * are kept up-to-date with the latest changes in the SCM database. This 
task is
   >  * crucial for maintaining data consistency and providing accurate 
information to
   >  * other Recon components and clients.
   >  */
   > ```
   
   The `SCMDBMetaDataInitializationTask` class is not just responsible for 
delta updates, it do full updates sunc as well. Only difference from other 
tasks is that it do only for CONTAINERS_TABLE, PIPELINES_TABLE, and 
SEQUENCE_ID_TABLE , I'll update the javadac comment.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to