hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r582066 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/test/org/apache/hadoop/hbase/TestHStoreFile.java
Date Fri, 05 Oct 2007 03:26:33 GMT
Author: jimk
Date: Thu Oct  4 20:26:32 2007
New Revision: 582066

URL: http://svn.apache.org/viewvc?rev=582066&view=rev
Log:
HADOOP-1996 TestHStoreFile fails on windows if run multiple times

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.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=582066&r1=582065&r2=582066&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Thu Oct  4 20:26:32 2007
@@ -65,6 +65,7 @@
     HADOOP-1966 Make HBase unit tests more reliable in the Hudson environment.
     HADOOP-1975 HBase tests failing with java.lang.NumberFormatException
     HADOOP-1990 Regression test instability affects nightly and patch builds
+    HADOOP-1996 TestHStoreFile fails on windows if run multiple times
 
   IMPROVEMENTS
     HADOOP-1737 Make HColumnDescriptor data publically members settable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java?rev=582066&r1=582065&r2=582066&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
Thu Oct  4 20:26:32 2007
@@ -26,6 +26,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.dfs.MiniDFSCluster;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
@@ -39,9 +40,10 @@
  */
 public class TestHStoreFile extends TestCase {
   static final Log LOG = LogFactory.getLog(TestHStoreFile.class);
-  private static String DIR = System.getProperty("test.build.data", ".");
+  private static String DIR = "/";
   private static final char FIRST_CHAR = 'a';
   private static final char LAST_CHAR = 'z';
+  private MiniDFSCluster cluster;
   private FileSystem fs;
   private Configuration conf;
   private Path dir = null;
@@ -51,15 +53,17 @@
   public void setUp() throws Exception {
     super.setUp();
     this.conf = new HBaseConfiguration();
-    this.fs = FileSystem.getLocal(this.conf);
+    this.cluster = null;
+    this.cluster = new MiniDFSCluster(this.conf, 2, true, (String[])null);
+    this.fs = cluster.getFileSystem();
     this.dir = new Path(DIR, getName());
   }
   
   /** {@inheritDoc} */
   @Override
   public void tearDown() throws Exception {
-    if (this.fs.exists(this.dir)) {
-      this.fs.delete(this.dir);
+    if (this.cluster != null) {
+      this.cluster.shutdown();
     }
     super.tearDown();
   }



Mime
View raw message