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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/protocol/commands/ReconstructECContainersCommand.java:
##########
@@ -0,0 +1,139 @@
+/*
+ * 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.ozone.protocol.commands;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.google.protobuf.ByteString;
+import org.apache.hadoop.hdds.client.ECReplicationConfig;
+import org.apache.hadoop.hdds.protocol.DatanodeDetails;
+import org.apache.hadoop.hdds.protocol.proto
+    
.StorageContainerDatanodeProtocolProtos.ReconstructECContainersCommandProto;
+import org.apache.hadoop.hdds.protocol.proto
+    .StorageContainerDatanodeProtocolProtos.ReconstructECContainersCommandProto
+    .Builder;
+import org.apache.hadoop.hdds.protocol.proto
+    .StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * SCM command to request reconstruction of EC containers.
+ */
+public class ReconstructECContainersCommand
+    extends SCMCommand<ReconstructECContainersCommandProto> {
+
+  private final long containerID;
+  private final List<DatanodeDetails> sourceDatanodes;
+  private final List<DatanodeDetails> targetDatanodes;
+  private final byte[] missingContainerIndexes;

Review Comment:
   @guihecheng Thank you for the review.
   I added the replica indexes now. For the pipelineID, I am not sure we have 
any significance for the closed containers. So, I am holding this to add. We 
can add later if it really needed?
   
   Coming to missing indexes:
   Target nodes needed not be fixed with any indexes. As we try node per rack, 
there is no strict requirement to place the node with given index only.
   But partial stripe case is very good point. Seems like we don't have a way 
for SCM to determine at stripe level. This is simply at the container level. 
Missing index means, the container which is missed at that index position. 
Stripe level determination should be done by recovery logic, whether that index 
is required to recover for that stripe or not based on block group len. 
   
   I was thinking to give some additional nodes as targets, just incase if one 
of the target node is down at the time of starting recovery, we could simply 
use one of the additional target node. We donlt need this in first version, but 
that is one thought. So, I feel we donlt need to mix that missing indexes with 
target node indexes. 
   Missing indexes are nothing but the missing container index positions.
   



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