swagle commented on code in PR #3595:
URL: https://github.com/apache/ozone/pull/3595#discussion_r920514946
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/upgrade/HDDSLayoutFeature.java:
##########
@@ -22,32 +22,57 @@
import java.util.Optional;
import org.apache.hadoop.ozone.upgrade.LayoutFeature;
+import
org.apache.hadoop.hdds.upgrade.HDDSFinalizationRequirements.PipelineRequirements;
/**
* List of HDDS Features.
*/
public enum HDDSLayoutFeature implements LayoutFeature {
////////////////////////////// //////////////////////////////
- INITIAL_VERSION(0, "Initial Layout Version"),
- DATANODE_SCHEMA_V2(1, "Datanode RocksDB Schema Version 2 (with column " +
+
+ // TODO: After HDDS-6887 schema version changes will not require closing
+ // pipelines.
+ INITIAL_VERSION(0,
+ new HDDSFinalizationRequirements.Builder().build(),
+ "Initial Layout Version"),
+ DATANODE_SCHEMA_V2(1,
+ new HDDSFinalizationRequirements.Builder()
+ .setPipelineRequirements(PipelineRequirements.CLOSE_ALL_PIPELINES)
+ .build(),
+ "Datanode RocksDB Schema Version 2 (with column " +
"families)"),
- SCM_HA(2, "Storage Container Manager HA"),
- ERASURE_CODED_STORAGE_SUPPORT(3, "Ozone version with built in support for"
+ SCM_HA(2,
+ new HDDSFinalizationRequirements.Builder().build(),
+ "Storage Container Manager HA"),
+ ERASURE_CODED_STORAGE_SUPPORT(3,
+ new HDDSFinalizationRequirements.Builder()
+ // At least 5 datanodes are required for an EC pipeline.
+ .setMinFinalizedDatanodes(5)
+ .build(),
+ "Ozone version with built in support for"
+ " Erasure Coded block data storage."),
- DATANODE_SCHEMA_V3(4, "Datanode RocksDB Schema Version 3 (one rocksdb " +
+ DATANODE_SCHEMA_V3(4,
+ new HDDSFinalizationRequirements.Builder()
+ .setPipelineRequirements(PipelineRequirements.CLOSE_ALL_PIPELINES)
Review Comment:
Quick check: This would not close pipelines twice right? Meaning two
features with new layout version both saying close pipelines should only
trigger this op once.
--
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]