hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Yuan Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-13711) Provide an API to set min and max versions in
Date Tue, 19 May 2015 08:00:00 GMT
Stephen Yuan Jiang created HBASE-13711:

             Summary: Provide an API to set min and max versions in 
                 Key: HBASE-13711
                 URL: https://issues.apache.org/jira/browse/HBASE-13711
             Project: HBase
          Issue Type: Bug
    Affects Versions: 1.1.0, 2.0.0, 1.2.0
            Reporter: Stephen Yuan Jiang
            Assignee: Stephen Yuan Jiang
            Priority: Minor

In org.apache.hadoop.hbase.chaos.actions.ChangeVersionsAction#perform(), it tries to update
the max and min versions in a column descriptor: 

     for(HColumnDescriptor descriptor:columnDescriptors) {

If the current minimum version is greater than the new max version, an IllegalArgumentException
would throw from org.apache.hadoop.hbase.HColumnDescriptor#setMaxVersions().  

Here is an example (trying to set max version to 1 while currently min version is 2):
java.lang.IllegalArgumentException: Set MaxVersion to 1 while minVersion is 2. Maximum versions
must be >= minimum versions
at org.apache.hadoop.hbase.HColumnDescriptor.setMaxVersions(HColumnDescriptor.java:634)
at org.apache.hadoop.hbase.chaos.actions.ChangeVersionsAction.perform(ChangeVersionsAction.java:62)

One solution is to change the order of set - set min version first and then set max version
(note: the current implement of org.apache.hadoop.hbase.HColumnDescriptor#setMinVersions()
does not check the min version value and blindly set the version.  Not sure whether this is

Another solution is to provide an API to set both min and max version in one function call.

This message was sent by Atlassian JIRA

View raw message