You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2009/06/16 23:06:01 UTC

svn commit: r785401 - in /hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase: HBaseTestCase.java client/TestOldAPITimestamp.java client/TestTimestamp.java

Author: apurtell
Date: Tue Jun 16 21:06:01 2009
New Revision: 785401

URL: http://svn.apache.org/viewvc?rev=785401&view=rev
Log:
testcase fixes

Modified:
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestOldAPITimestamp.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java?rev=785401&r1=785400&r2=785401&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java Tue Jun 16 21:06:01 2009
@@ -58,9 +58,9 @@
   /** configuration parameter name for test directory */
   public static final String TEST_DIRECTORY_KEY = "test.build.data";
 
-  protected final static byte [] fam1 = Bytes.toBytes("colfamily1");
-  protected final static byte [] fam2 = Bytes.toBytes("colfamily2");
-  protected final static byte [] fam3 = Bytes.toBytes("colfamily3");
+  protected final static byte [] fam1 = Bytes.toBytes("colfamily1:");
+  protected final static byte [] fam2 = Bytes.toBytes("colfamily2:");
+  protected final static byte [] fam3 = Bytes.toBytes("colfamily3:");
   protected static final byte [][] COLUMNS = {fam1,
     fam2, fam3};
 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestOldAPITimestamp.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestOldAPITimestamp.java?rev=785401&r1=785400&r2=785401&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestOldAPITimestamp.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestOldAPITimestamp.java Tue Jun 16 21:06:01 2009
@@ -24,6 +24,7 @@
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TimestampTestBase;
+import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Tests user specifiable time stamps putting, getting and scanning.  Also
@@ -31,7 +32,7 @@
  * run against an HRegion and against an HTable: i.e. both local and remote.
  */
 public class TestOldAPITimestamp extends HBaseClusterTestCase {
-  private static final String COLUMN_NAME = "contents:";
+  public static byte[] COLUMN_NAME = Bytes.toBytes("contents:");
 
   /**
    * Basic test of timestamps.
@@ -63,6 +64,9 @@
    */
   private HTable createTable() throws IOException {
     HTableDescriptor desc = new HTableDescriptor(getName());
+    for (byte[] col: COLUMNS) {
+      desc.addFamily(new HColumnDescriptor(col));
+    }
     desc.addFamily(new HColumnDescriptor(COLUMN_NAME));
     HBaseAdmin admin = new HBaseAdmin(conf);
     admin.createTable(desc);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java?rev=785401&r1=785400&r2=785401&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java Tue Jun 16 21:06:01 2009
@@ -24,6 +24,7 @@
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TimestampTestBase;
+import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Tests user specifiable time stamps putting, getting and scanning.  Also
@@ -31,7 +32,7 @@
  * run against an HRegion and against an HTable: i.e. both local and remote.
  */
 public class TestTimestamp extends HBaseClusterTestCase {
-  private static final String COLUMN_NAME = "contents:";
+  public static byte[] COLUMN_NAME = Bytes.toBytes("contents:");
   
   /** constructor */
   public TestTimestamp() {
@@ -68,6 +69,9 @@
    */
   private HTable createTable() throws IOException {
     HTableDescriptor desc = new HTableDescriptor(getName());
+    for (byte[] col: COLUMNS) {
+      desc.addFamily(new HColumnDescriptor(col));
+    }
     desc.addFamily(new HColumnDescriptor(COLUMN_NAME));
     HBaseAdmin admin = new HBaseAdmin(conf);
     admin.createTable(desc);