hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mukul Kumar Singh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12506) Ozone: ListBucket is too slow
Date Thu, 21 Sep 2017 09:26:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-12506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174499#comment-16174499

Mukul Kumar Singh commented on HDFS-12506:

Thanks for working on this [~cheersyang], the patch looks really good to me, some minor nitpicks

1) OzoneConsts.java: Should be list all the format of Metadata key for volume, bucket and
key in here ? This will help in readability of the code.
2) KSMMetadataManagerImpl.java:245, should isBucketEmpty be similar to isVolumeEmpty ? I feel
we can append the OzoneConsts.KSM_KEY_PREFIX to keyRootName, this will make the code similar
in both the functions

> Ozone: ListBucket is too slow
> -----------------------------
>                 Key: HDFS-12506
>                 URL: https://issues.apache.org/jira/browse/HDFS-12506
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>            Priority: Blocker
>              Labels: ozoneMerge, performance
>         Attachments: HDFS-12506-HDFS-7240.001.patch
> Generated 3 million keys in ozone, and run {{listBucket}} command to get a list of buckets
under a volume,
> {code}
> bin/hdfs oz -listBucket http://15oz1.fyre.ibm.com:9864/vol-0-15143 -user wwei
> {code}
> this call spent over *15 seconds* to finish. The problem was caused by the inflexible
structure of KSM DB. Right now {{ksm.db}} stores keys like following
> {code}
> /v1/b1
> /v1/b1/k1
> /v1/b1/k2
> /v1/b1/k3
> /v1/b2
> /v1/b2/k1
> /v1/b2/k2
> /v1/b2/k3
> /v1/b3
> /v1/b4
> {code}
> keys are sorted in nature order so when we do list buckets under a volume e.g /v1, we
need to seek to /v1 point and start to iterate and filter keys, this ends up with scanning
all keys under volume /v1. The problem with this design is we don't have an efficient approach
to locate all buckets without scanning the keys.

This message was sent by Atlassian JIRA

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

View raw message