You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/03 10:47:47 UTC

[GitHub] [ozone] JacksonYao287 commented on a diff in pull request #3345: HDDS-6586: EC: Implement the EC Reconstruction Command with necessary information

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


##########
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:
   @umamaheswararao thanks for the work! 
   i am not sure why `byte[]` for missing container index? seems int[] or something like this may be more easy to understand? or is there any special reason for `byte[]`? 
   NIT:  i prefer `missingReplicaIndexes ` instead of `missingContainerIndexes` , since the specific replica of container is missing actually, not container itself. 
   
   for the current implementation of ozone EC , we don`t shuffle the blocks among EC container group , it means some containers will only have blocks of data chunks , and others will only have blocks of parity chunks.  shuflle can scatter the read of data blocks to different datanode, so i believe it has some significance for the performance of the whole ozone cluster , and we need to support it in the future. at that time , the replica index will not be equal to the chunk index in a stripe , and we need some other mechanism to identify the chunk index in a stripe. 



-- 
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-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org