greenwich commented on code in PR #10303:
URL: https://github.com/apache/ozone/pull/10303#discussion_r3270287155
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -163,11 +171,15 @@ public void create(VolumeSet volumeSet,
VolumeChoosingPolicy
HddsVolume containerVolume;
String hddsVolumeDir;
try {
- containerVolume = volumeChoosingPolicy.chooseVolume(volumes,
maxSize);
+ containerVolume = storageType == null
Review Comment:
nit: Is this branch transitional? Once all VolumeChoosingPolicy impls extend
AbstractStorageTypeChoosingPolicy, chooseVolume(v, s, null) already routes
correctly — so the storageType == null arm looks unreachable. Happy to drop
this if it's cleaned up in a later patch of the series.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java:
##########
@@ -47,6 +48,16 @@ public interface Container<CONTAINERDATA extends
ContainerData> {
void create(VolumeSet volumeSet, VolumeChoosingPolicy volumeChoosingPolicy,
String scmId) throws StorageContainerException;
+ /**
+ * Creates a container and optionally constrains the destination volume to a
+ * specific storage type.
+ */
+ default void create(VolumeSet volumeSet,
Review Comment:
nit: Is the default here transitional — i.e., does a later patch in the
series make it abstract (or remove the 3-arg overload) once all Container impls
have moved over? Asking because today the default silently drops storageType.
Happy to drop this if it tightens up later.
--
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]