linyiqun commented on a change in pull request #1392:
URL: https://github.com/apache/hadoop-ozone/pull/1392#discussion_r484858807



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/exceptions/SCMException.java
##########
@@ -123,6 +123,7 @@ public ResultCodes getResult() {
     FAILED_TO_INIT_CONTAINER_PLACEMENT_POLICY,
     FAILED_TO_ALLOCATE_ENOUGH_BLOCKS,
     INTERNAL_ERROR,
-    FAILED_TO_INIT_PIPELINE_CHOOSE_POLICY
+    FAILED_TO_INIT_PIPELINE_CHOOSE_POLICY,
+    NOT_SUPPORTED_OPERATION,

Review comment:
       New SCMException introduced here that broken the unit test:
   
   [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
0.077 s <<< FAILURE! - in 
org.apache.hadoop.hdds.scm.exceptions.TestSCMExceptionResultCodes
   [ERROR] 
codeMapping(org.apache.hadoop.hdds.scm.exceptions.TestSCMExceptionResultCodes)  
Time elapsed: 0.023 s  <<< FAILURE!
   java.lang.AssertionError: expected:<30> but was:<29>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:743)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:542)
        at 
org.apache.hadoop.hdds.scm.exceptions.TestSCMExceptionResultCodes.codeMapping(TestSCMExceptionResultCodes.java:35)

##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/upgrade/HDDSLayoutVersionManager.java
##########
@@ -0,0 +1,92 @@
+/**
+ * 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.upgrade;
+
+
+import java.io.IOException;
+
+import org.apache.hadoop.ozone.common.Storage;
+import 
org.apache.hadoop.hdds.upgrade.HDDSLayoutFeatureCatalog.HDDSLayoutFeature;
+import org.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager;
+import org.apache.hadoop.ozone.upgrade.LayoutVersionManager;
+
+import com.google.common.annotations.VisibleForTesting;
+
+/**
+ * Class to manage layout versions and features for Storage Container Manager
+ * and DataNodes.
+ */
+public final class HDDSLayoutVersionManager extends

Review comment:
       Can we add the unit test for HDDSLayoutVersionManager like 
TestOMVersionManager does?




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

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



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

Reply via email to