hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r655650 - in /hadoop/hbase/trunk: ./ src/test/ src/test/org/apache/hadoop/hbase/ src/test/org/apache/hadoop/hbase/regionserver/ src/test/org/apache/hadoop/hbase/util/
Date Mon, 12 May 2008 21:22:39 GMT
Author: jimk
Date: Mon May 12 14:22:38 2008
New Revision: 655650

URL: http://svn.apache.org/viewvc?rev=655650&view=rev
Log:
HBASE-622   Remove StaticTestEnvironment and put a log4j.properties in src/test

Added:
    hadoop/hbase/trunk/src/test/log4j.properties
Removed:
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/StaticTestEnvironment.java
Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHLog.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestLogRolling.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestScanner.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMigrate.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon May 12 14:22:38 2008
@@ -36,6 +36,7 @@
    HBASE-478   offlining of table does not run reliably
    HBASE-453   undeclared throwable exception from HTable.get
    HBASE-620   testmergetool failing in branch and trunk since hbase-618 went in
+   HBASE-622   Remove StaticTestEnvironment and put a log4j.properties in src/test
 
   IMPROVEMENTS
    HBASE-559   MR example job to count table rows

Added: hadoop/hbase/trunk/src/test/log4j.properties
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/log4j.properties?rev=655650&view=auto
==============================================================================
--- hadoop/hbase/trunk/src/test/log4j.properties (added)
+++ hadoop/hbase/trunk/src/test/log4j.properties Mon May 12 14:22:38 2008
@@ -0,0 +1,63 @@
+# Define some default values that can be overridden by system properties
+hbase.root.logger=INFO,console
+hbase.log.dir=.
+hbase.log.file=hbase.log
+
+# Define the root logger to the system property "hbase.root.logger".
+log4j.rootLogger=${hbase.root.logger}
+
+# Logging Threshold
+log4j.threshhold=ALL
+
+#
+# Daily Rolling File Appender
+#
+log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DRFA.File=${hbase.log.dir}/${hbase.log.file}
+
+# Rollver at midnight
+log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
+
+# 30-day backup
+#log4j.appender.DRFA.MaxBackupIndex=30
+log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
+
+# Debugging Pattern format
+log4j.appender.DRFA.layout.ConversionPattern=%d %-5p [%t] %C{2}(%L): %m%n
+
+
+#
+# console
+# Add "console" to rootlogger above if you want to use this 
+#
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d %-5p [%t] %C{2}(%L): %m%n
+
+# Custom Logging levels
+
+#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG
+
+#log4j.logger.org.apache.hadoop=WARN
+
+log4j.logger.org.apache.hadoop.hbase.PerformanceEvaluation=WARN
+log4j.logger.org.apache.hadoop.hbase.client=DEBUG
+log4j.logger.org.apache.hadoop.hbase.filter=INFO
+log4j.logger.org.apache.hadoop.hbase.generated=INFO
+log4j.logger.org.apache.hadoop.hbase.hql=INFO
+log4j.logger.org.apache.hadoop.hbase.io=INFO
+log4j.logger.org.apache.hadoop.hbase.ipc=INFO
+log4j.logger.org.apache.hadoop.hbase.mapred=INFO
+log4j.logger.org.apache.hadoop.hbase.master=DEBUG
+log4j.logger.org.apache.hadoop.hbase.regionserver=DEBUG
+log4j.logger.org.apache.hadoop.hbase.rest=INFO
+log4j.logger.org.apache.hadoop.hbase.thrift=INFO
+log4j.logger.org.apache.hadoop.hbase.util=INFO
+
+log4j.logger.org.apache.hadoop.mapred=DEBUG
+#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG
+#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java Mon May
12 14:22:38 2008
@@ -134,7 +134,7 @@
         cluster.shutdown();
       }
       if (dfsCluster != null) {
-        StaticTestEnvironment.shutdownDfs(dfsCluster);
+        shutdownDfs(dfsCluster);
       }
       throw e;
     }
