nandakumar131 commented on code in PR #7654:
URL: https://github.com/apache/ozone/pull/7654#discussion_r1904919464
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -190,6 +191,13 @@ public KeyValueHandler(ConfigurationSource config,
byteBufferToByteString =
ByteStringConversion
.createByteBufferConversion(isUnsafeByteBufferConversionEnabled);
+
+ if (ContainerLayoutVersion.getConfiguredVersion(conf) ==
+ ContainerLayoutVersion.FILE_PER_CHUNK) {
+ LOG.warn("FILE_PER_CHUNK layout is deprecated. Update to
FILE_PER_BLOCK.");
+
OzoneConfiguration.of(conf).set(ScmConfigKeys.OZONE_SCM_CONTAINER_LAYOUT_KEY,
Review Comment:
If we are setting `OZONE_SCM_CONTAINER_LAYOUT_KEY` to `FILE_PER_BLOCK` in
the code, we are actually removing support for `FILE_PER_CHUNK` not deprecating
it.
With this change, there is no way to use `FILE_PER_CHUNK` anymore. Can we at
least log a clear WARN message stating that the value of
`OZONE_SCM_CONTAINER_LAYOUT_KEY` is getting overwritten in the code?
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -190,6 +191,13 @@ public KeyValueHandler(ConfigurationSource config,
byteBufferToByteString =
ByteStringConversion
.createByteBufferConversion(isUnsafeByteBufferConversionEnabled);
+
+ if (ContainerLayoutVersion.getConfiguredVersion(conf) ==
+ ContainerLayoutVersion.FILE_PER_CHUNK) {
+ LOG.warn("FILE_PER_CHUNK layout is deprecated. Update to
FILE_PER_BLOCK.");
+
OzoneConfiguration.of(conf).set(ScmConfigKeys.OZONE_SCM_CONTAINER_LAYOUT_KEY,
+ "FILE_PER_BLOCK");
Review Comment:
If we are setting `OZONE_SCM_CONTAINER_LAYOUT_KEY` to `FILE_PER_BLOCK` in
the code, we are actually removing support for `FILE_PER_CHUNK` not deprecating
it.
With this change, there is no way to use `FILE_PER_CHUNK` anymore. Can we at
least log a clear WARN message stating that the value of
`OZONE_SCM_CONTAINER_LAYOUT_KEY` is getting overwritten in 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: [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]