adoroszlai commented on code in PR #3561:
URL: https://github.com/apache/ozone/pull/3561#discussion_r907592937
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -663,11 +667,20 @@ public void createBucket(
builder.setDefaultReplicationConfig(defaultReplicationConfig);
}
- LOG.info("Creating Bucket: {}/{}, with the Bucket Layout {}, {} as " +
- "owner, Versioning {}, Storage Type set to {} and Encryption set "
+
- "to {} ",
- volumeName, bucketName, bucketLayout, owner, isVersionEnabled,
- storageType, bek != null);
+ if (bucketLayout != null) {
+ LOG.info("Creating Bucket: {}/{}, with the Bucket Layout {}, {} as " +
+ "owner, Versioning {}, Storage Type set to {} and Encryption " +
+ "set to {} ",
+ volumeName, bucketName, bucketLayout, owner, isVersionEnabled,
+ storageType, bek != null);
+ } else {
+ LOG.info("Creating Bucket: {}/{}, with the Bucket Layout {} - set to" +
+ "OM server default using the configuration: " +
+ "ozone.default.bucket.layout, {} as owner, Versioning {}, " +
+ "Storage Type set to {} and Encryption set to {} ",
+ volumeName, bucketName, defaultBucketLayout, owner, isVersionEnabled,
+ storageType, bek != null);
+ }
Review Comment:
```suggestion
String layoutMsg = bucketLayout != null
? "with bucket layout " + bucketLayout
: "with server-side default bucket layout";
LOG.info("Creating Bucket: {}/{}, {}, {} as owner, Versioning {}, " +
"Storage Type set to {} and Encryption set to {} ",
volumeName, bucketName, layoutMsg, owner, isVersionEnabled,
storageType, bek != null);
```
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -308,6 +309,9 @@ public RpcClient(ConfigurationSource conf, String
omServiceId)
getLatestVersionLocation = conf.getBoolean(
OzoneConfigKeys.OZONE_CLIENT_KEY_LATEST_VERSION_LOCATION,
OzoneConfigKeys.OZONE_CLIENT_KEY_LATEST_VERSION_LOCATION_DEFAULT);
+ defaultBucketLayout = conf.getTrimmed(
+ OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT,
+ OMConfigKeys.OZONE_DEFAULT_BUCKET_LAYOUT_DEFAULT);
Review Comment:
This reflects the client-side configuration. If OM has different config,
the log message will be misleading. I think it may be better to simply not
include bucket layout in the message when relying on server-side default layout.
--
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]