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 2021/02/08 20:22:37 UTC
[GitHub] [ozone] errose28 opened a new pull request #1913: HDDS-4182. Onboard HDDS-3869 into Layout version management.
errose28 opened a new pull request #1913:
URL: https://github.com/apache/ozone/pull/1913
## What changes were proposed in this pull request?
In HDDS-3869 (Use different column families for datanode block and metadata), a new schema version for container layout was introduced. Use the non-rolling upgrade framework to make sure that this new schema version is not used before the cluster is finalized.
## What is the link to the Apache JIRA
HDDS-4182
## How was this patch tested?
Existing tests will use schema V1 after this change, and schema V2 after upgrade.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] avijayanhwx merged pull request #1913: HDDS-4182. Onboard HDDS-3869 into Layout version management.
Posted by GitBox <gi...@apache.org>.
avijayanhwx merged pull request #1913:
URL: https://github.com/apache/ozone/pull/1913
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] errose28 commented on pull request #1913: HDDS-4182. Onboard HDDS-3869 into Layout version management.
Posted by GitBox <gi...@apache.org>.
errose28 commented on pull request #1913:
URL: https://github.com/apache/ozone/pull/1913#issuecomment-777031970
Thanks for the review @avijayanhwx. I have updated the code with your suggestions.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] avijayanhwx commented on a change in pull request #1913: HDDS-4182. Onboard HDDS-3869 into Layout version management.
Posted by GitBox <gi...@apache.org>.
avijayanhwx commented on a change in pull request #1913:
URL: https://github.com/apache/ozone/pull/1913#discussion_r573997744
##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/upgrade/DatanodeMetadataFeatures.java
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.container.upgrade;
+
+import org.apache.hadoop.hdds.upgrade.HDDSLayoutVersionManager;
+import org.apache.hadoop.ozone.OzoneConsts;
+
+/**
+ * Utility class to retrieve the version of a feature that corresponds to the
+ * metadata layout version specified by the provided
+ * {@link HDDSLayoutVersionManager}.
+ */
+public final class DatanodeMetadataFeatures {
+ private static HDDSLayoutVersionManager versionManager;
+
+ private DatanodeMetadataFeatures() { }
+
+ public static synchronized void setHDDSLayoutVersionManager(
+ HDDSLayoutVersionManager manager) {
+ versionManager = manager;
+ }
+
+ public static synchronized String getSchemaVersion() {
+ if (versionManager == null ||
+ versionManager.getMetadataLayoutVersion() < 1) {
Review comment:
Can we use the actual LayoutFeature.layoutVersion here?
##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/upgrade/DatanodeMetadataFeatures.java
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.container.upgrade;
+
+import org.apache.hadoop.hdds.upgrade.HDDSLayoutVersionManager;
+import org.apache.hadoop.ozone.OzoneConsts;
+
+/**
+ * Utility class to retrieve the version of a feature that corresponds to the
+ * metadata layout version specified by the provided
+ * {@link HDDSLayoutVersionManager}.
+ */
+public final class DatanodeMetadataFeatures {
+ private static HDDSLayoutVersionManager versionManager;
+
+ private DatanodeMetadataFeatures() { }
+
+ public static synchronized void setHDDSLayoutVersionManager(
Review comment:
nit. Rename to initialize()?
##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/upgrade/DatanodeMetadataFeatures.java
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.container.upgrade;
+
+import org.apache.hadoop.hdds.upgrade.HDDSLayoutVersionManager;
+import org.apache.hadoop.ozone.OzoneConsts;
+
+/**
+ * Utility class to retrieve the version of a feature that corresponds to the
+ * metadata layout version specified by the provided
+ * {@link HDDSLayoutVersionManager}.
+ */
+public final class DatanodeMetadataFeatures {
+ private static HDDSLayoutVersionManager versionManager;
+
+ private DatanodeMetadataFeatures() { }
+
+ public static synchronized void setHDDSLayoutVersionManager(
+ HDDSLayoutVersionManager manager) {
+ versionManager = manager;
+ }
+
+ public static synchronized String getSchemaVersion() {
+ if (versionManager == null ||
Review comment:
If versionManager is null, we should throw an exception (maybe IOException).
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] avijayanhwx commented on pull request #1913: HDDS-4182. Onboard HDDS-3869 into Layout version management.
Posted by GitBox <gi...@apache.org>.
avijayanhwx commented on pull request #1913:
URL: https://github.com/apache/ozone/pull/1913#issuecomment-777712918
CI failure '_org.apache.hadoop.ozone.om.TestOzoneManagerPrepare_' is unrelated to this patch, and is being fixed in HDDS-4610 and RATIS-1305.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org