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 Wed, 07 Jun 2017 04:20:18 GMT

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

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

This is the doc from RocksDB, could levelDB be same?

bq.  A Snapshot API allows an application to create a point-in-time view of a database. The
Get and Iterator APIs can be used to read data from a specified snapshot. In a sense, a Snapshot
and an Iterator both provide a point-in-time view of the database, but their implementations
are different. Short lived scans are best done via an iterator while long-running scans are
better done via a snapshot. An iterator keeps a reference count on all underlying files that
correspond to that point-in-time-view of the database - these files are not deleted until
the Iterator is released. A snapshot, on the other hand, does not prevent file deletions;
instead the compaction process understands the existence of snapshots and promises never to
delete a key that is visible in any existing snapshot.

If levelDB is the same, then iterator should be enough for getRangKVs function, as this should
be a short lived scan, actually more consistent (prevent file deletions).

> 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,
HDFS-11926-HDFS-7240.003.patch, HDFS-11926-HDFS-7240.004.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