hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Rodionov <vrodio...@carrieriq.com>
Subject does append delete all cell versions except the last one?
Date Mon, 22 Jul 2013 23:17:55 GMT
I am doing some tests of append operation (HTable.append(Append append)) and it seems that
if cell being appended has multiple versions , all except the last one get deleted. Is it
correct behavior or I am doing something wrong in my tests?

The test is simple. I have a row with 3 CF and 3 qualifiers in each CF and 10 versions (total
# KVs stored for row is 90). I test append on the row
(for each CF:Qualifier combination)

public void testAppend()
                int index = 2;

                LOG.error("Test append started. Testing "+index+" row");

                byte[] row = data.get(index).get(0).getRow();
                byte[] toAppend = "APPEND".getBytes();
                LOG.error(" Append row: "+ new String(row));

                // Get all data for the row
                Get get = createGet(row, null, null, null);
                Result result = tableA.get(get);
                List<KeyValue> ll = result.list();
               // Correct list size is 3 (total families)*3 (total columns) *10 (# versions)
   = 90

               assertEquals( 90, ll.size() );

               // Do append to All 3 * 3 = 9 cells in a row
                Append append = createAppend(row, Arrays.asList(FAMILIES), Arrays.asList(COLUMNS),
                Result r = tableA.append(append);

                ll = r.list();
                assertEquals( 9, ll.size() );

                // Check row again
                get = createGet(row, null, null, null);

                result = tableA.get(get);

                assertEquals (90, result.size()); // This assertion FAILS: actual size is


Best regards,
Vladimir Rodionov
Principal Platform Engineer
Carrier IQ, www.carrieriq.com
e-mail: vrodionov@carrieriq.com

Confidentiality Notice:  The information contained in this message, including any attachments
hereto, may be confidential and is intended to be read only by the individual or entity to
whom this message is addressed. If the reader of this message is not the intended recipient
or an agent or designee of the intended recipient, please note that any review, use, disclosure
or distribution of this message or its attachments, in any form, is strictly prohibited. 
If you have received this message in error, please immediately notify the sender and/or Notifications@carrieriq.com
and delete or destroy any copy of this message and its attachments.

View raw message