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:32:49 UTC

svn commit: r1470049 - /hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java

Author: enis
Date: Fri Apr 19 21:32:49 2013
New Revision: 1470049

URL: http://svn.apache.org/r1470049
Log:
HBASE-8377 IntegrationTestBigLinkedList calculates wrap for linked list size incorrectly

Modified:
    hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java

Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1470049&r1=1470048&r2=1470049&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original)
+++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Fri Apr 19 21:32:49 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;
   }