[
https://issues.apache.org/jira/browse/HDFS-11779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16024972#comment-16024972
]
Weiwei Yang commented on HDFS-11779:
------------------------------------
V1 patch attached, please kindly review. Some notes for reviewers
1. Please read {{TestKeySpaceManager#testListBuckets}} to see how
{{listBuckets}} api is used. The volume name is required, rest of arguments are
optional. I tried to include as many as combinations when specifying arguments.
2. To be able to query buckets under constrain of {{ListArgs}} arguments, I
have created a helper method in {{LevelDBStore}}, which is
{code}
public List<Entry<byte[], byte[]>> getRangeKVs(@Nullable byte[] startKey,
int count, LevelDBKeyFilter... filters) throws IOException
{code}
this helps to get a range of entries from DB based on the conditions. It should
be able to be reused in other api implementation such as listVolumes, or any
other one involves to search a range of keys. I have created a test class to
test this api, see {{TestLevelDBStore#testGetRangeKVs}}.
Hope this helps. Thanks.
> Ozone: KSM: add listBuckets
> ---------------------------
>
> Key: HDFS-11779
> URL: https://issues.apache.org/jira/browse/HDFS-11779
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Anu Engineer
> Assignee: Weiwei Yang
> Attachments: HDFS-11779-HDFS-7240.001.patch
>
>
> Lists buckets of a given volume. Similar to listVolumes, paging supported via
> prevKey, prefix and maxKeys.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]