You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ji...@apache.org on 2007/08/04 00:39:51 UTC

svn commit: r562608 [2/2] - in /lucene/hadoop/trunk/src/contrib/hbase: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/filter/ src/java/org/apache/hadoop/hbase/io/ src/java/org/apache/hadoop/hbase/mapred/ src/java/org/onelab/filte...

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/StaticTestEnvironment.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/StaticTestEnvironment.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/StaticTestEnvironment.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/StaticTestEnvironment.java Fri Aug  3 15:39:43 2007
@@ -29,12 +29,26 @@
 import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
 
+/**
+ * Initializes test environment
+ */
 public class StaticTestEnvironment {
-  private StaticTestEnvironment() {};                   // Not instantiable
+  private StaticTestEnvironment() {}                    // Not instantiable
 
+  /** configuration parameter name for test directory */
   public static final String TEST_DIRECTORY_KEY = "test.build.data";
+  
+  /** set to true if "DEBUGGING" is set in the environment */
   public static boolean debugging = false;
 
+  /**
+   * Initializes parameters used in the test environment:
+   * 
+   * Sets the configuration parameter TEST_DIRECTORY_KEY if not already set.
+   * Sets the boolean debugging if "DEBUGGING" is set in the environment.
+   * If debugging is enabled, reconfigures loggin so that the root log level is
+   * set to WARN and the logging level for the package is set to DEBUG.
+   */
   @SuppressWarnings("unchecked")
   public static void initialize() {
     String value = null;

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCompare.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCompare.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCompare.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCompare.java Fri Aug  3 15:39:43 2007
@@ -26,6 +26,7 @@
  * Test comparing HBase objects.
  */
 public class TestCompare extends TestCase {
+  /** test case */
   public void testHRegionInfo() {
     HRegionInfo a = new HRegionInfo(1, new HTableDescriptor("a"), null, null);
     HRegionInfo b = new HRegionInfo(2, new HTableDescriptor("b"), null, null);

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHLog.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHLog.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHLog.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHLog.java Fri Aug  3 15:39:43 2007
@@ -31,6 +31,7 @@
 /** JUnit test case for HLog */
 public class TestHLog extends HBaseTestCase implements HConstants {
 
+  /** {@inheritDoc} */
   @Override
   public void setUp() throws Exception {
     super.setUp();
@@ -103,6 +104,7 @@
     }
   }
 
+  /** {@inheritDoc} */
   @Override
   public void tearDown() throws Exception {
     super.tearDown();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeMeta.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeMeta.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeMeta.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeMeta.java Fri Aug  3 15:39:43 2007
@@ -22,6 +22,9 @@
 /** Tests region merging */
 public class TestMergeMeta extends AbstractMergeTestBase {
   
+  /**
+   * test case
+   */
   public void testMergeMeta() {
     try {
       HMerge.merge(conf, fs, HConstants.META_TABLE_NAME);

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeTable.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeTable.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeTable.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestMergeTable.java Fri Aug  3 15:39:43 2007
@@ -21,8 +21,15 @@
 
 import java.io.IOException;
 
+/**
+ * Tests merging a normal table's regions
+ */
 public class TestMergeTable extends AbstractMergeTestBase {
 
+  /**
+   * Test case
+   * @throws IOException
+   */
   public void testMergeTable() throws IOException {
     MiniHBaseCluster hCluster = new MiniHBaseCluster(conf, 1, dfsCluster);
     try {

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java Fri Aug  3 15:39:43 2007
@@ -22,7 +22,14 @@
 
 import junit.framework.TestCase;
 
+/**
+ * Tests toString methods.
+ */
 public class TestToString extends TestCase {
+  /**
+   * tests toString methods on HSeverAddress, HServerInfo
+   * @throws Exception
+   */
   public void testServerInfo() throws Exception {
     final String hostport = "127.0.0.1:9999";
     HServerAddress address = new HServerAddress(hostport);
@@ -32,6 +39,10 @@
         "address: " + hostport + ", startcode: " + -1);
   }
   
+  /**
+   * Tests toString method on HRegionInfo
+   * @throws Exception
+   */
   public void testHRegionInfo() throws Exception {
     HTableDescriptor htd = new HTableDescriptor("hank");
     htd.addFamily(new HColumnDescriptor("hankfamily:"));

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java Fri Aug  3 15:39:43 2007
@@ -28,20 +28,33 @@
 
 import junit.framework.TestCase;
 
+/**
+ * Tests for the page row filter
+ */
 public class TestPageRowFilter extends TestCase {
   
   RowFilterInterface mainFilter;
   final int ROW_LIMIT = 3;
   
+  /** {@inheritDoc} */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     mainFilter = new PageRowFilter(ROW_LIMIT);
   }
   
+  /**
+   * test page size filter
+   * @throws Exception
+   */
   public void testPageSize() throws Exception {
     pageSizeTests(mainFilter);
   }
   
+  /**
+   * Test filter serialization
+   * @throws Exception
+   */
   public void testSerialization() throws Exception {
     // Decompose mainFilter to bytes.
     ByteArrayOutputStream stream = new ByteArrayOutputStream();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java Fri Aug  3 15:39:43 2007
@@ -31,6 +31,9 @@
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Tests for regular expression row filter
+ */
 public class TestRegExpRowFilter extends TestCase {
   TreeMap<Text, byte []> colvalues;
   RowFilterInterface mainFilter;
@@ -39,6 +42,7 @@
   byte [] GOOD_BYTES = "abc".getBytes();
   final String HOST_PREFIX = "org.apache.site-";
   
+  /** {@inheritDoc} */
   @Override
   protected void setUp() throws Exception {
     super.setUp();
@@ -49,18 +53,34 @@
     this.mainFilter = new RegExpRowFilter(HOST_PREFIX + ".*", colvalues);
   }
   
+  /**
+   * Tests filtering using a regex on the row key
+   * @throws Exception
+   */
   public void testRegexOnRow() throws Exception {
     regexRowTests(mainFilter);
   }
 
+  /**
+   * Tests filtering using a regex on row and colum
+   * @throws Exception
+   */
   public void testRegexOnRowAndColumn() throws Exception {
     regexRowColumnTests(mainFilter);
   }
   
+  /**
+   * Only return values that are not null
+   * @throws Exception
+   */
   public void testFilterNotNull() throws Exception {
     filterNotNullTests(mainFilter);
   }
   
+  /**
+   * Test serialization
+   * @throws Exception
+   */
   public void testSerialization() throws Exception {
     // Decompose mainFilter to bytes.
     ByteArrayOutputStream stream = new ByteArrayOutputStream();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java Fri Aug  3 15:39:43 2007
@@ -32,6 +32,9 @@
 
 import junit.framework.TestCase;
 
+/**
+ * Tests filter sets
+ */
 public class TestRowFilterSet extends TestCase {
 
   RowFilterInterface filterMPALL;
@@ -42,7 +45,9 @@
   final byte[] GOOD_BYTES = "abc".getBytes();
   final byte[] BAD_BYTES = "def".getBytes();
   TreeMap<Text, byte[]> colvalues;
-  
+
+  /** {@inheritDoc} */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     
@@ -62,14 +67,26 @@
       filters);
   }
   
+  /**
+   * Test "must pass one"
+   * @throws Exception
+   */
   public void testMPONE() throws Exception {
     MPONETests(filterMPONE);
   }
 
+  /**
+   * Test "must pass all"
+   * @throws Exception
+   */
   public void testMPALL() throws Exception {
     MPALLTests(filterMPALL);
   }
   
+  /**
+   * Test serialization
+   * @throws Exception
+   */
   public void testSerialization() throws Exception {
     // Decompose filterMPALL to bytes.
     ByteArrayOutputStream stream = new ByteArrayOutputStream();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java Fri Aug  3 15:39:43 2007
@@ -28,22 +28,35 @@
 
 import junit.framework.TestCase;
 
+/**
+ * Tests the stop row filter
+ */
 public class TestStopRowFilter extends TestCase {
   private final Text STOP_ROW = new Text("stop_row");
   private final Text GOOD_ROW = new Text("good_row");
   private final Text PAST_STOP_ROW = new Text("zzzzzz");
   
   RowFilterInterface mainFilter;
-  
+
+  /** {@inheritDoc} */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     mainFilter = new StopRowFilter(STOP_ROW);
   }
   
+  /**
+   * Tests identification of the stop row
+   * @throws Exception
+   */
   public void testStopRowIdentification() throws Exception {
     stopRowTests(mainFilter);
   }
   
+  /**
+   * Tests serialization
+   * @throws Exception
+   */
   public void testSerialization() throws Exception {
     // Decompose mainFilter to bytes.
     ByteArrayOutputStream stream = new ByteArrayOutputStream();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestWhileMatchRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestWhileMatchRowFilter.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestWhileMatchRowFilter.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestWhileMatchRowFilter.java Fri Aug  3 15:39:43 2007
@@ -28,11 +28,16 @@
 
 import org.apache.hadoop.io.Text;
 
+/**
+ * Tests for the while-match filter
+ */
 public class TestWhileMatchRowFilter extends TestCase {
 
   WhileMatchRowFilter wmStopRowFilter;
   WhileMatchRowFilter wmRegExpRowFilter;
-  
+
+  /** {@inheritDoc} */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     wmStopRowFilter = new WhileMatchRowFilter(new StopRowFilter(
@@ -41,14 +46,26 @@
     ".*regex.*"));
   }
   
+  /**
+   * Tests while match stop row
+   * @throws Exception
+   */
   public void testWhileMatchStopRow() throws Exception {
     whileMatchStopRowTests(wmStopRowFilter);
   }
   
+  /**
+   * Tests while match regex
+   * @throws Exception
+   */
   public void testWhileMatchRegExp() throws Exception {
     whileMatchRegExpTests(wmRegExpRowFilter);
   }
   
+  /**
+   * Tests serialization
+   * @throws Exception
+   */
   public void testSerialization() throws Exception {
     // Decompose wmRegExpRowFilter to bytes.
     ByteArrayOutputStream stream = new ByteArrayOutputStream();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java Fri Aug  3 15:39:43 2007
@@ -21,13 +21,13 @@
 
 import junit.framework.TestCase;
 
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HClient;
-import org.apache.hadoop.hbase.shell.generated.ParseException;
 import org.apache.hadoop.hbase.shell.generated.Parser;
 
+/**
+ * Tests for HBase shell
+ */
 public class TestHBaseShell extends TestCase {
+  /** test parsing */
   public void testParse() {
     String queryString1 = "SELECT test_table WHERE row='row_key' and " +
       "column='column_key';";

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/util/TestKeying.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/util/TestKeying.java?view=diff&rev=562608&r1=562607&r2=562608
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/util/TestKeying.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/util/TestKeying.java Fri Aug  3 15:39:43 2007
@@ -21,16 +21,27 @@
 
 import junit.framework.TestCase;
 
+/**
+ * Tests url transformations
+ */
 public class TestKeying extends TestCase {
 
+  /** {@inheritDoc} */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
   }
 
+  /** {@inheritDoc} */
+  @Override
   protected void tearDown() throws Exception {
     super.tearDown();
   }
 
+  /**
+   * Test url transformations
+   * @throws Exception
+   */
   public void testURI() throws Exception {
     checkTransform("http://abc:bcd@www.example.com/index.html" +
       "?query=something#middle");