hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r604999 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/test/org/apache/hadoop/hbase/TestHBaseCluster.java
Date Mon, 17 Dec 2007 20:53:49 GMT
Author: jimk
Date: Mon Dec 17 12:53:45 2007
New Revision: 604999

URL: http://svn.apache.org/viewvc?rev=604999&view=rev
Log:
HADOOP-2441 Fix build failures in TestHBaseCluster

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=604999&r1=604998&r2=604999&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Mon Dec 17 12:53:45 2007
@@ -83,6 +83,7 @@
    HADOOP-2414 Fix ArrayIndexOutOfBoundsException in bloom filters.
    HADOOP-2430 Master will not shut down if there are no active region servers
    HADOOP-2199 Add tools for going from hregion filename to region name in logs
+   HADOOP-2441 Fix build failures in TestHBaseCluster
    
   IMPROVEMENTS
    HADOOP-2401 Add convenience put method that takes writable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java?rev=604999&r1=604998&r2=604999&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java
Mon Dec 17 12:53:45 2007
@@ -25,8 +25,6 @@
 import java.util.TreeMap;
 
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
 
 /**
  * Test HBase Master and Region servers, client API 
@@ -43,7 +41,6 @@
     this.desc = null;
     this.admin = null;
     this.table = null;
-    Logger.getRootLogger().setLevel(Level.INFO);
 
     // Make the thread wake frequency a little slower so other threads
     // can run
@@ -116,19 +113,22 @@
       Text rowlabel = new Text("row_" + k);
 
       byte bodydata[] = table.get(rowlabel, CONTENTS_BASIC);
-      assertNotNull("no data for row " + rowlabel, bodydata);
-      String bodystr = new String(bodydata, HConstants.UTF8_ENCODING).trim();
+      assertNotNull("no data for row " + rowlabel + "/" + CONTENTS_BASIC,
+          bodydata);
+      String bodystr = new String(bodydata, HConstants.UTF8_ENCODING);
       String teststr = CONTENTSTR + k;
-      assertEquals("Incorrect value for key: (" + rowlabel + "," + CONTENTS_BASIC
-          + "), expected: '" + teststr + "' got: '" + bodystr + "'",
-          bodystr, teststr);
+      assertTrue("Incorrect value for key: (" + rowlabel + "/" +
+          CONTENTS_BASIC + "), expected: '" + teststr + "' got: '" +
+          bodystr + "'", teststr.compareTo(bodystr) == 0);
+      
       collabel = new Text(ANCHORNUM + k);
       bodydata = table.get(rowlabel, collabel);
-      bodystr = new String(bodydata, HConstants.UTF8_ENCODING).trim();
+      assertNotNull("no data for row " + rowlabel + "/" + collabel, bodydata);
+      bodystr = new String(bodydata, HConstants.UTF8_ENCODING);
       teststr = ANCHORSTR + k;
-      assertEquals("Incorrect value for key: (" + rowlabel + "," + collabel
-          + "), expected: '" + teststr + "' got: '" + bodystr + "'",
-          bodystr, teststr);
+      assertTrue("Incorrect value for key: (" + rowlabel + "/" + collabel +
+          "), expected: '" + teststr + "' got: '" + bodystr + "'",
+          teststr.compareTo(bodystr) == 0);
     }
 
     System.out.println("Read " + NUM_VALS + " rows. Elapsed time: "



Mime
View raw message