@@ -153,7 +153,7 @@
         }
       }
       if (startDfs) {
-        StaticTestEnvironment.shutdownDfs(dfsCluster);
+        shutdownDfs(dfsCluster);
       }
     } catch (Exception e) {
       LOG.error(e);

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=655650&r1=655649&r2=655650&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 Mon May 12 14:22:38
2008
@@ -19,6 +19,7 @@
  */
 package org.apache.hadoop.hbase;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.Map;
@@ -28,6 +29,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.dfs.MiniDFSCluster;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HColumnDescriptor.CompressionType;
@@ -46,6 +48,10 @@
 public abstract class HBaseTestCase extends TestCase {
   private static final Log LOG = LogFactory.getLog(HBaseTestCase.class);
 
+  /** configuration parameter name for test directory */
+  public static final String TEST_DIRECTORY_KEY = "test.build.data";
+  
+
   protected final static String COLFAMILY_NAME1 = "colfamily1:";
   protected final static String COLFAMILY_NAME2 = "colfamily2:";
   protected final static String COLFAMILY_NAME3 = "colfamily3:";
@@ -63,7 +69,7 @@
   protected static final int MAXVERSIONS = 3;
   
   static {
-    StaticTestEnvironment.initialize();
+    initialize();
   }
   
   protected volatile HBaseConfiguration conf;
@@ -142,8 +148,7 @@
 
   protected Path getUnitTestdir(String testName) {
     return new Path(
-        conf.get(StaticTestEnvironment.TEST_DIRECTORY_KEY, "test/build/data"),
-        testName);
+        conf.get(TEST_DIRECTORY_KEY, "test/build/data"), testName);
   }
 
   protected HRegion createNewHRegion(HTableDescriptor desc, Text startKey,
@@ -573,4 +578,48 @@
       }
     }
   }
+  
+  /**
+   * 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() {
+    if (System.getProperty(TEST_DIRECTORY_KEY) == null) {
+      System.setProperty(TEST_DIRECTORY_KEY, new File(
+          "build/hbase/test").getAbsolutePath());
+    }
+  }
+
+  /**
+   * Common method to close down a MiniDFSCluster and the associated file system
+   * 
+   * @param cluster
+   */
+  public static void shutdownDfs(MiniDFSCluster cluster) {
+    if (cluster != null) {
+      try {
+        FileSystem fs = cluster.getFileSystem();
+        if (fs != null) {
+          LOG.info("Shutting down FileSystem");
+          fs.close();
+        }
+      } catch (IOException e) {
+        LOG.error("error closing file system", e);
+      }
+
+      LOG.info("Shutting down Mini DFS ");
+      try {
+        cluster.shutdown();
+      } catch (Exception e) {
+        /// Can get a java.lang.reflect.UndeclaredThrowableException thrown
+        // here because of an InterruptedException. Don't let exceptions in
+        // here be cause of test failure.
+      }
+    }
+  }
 }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MultiRegionTable.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MultiRegionTable.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MultiRegionTable.java Mon May 12 14:22:38
2008
@@ -101,7 +101,7 @@
       closeRegionAndDeleteLog(root);
       closeRegionAndDeleteLog(meta);
     } catch (Exception e) {
-      StaticTestEnvironment.shutdownDfs(dfsCluster);
+      shutdownDfs(dfsCluster);
       throw e;
     }
   } 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java Mon May
12 14:22:38 2008
@@ -588,7 +588,7 @@
     } finally {
       if(this.miniCluster && hbaseMiniCluster != null) {
         hbaseMiniCluster.shutdown();
-        StaticTestEnvironment.shutdownDfs(dfsCluster);
+        HBaseTestCase.shutdownDfs(dfsCluster);
       }
     }
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java Mon
May 12 14:22:38 2008
@@ -33,7 +33,6 @@
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HStoreKey;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.Cell;
 
 /**
@@ -81,7 +80,7 @@
     this.r.close();
     hlog.closeAndDelete();
     if (this.cluster != null) {
-      StaticTestEnvironment.shutdownDfs(cluster);
+      shutdownDfs(cluster);
     }
     super.tearDown();
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java Mon
May 12 14:22:38 2008
@@ -28,7 +28,6 @@
 import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 
@@ -148,7 +147,7 @@
   @Override
   protected void tearDown() throws Exception {
     if (this.miniHdfs != null) {
-      StaticTestEnvironment.shutdownDfs(this.miniHdfs);
+      shutdownDfs(this.miniHdfs);
     }
     super.tearDown();
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
Mon May 12 14:22:38 2008
@@ -30,7 +30,6 @@
 
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java Mon May
12 14:22:38 2008
@@ -36,7 +36,6 @@
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HServerAddress;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 
@@ -162,7 +161,7 @@
         region.getLog().closeAndDelete();
       }
       if (cluster != null) {
-        StaticTestEnvironment.shutdownDfs(cluster);
+        shutdownDfs(cluster);
       }
     }
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHLog.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHLog.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHLog.java Mon May
12 14:22:38 2008
@@ -31,7 +31,6 @@
 import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HStoreKey;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 
 /** JUnit test case for HLog */
 public class TestHLog extends HBaseTestCase implements HConstants {
@@ -58,7 +57,7 @@
     if (this.fs.exists(this.dir)) {
       this.fs.delete(this.dir);
     }
-    StaticTestEnvironment.shutdownDfs(cluster);
+    shutdownDfs(cluster);
     super.tearDown();
   }
  

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java Mon
May 12 14:22:38 2008
@@ -32,7 +32,6 @@
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.log4j.Logger;
 import org.apache.hadoop.hbase.HStoreKey;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.io.BatchUpdate;
@@ -61,11 +60,11 @@
       badPuts();
       basic();
       scan();
-      batchWrite();
+//      batchWrite();
       splitAndMerge();
       read();
     } finally {
-      StaticTestEnvironment.shutdownDfs(cluster);
+      shutdownDfs(cluster);
     }
   }
   
@@ -94,9 +93,7 @@
   public void setUp() throws Exception {
     this.conf.set("hbase.hstore.compactionThreshold", "2");
 
-    if (!StaticTestEnvironment.debugging) {
-      conf.setLong("hbase.hregion.max.filesize", 65536);
-    }
+    conf.setLong("hbase.hregion.max.filesize", 65536);
 
     cluster = new MiniDFSCluster(conf, 2, true, (String[])null);
     fs = cluster.getFileSystem();
@@ -519,11 +516,6 @@
   // Creates contents:body
   
   private void batchWrite() throws IOException {
-    if(! StaticTestEnvironment.debugging) {
-      LOG.info("batchWrite completed.");
-      return;
-    }
-
     long totalFlush = 0;
     long totalCompact = 0;
     long totalLog = 0;
@@ -740,37 +732,37 @@
     
     // Verify testBatchWrite data
 
-    if(StaticTestEnvironment.debugging) {
-      startTime = System.currentTimeMillis();
-      s = r.getScanner(new Text[] { CONTENTS_BODY }, new Text(),
-          System.currentTimeMillis(), null);
-      
-      try {
-        int numFetched = 0;
-        HStoreKey curKey = new HStoreKey();
-        TreeMap<Text, byte []> curVals = new TreeMap<Text, byte []>();
-        int k = 0;
-        while(s.next(curKey, curVals)) {
-          for(Iterator<Text> it = curVals.keySet().iterator(); it.hasNext(); ) {
-            Text col = it.next();
-            byte [] val = curVals.get(col);
-            assertTrue(col.compareTo(CONTENTS_BODY) == 0);
-            assertNotNull(val);
-            numFetched++;
-          }
-          curVals.clear();
-          k++;
-        }
-        assertEquals("Inserted " + N_ROWS + " values, but fetched " + numFetched, N_ROWS,
numFetched);
-
-        LOG.info("Scanned " + N_ROWS
-            + " rows from disk. Elapsed time: "
-            + ((System.currentTimeMillis() - startTime) / 1000.0));
-        
-      } finally {
-        s.close();
-      }
-    }
+//    if(StaticTestEnvironment.debugging) {
+//      startTime = System.currentTimeMillis();
+//      s = r.getScanner(new Text[] { CONTENTS_BODY }, new Text(),
+//          System.currentTimeMillis(), null);
+//      
+//      try {
+//        int numFetched = 0;
+//        HStoreKey curKey = new HStoreKey();
+//        TreeMap<Text, byte []> curVals = new TreeMap<Text, byte []>();
+//        int k = 0;
+//        while(s.next(curKey, curVals)) {
+//          for(Iterator<Text> it = curVals.keySet().iterator(); it.hasNext(); ) {
+//            Text col = it.next();
+//            byte [] val = curVals.get(col);
+//            assertTrue(col.compareTo(CONTENTS_BODY) == 0);
+//            assertNotNull(val);
+//            numFetched++;
+//          }
+//          curVals.clear();
+//          k++;
+//        }
+//        assertEquals("Inserted " + N_ROWS + " values, but fetched " + numFetched, N_ROWS,
numFetched);
+//
+//        LOG.info("Scanned " + N_ROWS
+//            + " rows from disk. Elapsed time: "
+//            + ((System.currentTimeMillis() - startTime) / 1000.0));
+//        
+//      } finally {
+//        s.close();
+//      }
+//    }
     
     // Test a scanner which only specifies the column family name
     

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java Mon
May 12 14:22:38 2008
@@ -34,7 +34,6 @@
 
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HStoreKey;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 /**
  * Test HStoreFile
  */
@@ -54,7 +53,7 @@
         this.cluster.getFileSystem().getHomeDirectory().toString());
       this.dir = new Path(DIR, getName());
     } catch (IOException e) {
-      StaticTestEnvironment.shutdownDfs(cluster);
+      shutdownDfs(cluster);
     }
     super.setUp();
   }
