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. Just confirming.
##########
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
+ ? volumeChoosingPolicy.chooseVolume(volumes, maxSize)
+ : volumeChoosingPolicy.chooseVolume(
+ volumes, maxSize, storageType);
hddsVolumeDir = containerVolume.getHddsRootDir().toString();
// Set volume before getContainerDBFile(), because we may need the
// volume to deduce the db file.
containerData.setVolume(containerVolume);
+ containerData.setStorageType(containerVolume.getStorageType());
Review Comment:
nit: same here, I guess. After we wire in storageType properly (without just
setting it to null), this line will make more sense.
--
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]