Author: enis Date: Fri Apr 19 21:32:00 2013 New Revision: 1470048 URL: http://svn.apache.org/r1470048 Log: HBASE-8377 IntegrationTestBigLinkedList calculates wrap for linked list size incorrectly
Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1470048&r1=1470047&r2=1470048&view=diff ============================================================================== --- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original) +++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Fri Apr 19 21:32:00 2013 @@ -321,7 +321,7 @@ public class IntegrationTestBigLinkedLis table = new HTable(conf, getTableName(conf)); table.setAutoFlush(false); table.setWriteBufferSize(4 * 1024 * 1024); - numNodes = context.getConfiguration().getLong(GENERATOR_NUM_MAPPERS_KEY, 25000000); + numNodes = context.getConfiguration().getLong(GENERATOR_NUM_ROWS_PER_MAP_KEY, 25000000); if (numNodes < 25000000) { wrap = numNodes; } @@ -373,8 +373,8 @@ public class IntegrationTestBigLinkedLis Put put = new Put(Bytes.toBytes(current[i])); put.add(FAMILY_NAME, COLUMN_PREV, Bytes.toBytes(prev == null ? -1 : prev[i])); - if (count > 0) { - put.add(FAMILY_NAME, COLUMN_COUNT, Bytes.toBytes(count + 1)); + if (count >= 0) { + put.add(FAMILY_NAME, COLUMN_COUNT, Bytes.toBytes(count + i)); } if (id != null) { put.add(FAMILY_NAME, COLUMN_CLIENT, id); @@ -900,12 +900,18 @@ public class IntegrationTestBigLinkedLis node.key = Bytes.toLong(result.getRow()); if (result.containsColumn(FAMILY_NAME, COLUMN_PREV)) { node.prev = Bytes.toLong(result.getValue(FAMILY_NAME, COLUMN_PREV)); + } else { + node.prev = -1; } if (result.containsColumn(FAMILY_NAME, COLUMN_COUNT)) { node.count = Bytes.toLong(result.getValue(FAMILY_NAME, COLUMN_COUNT)); + } else { + node.count = -1; } if (result.containsColumn(FAMILY_NAME, COLUMN_CLIENT)) { node.client = Bytes.toString(result.getValue(FAMILY_NAME, COLUMN_CLIENT)); + } else { + node.client = ""; } return node; }