@@ -63,7 +62,7 @@
   @Override
   public void tearDown() throws Exception {
     super.tearDown();
-    StaticTestEnvironment.shutdownDfs(cluster);
+    shutdownDfs(cluster);
     // ReflectionUtils.printThreadInfo(new PrintWriter(System.out),
     //  "Temporary end-of-test thread dump debugging HADOOP-2040: " + getName());
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestLogRolling.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestLogRolling.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestLogRolling.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestLogRolling.java Mon
May 12 14:22:38 2008
@@ -24,14 +24,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.dfs.MiniDFSCluster;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.HBaseClusterTestCase;
 
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.io.BatchUpdate;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestScanner.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestScanner.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestScanner.java Mon
May 12 14:22:38 2008
@@ -33,7 +33,6 @@
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HServerAddress;
 import org.apache.hadoop.hbase.HStoreKey;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 
 /**
@@ -258,7 +257,7 @@
       r.getLog().closeAndDelete();
       
     } finally {
-      StaticTestEnvironment.shutdownDfs(cluster);
+      shutdownDfs(cluster);
     }
   }
 }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java Mon May 12
14:22:38 2008
@@ -32,7 +32,6 @@
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.regionserver.HLog;
@@ -152,7 +151,7 @@
       meta.getLog().closeAndDelete();
       
     } catch (Exception e) {
-      StaticTestEnvironment.shutdownDfs(dfsCluster);
+      shutdownDfs(dfsCluster);
       throw e;
     }
   }
@@ -161,7 +160,7 @@
   @Override
   public void tearDown() throws Exception {
     super.tearDown();
-    StaticTestEnvironment.shutdownDfs(dfsCluster);
+    shutdownDfs(dfsCluster);
   }
   
   /*

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMigrate.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMigrate.java?rev=655650&r1=655649&r2=655650&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMigrate.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMigrate.java Mon May 12 14:22:38
2008
@@ -36,7 +36,6 @@
 
 import org.apache.hadoop.hbase.HBaseTestCase;
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.StaticTestEnvironment;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
@@ -141,7 +140,7 @@
       e.printStackTrace();
     } finally {
       if (dfsCluster != null) {
-        StaticTestEnvironment.shutdownDfs(dfsCluster);
+        shutdownDfs(dfsCluster);
       }
     }
   }



Mime
View raw message