You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/27 16:39:17 UTC
[GitHub] [ozone] tanvipenumudy opened a new pull request, #3561: HDDS-6879. Bucket layout as null on default layout type
tanvipenumudy opened a new pull request, #3561:
URL: https://github.com/apache/ozone/pull/3561
## What changes were proposed in this pull request?
As per a recent change to add Bucket Layout information while creating bucket: [HDDS-6811](https://issues.apache.org/jira/browse/HDDS-6811) (PR [#3479](https://github.com/apache/ozone/pull/3479)), the information is displayed as expected when we pass a parameter for `--layout` but is displayed as `null` when we don't pass any.
It should rather print the default bucket layout type and should not rely on the user params.
```
root@st-ozone-sq1qpy-p9xm2:/ansible# /opt/cloudera/parcels/CDH/bin/ozone sh bucket create o3://ozone1/vol-1/buck-1
2022-06-13 17:37:30,582 [main] INFO rpc.RpcClient (RpcClient.java:createBucket(666)) - Creating Bucket: vol-1/buck-1, with the Bucket Layout null, hrt_qa as owner, Versioning false, Storage Type set to DISK and Encryption set to false
22/06/13 17:37:30 INFO rpc.RpcClient: Creating Bucket: vol-1/buck-1, with the Bucket Layout null, hrt_qa as owner, Versioning false, Storage Type set to DISK and Encryption set to false
root@st-ozone-sq1qpy-p9xm2:/ansible# /opt/cloudera/parcels/CDH/bin/ozone sh bucket info o3://ozone1/vol-1/buck-1
{
"metadata" : { },
"volumeName" : "vol-1",
"name" : "buck-1",
"storageType" : "DISK",
"versioning" : false,
"usedBytes" : 0,
"usedNamespace" : 0,
"creationTime" : "2022-06-13T17:37:30.596Z",
"modificationTime" : "2022-06-13T17:37:30.596Z",
"quotaInBytes" : -1,
"quotaInNamespace" : -1,
"bucketLayout" : "LEGACY",
"owner" : "hrt_qa",
"link" : false
}
root@st-ozone-sq1qpy-p9xm2:/ansible# /opt/cloudera/parcels/CDH/bin/ozone sh bucket create o3://ozone1/vol-1/buck-2 --layout OBJECT_STORE
2022-06-13 17:42:28,032 [main] INFO rpc.RpcClient (RpcClient.java:createBucket(666)) - Creating Bucket: vol-1/buck-2, with the Bucket Layout OBJECT_STORE, hrt_qa as owner, Versioning false, Storage Type set to DISK and Encryption set to false
22/06/13 17:42:28 INFO rpc.RpcClient: Creating Bucket: vol-1/buck-2, with the Bucket Layout OBJECT_STORE, hrt_qa as owner, Versioning false, Storage Type set to DISK and Encryption set to false
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6879
## How was this patch tested?
NA
--
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
[GitHub] [ozone] adoroszlai commented on pull request #3561: HDDS-6879. Bucket layout as null on default layout type
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3561:
URL: https://github.com/apache/ozone/pull/3561#issuecomment-1171514914
Thanks @tanvipenumudy for the patch.
--
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
[GitHub] [ozone] tanvipenumudy commented on a diff in pull request #3561: HDDS-6879. Bucket layout as null on default layout type
Posted by GitBox <gi...@apache.org>.
tanvipenumudy commented on code in PR #3561:
URL: https://github.com/apache/ozone/pull/3561#discussion_r908011277
##########
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:
Noted, I have removed it, thanks!
--
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
[GitHub] [ozone] adoroszlai merged pull request #3561: HDDS-6879. Bucket layout as null on default layout type
Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #3561:
URL: https://github.com/apache/ozone/pull/3561
--
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
[GitHub] [ozone] adoroszlai commented on a diff in pull request #3561: HDDS-6879. Bucket layout as null on default layout type
Posted by GitBox <gi...@apache.org>.
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: 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
[GitHub] [ozone] tanvipenumudy commented on a diff in pull request #3561: HDDS-6879. Bucket layout as null on default layout type
Posted by GitBox <gi...@apache.org>.
tanvipenumudy commented on code in PR #3561:
URL: https://github.com/apache/ozone/pull/3561#discussion_r908011702
##########
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:
I have made the changes, thank you for reviewing!
--
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