umamaheswararao commented on code in PR #3542:
URL: https://github.com/apache/ozone/pull/3542#discussion_r908777974


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/UnderReplicationHandler.java:
##########
@@ -0,0 +1,50 @@
+/**
+ * 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.hadoop.hdds.scm.container.replication;
+
+import org.apache.hadoop.hdds.protocol.DatanodeDetails;
+import org.apache.hadoop.hdds.scm.container.ContainerReplica;
+import org.apache.hadoop.ozone.protocol.commands.SCMCommand;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * This interface to create respective commands after processing the replicas
+ * with pending ops and health check results.
+ */
+public interface UnderReplicationHandler {
+
+  /**
+   * Identify a new set of datanode(s) to replicate/reconstruct the container
+   * and form the SCM commands to send it to DN.
+   *
+   * @param replicas - An instance of ContainerReplicaCount, containing the
+   *                   current replica count and inflight adds and deletes
+   * @param pendingOps - Inflight replications and deletion ops.
+   * @param result - Health check result.
+   * @param remainingMaintenanceRedundancy - represents that how many nodes go
+   *                                      into maintenance.
+   * @return Returns the key value pair of destination dn where the command 
gets
+   * executed and the command itself.
+   */
+  Map<DatanodeDetails, SCMCommand> processAndCreateCommands(

Review Comment:
   done



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