hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-621) Make MAX_VERSIONS work like TTL: In scans and gets, check MAX_VERSIONs setting and return that many only rather than wait on compaction
Date Tue, 20 May 2008 15:12:55 GMT

    [ https://issues.apache.org/jira/browse/HBASE-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598322#action_12598322
] 

Jean-Daniel Cryans commented on HBASE-621:
------------------------------------------

Another problem with versions. Take a look at :

{code}
  /**
   * Get the value for the indicated HStoreKey.  Grab the target value and the 
   * previous 'numVersions-1' values, as well.
   *
   * If 'numVersions' is negative, the method returns all available versions.
   * @param key
   * @param numVersions Number of versions to fetch.  Must be > 0.
   * @return values for the specified versions
   * @throws IOException
   */
  Cell[] get(HStoreKey key, int numVersions) throws IOException {
    if (numVersions <= 0) {
      throw new IllegalArgumentException("Number of versions must be > 0");
    }
{code}

If 'numVersions', it will throw a IllegalArgumentException and we will not get all versions.
As recommended by Bryan, I will add a new constant like HConstants.ALL_VERSIONS = Integer.MAX_VALUE
and change the comments.

> Make MAX_VERSIONS work like TTL: In scans and gets, check MAX_VERSIONs setting and return
that many only rather than wait on compaction
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-621
>                 URL: https://issues.apache.org/jira/browse/HBASE-621
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: stack
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.2.0
>
>
> HBASE-47 added specification of TTL on cells.  The implementation checks cell timestamp
against configured TTL before returning results scanning or getting.  You can also set the
maximum versions of a cell to keep.  The maximum versions is not checked scanning or getting,
only when we compact (We'll drop cells that are beyond the maximum version at compaction time).
 This issue is about adding check for maximum versions to gets and scans so that if you ask
for all versions but have configured the store to only keep 3 versions, though 4 may have
been inserted, you'll currently get 4 returned (if compactions have not had a chance to run).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message