[
https://issues.apache.org/jira/browse/HDDS-9396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18154910#comment-18154910
]
Wei-Chiu Chuang commented on HDDS-9396:
---------------------------------------
Closing under epic HDDS-17671 triage — the practical ask (find buckets that
have snapshots) is already covered without adding a per-bucket boolean to
bucket info/list JSON.
*What shipped:* {{ListBucketsRequest.hasSnapshot}} and {{ozone sh bucket ls
--has-snapshot}} filter buckets by snapshot presence. Integration coverage
exists in {{OzoneRpcClientTests#testListBucket}}.
*Alternatives for single-bucket checks:* {{ozone sh snapshot count}} (per
volume/bucket filter) and listing snapshots for the bucket.
*What this ticket still asked for:* a {{hasSnapshot}} (or equivalent) field on
every bucket object in {{bucket info}} / normal {{bucket ls}} output. That
would duplicate the filter and count APIs and {{snapshotUsedBytes}} is not a
reliable indicator.
No further API work planned unless a concrete consumer needs the field on the
bucket JSON specifically.
> [snapshot] Bucket info/list should have a property showing whether it has
> snapshots or not
> ------------------------------------------------------------------------------------------
>
> Key: HDDS-9396
> URL: https://issues.apache.org/jira/browse/HDDS-9396
> Project: Apache Ozone
> Issue Type: Improvement
> Components: Ozone CLI, Snapshot
> Reporter: Jyotirmoy Sinha
> Assignee: Swaminathan Balachandran
> Priority: Trivial
> Labels: ozone-snapshot
>
> Bucket info/list should have a property showing whether it has snapshots or
> not
> Bucket info -
> {code:java}
> [root@quasar-ihzxuo-1 ~]# ozone sh bucket ls vol-4mez4 --has-snapshot
> [ {
> "metadata" : { },
> "volumeName" : "vol-4mez4",
> "name" : "buck1",
> "storageType" : "DISK",
> "versioning" : false,
> "usedBytes" : 0,
> "usedNamespace" : 0,
> "creationTime" : "2023-10-06T06:43:07.174Z",
> "modificationTime" : "2023-10-06T06:43:07.174Z",
> "sourcePathExist" : true,
> "quotaInBytes" : -1,
> "quotaInNamespace" : -1,
> "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
> "owner" : "om",
> "link" : false
> } ]
> [root@quasar-ihzxuo-1 ~]# ozone sh bucket info vol-4mez4/buck1
> {
> "metadata" : { },
> "volumeName" : "vol-4mez4",
> "name" : "buck1",
> "storageType" : "DISK",
> "versioning" : false,
> "usedBytes" : 0,
> "usedNamespace" : 0,
> "creationTime" : "2023-10-06T06:43:07.174Z",
> "modificationTime" : "2023-10-06T06:43:07.174Z",
> "sourcePathExist" : true,
> "quotaInBytes" : -1,
> "quotaInNamespace" : -1,
> "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
> "owner" : "om",
> "link" : false
> } {code}
> It would be an extension of feature 'bucket ls --has-snapshot'.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]