hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weiwei Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11926) Ozone: Implement a common helper to return a range of KVs in levelDB
Date Tue, 06 Jun 2017 11:09:18 GMT

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

Weiwei Yang commented on HDFS-11926:
------------------------------------

Thanks [~yuanbo], both are good comments.

bq. It's a bit confusing that both startKey and PreKeyFilter are given while invoking this
method.

I have removed PreKeyFilter to avoid confusing in latest patch. I was like following. For
example we have keys "a", "b", "c", "d",

There was a tiny different between this two

# By specifying {{startKey}} to "b", it returns "b", "c", "d"
# By using {{PreKeyFilter}} with preKey "b", it returns "c", "d"

But like you said, this is little helpful and causes confusion. I decided to remove the preKey
filter, so let it be simpler in API level. Which means in LIST apis, we allow user to specify
a {{start key}}, the result will return entries marked by this key and all the entries after
this key. I studied amazon list object request, [http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ListObjectsV2Request.html],
it has similar semantic.

bq. If the startKey is not a existing key(not null or empty), the getRangeKVs method returns
the whole keys, would it be better to return an empty list here?

In latest patch, this will throw an exception saying that key is not found.

Thanks


> Ozone: Implement a common helper to return a range of KVs in levelDB
> --------------------------------------------------------------------
>
>                 Key: HDFS-11926
>                 URL: https://issues.apache.org/jira/browse/HDFS-11926
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>            Priority: Blocker
>         Attachments: HDFS-11926-HDFS-7240.001.patch, HDFS-11926-HDFS-7240.002.patch
>
>
> There are quite some *LIST* operations need to get a range of keys or values from levelDB,
and filter entries with key prefix. 
> # HDFS-11782 listKeys
> # HDFS-11779 listBuckets
> # HDFS-11773 listVolumes
> # HDFS-11679 listContainers
> we need to implement a common utility for them.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message