Skip to content

Conversation

@tanvipenumudy
Copy link
Contributor

What changes were proposed in this pull request?

As per a recent change to add Bucket Layout information while creating bucket: HDDS-6811 (PR #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

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tanvipenumudy for updating the patch, LGTM.

@adoroszlai adoroszlai requested a review from rakeshadr June 28, 2022 04:37
@adoroszlai adoroszlai merged commit 38c2ff3 into apache:master Jun 30, 2022
@adoroszlai
Copy link
Contributor

Thanks @tanvipenumudy for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants