You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2013/04/19 23:33:44 UTC
svn commit: r1470050 -
/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
Author: enis
Date: Fri Apr 19 21:33:44 2013
New Revision: 1470050
URL: http://svn.apache.org/r1470050
Log:
HBASE-8377 IntegrationTestBigLinkedList calculates wrap for linked list size incorrectly
Modified:
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1470050&r1=1470049&r2=1470050&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Fri Apr 19 21:33:44 2013
@@ -322,7 +322,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;
}
@@ -374,8 +374,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);
@@ -901,12 +901,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;
}