You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Rakesh Radhakrishnan (Jira)" <ji...@apache.org> on 2022/02/02 12:26:00 UTC

[jira] [Commented] (HDDS-6246) Ozone sh key list on OBJECT_STORE bucket

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

Rakesh Radhakrishnan commented on HDDS-6246:
--------------------------------------------

*Analysis:*

It seems the intermediate directories getting created into the KeyTable. In OBJECT_STORE bucket, ideally only the key path should be added into KeyTable. 
{code:java}
 [systest@rak-sample-5 om.db]$ ozone debug ldb --db=/var/lib/hadoop-ozone/om/data/om.db/ scan --column_family=keyTable | grep "keyName"

  "keyName": "1/",
  "keyName": "1/2/",
  "keyName": "1/2/3/",
  "keyName": "1/2/3/4/",
  "keyName": "1/2/3/4/test.txt",
  "keyName": "a/",
  "keyName": "a/b/",
  "keyName": "a/b/c/",
  "keyName": "a/b/c/d/",
  "keyName": "a/b/c/d/test.txt",
{code}
 

> Ozone sh key list on OBJECT_STORE bucket
> ----------------------------------------
>
>                 Key: HDDS-6246
>                 URL: https://issues.apache.org/jira/browse/HDDS-6246
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Rakesh Radhakrishnan
>            Assignee: Jyotinder Singh
>            Priority: Major
>
> *Expected behavior :* Listing keys in OBS bucket shouldn't have the intermediate directories.
> But the below commands shows interm directories.
>  "name" : "a/", "name" : "a/b/", "name" : "a/b/c/", "name" : "a/b/c/d/", Need to remove these items from the output.
> {code:java}
> [root@sample-1 ~]# ozone sh bucket info vol1/obsbuck1
> {
>   "metadata" : { },
>   "volumeName" : "vol1",
>   "name" : "obsbuck1",
>   "storageType" : "DISK",
>   "versioning" : false,
>   "usedBytes" : 69,
>   "usedNamespace" : 1,
>   "creationTime" : "2022-01-28T11:28:17.849Z",
>   "modificationTime" : "2022-01-28T11:28:17.849Z",
>   "quotaInBytes" : -1,
>   "quotaInNamespace" : -1,
>   "bucketLayout" : "OBJECT_STORE",
>   "link" : false
> }
> [root@sample-1 ~]# ozone sh key list vol1/obsbuck1 | grep "name"
>   "name" : "testroot/",
> [root@sample-1 ~]# ozone sh key put vol1/obsbuck1/a/b/c/d/test.txt /tmp/datafile 
> [root@sample-1 ~]# ozone sh key list vol1/obsbuck1 | grep "name"
>   "name" : "a/",
>   "name" : "a/b/",
>   "name" : "a/b/c/",
>   "name" : "a/b/c/d/",
>   "name" : "a/b/c/d/test.txt",
>   "name" : "testroot/",
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org