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/04/05 07:24:00 UTC

[GitHub] [ozone] fapifta commented on a diff in pull request #3262: HDDS-5909. EC: Onboard EC into upgrade framework

fapifta commented on code in PR #3262:
URL: https://github.com/apache/ozone/pull/3262#discussion_r842447059


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/ClientVersion.java:
##########
@@ -35,6 +35,9 @@
   VERSION_HANDLES_UNKNOWN_DN_PORTS(1,
       "Client version that handles the REPLICATION port in DatanodeDetails."),
 
+  ERASURE_CODING_SUPPORT(2, "This client version has support for Erasure"
+      + "Coding."),

Review Comment:
   done



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocolServerSideTranslatorPB.java:
##########
@@ -127,6 +128,16 @@ private SCMBlockLocationResponse processMessage(
     try {
       switch (request.getCmdType()) {
       case AllocateScmBlock:
+        if (scm.getLayoutVersionManager().needsFinalization() &&
+            scm.getLayoutVersionManager().getMetadataLayoutVersion() <
+                HDDSLayoutFeature.ERASURE_CODED_STORAGE_SUPPORT.layoutVersion()

Review Comment:
   done, thank you for noting it, it is way much better.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocolServerSideTranslatorPB.java:
##########
@@ -127,6 +128,16 @@ private SCMBlockLocationResponse processMessage(
     try {
       switch (request.getCmdType()) {
       case AllocateScmBlock:
+        if (scm.getLayoutVersionManager().needsFinalization() &&
+            scm.getLayoutVersionManager().getMetadataLayoutVersion() <
+                HDDSLayoutFeature.ERASURE_CODED_STORAGE_SUPPORT.layoutVersion()
+        ) {
+          if (request.getAllocateScmBlockRequest().hasEcReplicationConfig()) {
+            throw new ServiceException("Cluster is not finalized yet, it is"
+                + " not enabled to create blocks with Erasure Coded"
+                + " replication type.");

Review Comment:
   yes, absolutely. That is why I chose this implementation, as it seemed to make refactoring to that framework easier, once it is ready.



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