[ 
https://issues.apache.org/jira/browse/HDDS-9396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781955#comment-17781955
 ] 

Hemant Kumar commented on HDDS-9396:
------------------------------------

[~jyosin] Can you please elaborate more on the usecase? I am trying to think if 
it is even useful improvement.

If you really need to know if specific bucket has snapshot, you can use --prefix

{code}
sh-4.2$ ozone sh bucket ls --prefix=buck1 --has-snapshot /vol1
[ {
  "metadata" : { },
  "volumeName" : "vol1",
  "name" : "buck1",
  "storageType" : "DISK",
  "versioning" : false,
  "usedBytes" : 12204,
  "usedNamespace" : 12,
  "creationTime" : "2023-11-01T22:49:53.559Z",
  "modificationTime" : "2023-11-01T22:53:13.262Z",
  "sourcePathExist" : true,
  "quotaInBytes" : -1,
  "quotaInNamespace" : -1,
  "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
  "owner" : "hadoop",
  "link" : false
} ]
{code}

> [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: Bug
>          Components: Ozone CLI, Snapshot
>            Reporter: Jyotirmoy Sinha
>            Assignee: Swaminathan Balachandran
>            Priority: Major
>              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
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to