You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "xichen01 (via GitHub)" <gi...@apache.org> on 2026/06/02 09:12:12 UTC
[PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
xichen01 opened a new pull request, #10410:
URL: https://github.com/apache/ozone/pull/10410
## What changes were proposed in this pull request?
- Support creating pipelines on a specific StorageTier for Ratis, EC, and Standalone provider paths(see: PipelineProvider#create subclass ).
- PlacementPolicy#chooseDatanodes support StorageType, so datanodes are selected only when the matching StorageType has enough space.
- Add StorageTier ID helpers and NVDIMM protobuf mapping.
- For interfaces that do not currently support StorageTier/StorageType, use the default StorageTier/StorageType (such as PipelineFactory#create)
---
FYI:
- Releated doc and discuss: https://github.com/apache/ozone/pull/6989
- A preview version for the full "Ozone Storage Policy" feature: https://github.com/ivandika3/ozone/tree/refs/heads/backport-storage-policy-storage-class
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15250
## How was this patch tested?
Newly added test
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "greenwich (via GitHub)" <gi...@apache.org>.
greenwich commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3360365495
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -40,21 +37,23 @@ public enum StorageTier {
private final String tierName;
private final List<StorageType> storageTypes;
- private final boolean uniformStorageType;
- private static final Map<StorageTier, Map<ReplicationConfig, List<StorageType>>>
+ private final boolean isUniform;
+ private static final Map<StorageTier, Map<Integer, List<StorageType>>>
CACHE = new EnumMap<>(StorageTier.class);
+ public static final int MAX_NODE_COUNT = 20;
Review Comment:
`MAX_NODE_COUNT` = 20 is undocumented and, because getStorageTypes(int) throws on a cache miss, it effectively silently caps replication width.
For uniform tiers, `computeStorageTypes` is just `Collections.nCopies(...)` (O(1)), so the cache isn't buying anything — suggest dropping it:
```
public List<StorageType> getStorageTypes(int nodeCount) {
return computeStorageTypes(nodeCount);
}
```
I checked that later `fromID/computeId/findSupportedStorageTiers` work — none of it needs this cache (only the `StorageType`→prime table + computeId), so dropping it entirely is safe.
(Or, if you'd rather keep the precompute: fall through to `computeStorageTypes(nodeCount)` on a miss, document `MAX_NODE_COUNT`, and make it private.)
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3382186315
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -40,21 +37,23 @@ public enum StorageTier {
private final String tierName;
private final List<StorageType> storageTypes;
- private final boolean uniformStorageType;
- private static final Map<StorageTier, Map<ReplicationConfig, List<StorageType>>>
+ private final boolean isUniform;
+ private static final Map<StorageTier, Map<Integer, List<StorageType>>>
CACHE = new EnumMap<>(StorageTier.class);
+ public static final int MAX_NODE_COUNT = 20;
Review Comment:
This was intended to accommodate non-uniform storage tiers, which is why the cache and subsequent `computeId` were added. Looking at the current code, this seems like overengineering.
Let me simplify this part of the code.
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3382186021
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -121,50 +117,51 @@ public String getTierName() {
return tierName;
}
- public boolean isUniformStorageType() {
- return uniformStorageType;
+ public boolean isUniform() {
+ return isUniform;
}
/**
* Computes the list of StorageTypes based on replication configuration.
*
- * @param replicationConfig The replication configuration.
+ * @param nodeCount The node count of the storageTier required.
+ * @param storageTier The required StorageTier.
* @return The list of StorageTypes for the given tier and replication configuration.
*/
- private List<StorageType> computeStorageTypes(
- ReplicationConfig replicationConfig) {
- if (isUniformStorageType()) {
- int numberOfNodes = replicationConfig.getRequiredNodes();
+ private List<StorageType> computeStorageTypes(int nodeCount, StorageTier storageTier) {
+ if (isUniform()) {
if (storageTypes.isEmpty()) {
return Collections.emptyList();
}
- return Collections.nCopies(numberOfNodes, storageTypes.get(0));
+ return Collections.nCopies(nodeCount, storageTypes.get(0));
} else {
throw new UnsupportedOperationException(
- "Unsupported not UniformStorage Storage Tier: " + replicationConfig);
+ "Unsupported not uniform StorageTier: " + storageTier);
}
}
/**
* Maps a StorageTier to its corresponding StorageType based on replication type.
*
- * @param replicationConfig The replication configuration.
+ * @param nodeCount The node count of the storageTier required.
* @return The list of StorageTypes corresponding to the given tier and replication configuration.
* @throws IllegalArgumentException if the replication configuration is not supported.
*/
- public List<StorageType> getStorageTypes(
- ReplicationConfig replicationConfig) {
- Map<ReplicationConfig, List<StorageType>> tierCache = CACHE.get(this);
+ public List<StorageType> getStorageTypes(int nodeCount) {
+ Map<Integer, List<StorageType>> tierCache = CACHE.get(this);
if (tierCache != null) {
- List<StorageType> cachedStorageType = tierCache.get(replicationConfig);
+ List<StorageType> cachedStorageType = tierCache.get(nodeCount);
if (cachedStorageType != null) {
return cachedStorageType;
}
}
- throw new IllegalArgumentException("Unsupported ReplicationConfig: " +
- replicationConfig + " for StorageTier: " + getTierName());
+ throw new IllegalArgumentException("Unsupported node count: " +
+ nodeCount + " for StorageTier: " + getTierName());
}
+ public static void setDefault(StorageTier storageTier) {
+ defaultTier = storageTier;
+ }
Review Comment:
Yes, this will be used in the future, I removed it.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManagerUtil.java:
##########
@@ -71,22 +72,24 @@ private static String formatDatanodeDetails(List<DatanodeDetails> dns) {
* policy will be called again. This will continue until the placement policy
* is able to select enough nodes or the number of nodes requested is reduced
* to zero when an exception will be thrown.
- * @param policy The placement policy to use to select nodes.
- * @param requiredNodes The number of nodes required
- * @param usedNodes Any nodes already used by the container
- * @param excludedNodes Any Excluded nodes which cannot be selected
+ *
+ * @param policy The placement policy to use to select nodes.
+ * @param requiredNodes The number of nodes required
+ * @param usedNodes Any nodes already used by the container
+ * @param excludedNodes Any Excluded nodes which cannot be selected
* @param defaultContainerSize The cluster default max container size
- * @param container The container to select new replicas for
+ * @param container The container to select new replicas for
+ * @param storageType
Review Comment:
Add
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineProvider.java:
##########
@@ -61,11 +64,12 @@ public PipelineStateManager getPipelineStateManager() {
return stateManager;
}
- protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig)
- throws IOException;
+ protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig,
+ StorageTier storageTier) throws IOException;
Review Comment:
This would cause the ReplicationConfig and StorageTier code to become tightly coupled, and since there may be cases where only StorageTier is used, they should still be kept separate.
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on PR #10410:
URL: https://github.com/apache/ozone/pull/10410#issuecomment-4702447802
@greenwich @amaliujia @ivandika3 PTAL
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "greenwich (via GitHub)" <gi...@apache.org>.
greenwich commented on PR #10410:
URL: https://github.com/apache/ozone/pull/10410#issuecomment-4703805177
> @greenwich @amaliujia @ivandika3 PTAL
LGTM now.
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on PR #10410:
URL: https://github.com/apache/ozone/pull/10410#issuecomment-4600861498
@greenwich @chungen0126 @ivandika3 @peterxcli Please help to review
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on PR #10410:
URL: https://github.com/apache/ozone/pull/10410#issuecomment-4729771264
Thanks @amaliujia @greenwich @ivandika3 for the review.
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "greenwich (via GitHub)" <gi...@apache.org>.
greenwich commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3360365495
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -40,21 +37,23 @@ public enum StorageTier {
private final String tierName;
private final List<StorageType> storageTypes;
- private final boolean uniformStorageType;
- private static final Map<StorageTier, Map<ReplicationConfig, List<StorageType>>>
+ private final boolean isUniform;
+ private static final Map<StorageTier, Map<Integer, List<StorageType>>>
CACHE = new EnumMap<>(StorageTier.class);
+ public static final int MAX_NODE_COUNT = 20;
Review Comment:
20 is undocumented and effectively defines a silent max replication width - makes sense to document it.
For uniform tiers, `computeStorageTypes `is just `Collections.nCopies(...)` (O(1)), so the cache isn't buying anything. Suggest dropping it - it will make everything clear.
```
public List<StorageType> getStorageTypes(int nodeCount) {
return computeStorageTypes(nodeCount);
}
```
(or, if keeping the precompute, fall through to `computeStorageTypes(nodeCount)` on a miss and make `MAX_NODE_COUNT` private.)
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3382198463
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTierUtil.java:
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.client;
+
+import java.util.List;
+import org.apache.hadoop.fs.StorageType;
+import org.apache.hadoop.hdds.scm.exceptions.SCMException;
+
+/**
+ * Utility class for managing StorageTier operations.
+ */
+public final class StorageTierUtil {
+ private StorageTierUtil() {
+ }
+
+ /**
+ * Validates the given StorageTier and throws an exception if it is empty.
+ *
+ * @param storageTier the StorageTier to check
+ * @throws SCMException if the StorageTier is empty
+ */
+ public static void validateNotEmpty(StorageTier storageTier) throws SCMException {
+ if (storageTier.equals(StorageTier.EMPTY)) {
+ throw new SCMException("Cannot create Pipeline for empty tier",
+ SCMException.ResultCodes.CANNOT_CREATE_PIPELINE_FOR_EMPTY_TIER);
+ }
Review Comment:
An additional NOT NULL check has been added;
The code here will not be null because there will always be at least one default StorageTier, even if it wasn't specified when creating the Pipeline.
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3353770122
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -121,50 +117,51 @@ public String getTierName() {
return tierName;
}
- public boolean isUniformStorageType() {
- return uniformStorageType;
+ public boolean isUniform() {
+ return isUniform;
}
/**
* Computes the list of StorageTypes based on replication configuration.
*
- * @param replicationConfig The replication configuration.
+ * @param nodeCount The node count of the storageTier required.
+ * @param storageTier The required StorageTier.
* @return The list of StorageTypes for the given tier and replication configuration.
*/
- private List<StorageType> computeStorageTypes(
- ReplicationConfig replicationConfig) {
- if (isUniformStorageType()) {
- int numberOfNodes = replicationConfig.getRequiredNodes();
+ private List<StorageType> computeStorageTypes(int nodeCount, StorageTier storageTier) {
+ if (isUniform()) {
if (storageTypes.isEmpty()) {
return Collections.emptyList();
}
- return Collections.nCopies(numberOfNodes, storageTypes.get(0));
+ return Collections.nCopies(nodeCount, storageTypes.get(0));
} else {
throw new UnsupportedOperationException(
- "Unsupported not UniformStorage Storage Tier: " + replicationConfig);
+ "Unsupported not uniform StorageTier: " + storageTier);
}
}
/**
* Maps a StorageTier to its corresponding StorageType based on replication type.
*
- * @param replicationConfig The replication configuration.
+ * @param nodeCount The node count of the storageTier required.
* @return The list of StorageTypes corresponding to the given tier and replication configuration.
* @throws IllegalArgumentException if the replication configuration is not supported.
*/
- public List<StorageType> getStorageTypes(
- ReplicationConfig replicationConfig) {
- Map<ReplicationConfig, List<StorageType>> tierCache = CACHE.get(this);
+ public List<StorageType> getStorageTypes(int nodeCount) {
+ Map<Integer, List<StorageType>> tierCache = CACHE.get(this);
if (tierCache != null) {
- List<StorageType> cachedStorageType = tierCache.get(replicationConfig);
+ List<StorageType> cachedStorageType = tierCache.get(nodeCount);
if (cachedStorageType != null) {
return cachedStorageType;
}
}
- throw new IllegalArgumentException("Unsupported ReplicationConfig: " +
- replicationConfig + " for StorageTier: " + getTierName());
+ throw new IllegalArgumentException("Unsupported node count: " +
+ nodeCount + " for StorageTier: " + getTierName());
}
+ public static void setDefault(StorageTier storageTier) {
+ defaultTier = storageTier;
+ }
Review Comment:
Does not seem to be used, should be configured and set in `StorageContainerManager.java`
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTierUtil.java:
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.client;
+
+import java.util.List;
+import org.apache.hadoop.fs.StorageType;
+import org.apache.hadoop.hdds.scm.exceptions.SCMException;
+
+/**
+ * Utility class for managing StorageTier operations.
+ */
+public final class StorageTierUtil {
+ private StorageTierUtil() {
+ }
+
+ /**
+ * Validates the given StorageTier and throws an exception if it is empty.
+ *
+ * @param storageTier the StorageTier to check
+ * @throws SCMException if the StorageTier is empty
+ */
+ public static void validateNotEmpty(StorageTier storageTier) throws SCMException {
+ if (storageTier.equals(StorageTier.EMPTY)) {
+ throw new SCMException("Cannot create Pipeline for empty tier",
+ SCMException.ResultCodes.CANNOT_CREATE_PIPELINE_FOR_EMPTY_TIER);
+ }
Review Comment:
Nullity check here?
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 merged PR #10410:
URL: https://github.com/apache/ozone/pull/10410
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "greenwich (via GitHub)" <gi...@apache.org>.
greenwich commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3360365495
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/StorageTier.java:
##########
@@ -40,21 +37,23 @@ public enum StorageTier {
private final String tierName;
private final List<StorageType> storageTypes;
- private final boolean uniformStorageType;
- private static final Map<StorageTier, Map<ReplicationConfig, List<StorageType>>>
+ private final boolean isUniform;
+ private static final Map<StorageTier, Map<Integer, List<StorageType>>>
CACHE = new EnumMap<>(StorageTier.class);
+ public static final int MAX_NODE_COUNT = 20;
Review Comment:
20 is undocumented and effectively defines a silent max replication width - makes sense to document it.
For uniform tiers, `computeStorageTypes `is just `Collections.nCopies(...)` (O(1)), so the cache isn't buying anything. Suggest dropping it - it will make everything clear.
```
public List<StorageType> getStorageTypes(int nodeCount) {
return computeStorageTypes(nodeCount);
}
I am sure we don't need the cache for future `fromID/computeId/findSupportedStorageTiers` work.
```
(or, if keeping the precompute, fall through to `computeStorageTypes(nodeCount)` on a miss and make `MAX_NODE_COUNT` private.)
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "greenwich (via GitHub)" <gi...@apache.org>.
greenwich commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3360774862
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManagerUtil.java:
##########
@@ -71,22 +72,24 @@ private static String formatDatanodeDetails(List<DatanodeDetails> dns) {
* policy will be called again. This will continue until the placement policy
* is able to select enough nodes or the number of nodes requested is reduced
* to zero when an exception will be thrown.
- * @param policy The placement policy to use to select nodes.
- * @param requiredNodes The number of nodes required
- * @param usedNodes Any nodes already used by the container
- * @param excludedNodes Any Excluded nodes which cannot be selected
+ *
+ * @param policy The placement policy to use to select nodes.
+ * @param requiredNodes The number of nodes required
+ * @param usedNodes Any nodes already used by the container
+ * @param excludedNodes Any Excluded nodes which cannot be selected
* @param defaultContainerSize The cluster default max container size
- * @param container The container to select new replicas for
+ * @param container The container to select new replicas for
+ * @param storageType
Review Comment:
nit: empty `storageType` param
--
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
Re: [PR] HDDS-15250. PipelineProvider support create pipeline by StorageTier [ozone]
Posted by "amaliujia (via GitHub)" <gi...@apache.org>.
amaliujia commented on code in PR #10410:
URL: https://github.com/apache/ozone/pull/10410#discussion_r3354023991
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineProvider.java:
##########
@@ -61,11 +64,12 @@ public PipelineStateManager getPipelineStateManager() {
return stateManager;
}
- protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig)
- throws IOException;
+ protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig,
+ StorageTier storageTier) throws IOException;
Review Comment:
Should `StorageTier` be part of `REPLICATION_CONFIG` so we do not need to change abstract interface here?
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineProvider.java:
##########
@@ -61,11 +64,12 @@ public PipelineStateManager getPipelineStateManager() {
return stateManager;
}
- protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig)
- throws IOException;
+ protected abstract Pipeline create(REPLICATION_CONFIG replicationConfig,
+ StorageTier storageTier) throws IOException;
Review Comment:
Could `StorageTier` be part of `REPLICATION_CONFIG` so we do not need to change abstract interface here?
--
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