hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: Not able to change the VERSION of hbase row
Date Wed, 16 Nov 2011 19:02:12 GMT

Also, there is a versioned Get example here...

http://hbase.apache.org/book.html#get







On 11/16/11 12:34 PM, "Jean-Daniel Cryans" <jdcryans@apache.org> wrote:

>You need to tell the Get or Scan to fetch more versions. For example,
>the help for the get commands gives this example:
>
>  hbase> get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => [ts1, ts2],
>VERSIONS => 4}
>
>In the API you would use
>http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Get.html#se
>tMaxVersions(int)
>
>Hope this helps,
>
>J-D
>
>On Wed, Nov 16, 2011 at 6:41 AM, Vamshi Krishna <vamshi2105@gmail.com>
>wrote:
>> Hi,
>> i am trying to create and inserting data to hbase table. when i wanted
>>to
>> change the maximum number of versions of row in hbase from default to
>>1, it
>> worked well, i.e whenever i add new row to table, the latest value is
>>seen.
>> But when i tried to change using hbase shell like the following i
>>couldn't
>> increase the number of versions to be stored to 4.
>>
>> hbase shell command:      i disabled the table---> disable 'T'
>>
>> alter 'T', {NAME => 'F', VERSIONS => 4}
>>
>> enable 'T'
>>
>> now i scanned the table after inserting the same row with different
>>values
>> 3 times. Still i could see only the last inserted row only..  i tried
>>even
>> changing the maximum number of versions using
>>    HColumnDescriptor hcd= new HColumnDescriptor("F");
>>   F.setMaxVersions(4);
>>
>>
>> Still i could not change the number of versions to be maintained for any
>> roe , even for any newly created tables also..
>>
>> Please can anybody help..?
>>
>>
>>
>> --
>> *Regards*
>> *
>> Vamshi Krishna
>> *
>>
>



Mime
View raw message