hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1183154 - in /hbase/trunk: ./ src/test/java/org/apache/hadoop/hbase/ src/test/java/org/apache/hadoop/hbase/coprocessor/ src/test/java/org/apache/hadoop/hbase/regionserver/wal/
Date Thu, 13 Oct 2011 22:51:16 GMT
Author: todd
Date: Thu Oct 13 22:51:15 2011
New Revision: 1183154

URL: http://svn.apache.org/viewvc?rev=1183154&view=rev
Log:
HBASE-4551  Fix pom and some test cases to compile and run against Hadoop 0.23

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/pom.xml
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Oct 13 22:51:15 2011
@@ -358,6 +358,8 @@ Release 0.92.0 - Unreleased
    HBASE-4078  Validate store files after flush/compaction
    HBASE-3417  CacheOnWrite is using the temporary output path for block
                names, need to use a more consistent block naming scheme (jgray)
+   HBASE-4551  Fix pom and some test cases to compile and run against
+               Hadoop 0.23 (todd)
 
   TESTS
    HBASE-4450  test for number of blocks read: to serve as baseline for expected

Modified: hbase/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/pom.xml?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/pom.xml (original)
+++ hbase/trunk/pom.xml Thu Oct 13 22:51:15 2011
@@ -1525,14 +1525,16 @@
         <!-- test deps for hadoop-0.23 profile -->
         <dependency>
           <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-common-test</artifactId>
+          <artifactId>hadoop-common</artifactId>
           <version>${hadoop.version}</version>
+          <type>test-jar</type>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-hdfs-test</artifactId>
+          <artifactId>hadoop-hdfs</artifactId>
           <version>${hadoop.version}</version>
+          <type>test-jar</type>
           <scope>test</scope>
         </dependency>
         <dependency>

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java Thu Oct 13
22:51:15 2011
@@ -1462,35 +1462,6 @@ public class HBaseTestingUtility {
   }
 
   /**
-   * Set soft and hard limits in namenode.
-   * You'll get a NPE if you call before you've started a minidfscluster.
-   * @param soft Soft limit
-   * @param hard Hard limit
-   * @throws NoSuchFieldException
-   * @throws SecurityException
-   * @throws IllegalAccessException
-   * @throws IllegalArgumentException
-   */
-  public void setNameNodeNameSystemLeasePeriod(final int soft, final int hard)
-  throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
{
-    // TODO: If 0.20 hadoop do one thing, if 0.21 hadoop do another.
-    // Not available in 0.20 hdfs.  Use reflection to make it happen.
-
-    // private NameNode nameNode;
-    Field field = this.dfsCluster.getClass().getDeclaredField("nameNode");
-    field.setAccessible(true);
-    NameNode nn = (NameNode)field.get(this.dfsCluster);
-    field = nn.getClass().getDeclaredField("namesystem");
-    field.setAccessible(true);
-    FSNamesystem namesystem = (FSNamesystem)field.get(nn);
-
-    field = namesystem.getClass().getDeclaredField("leaseManager");
-    field.setAccessible(true);
-    LeaseManager lm = (LeaseManager)field.get(namesystem);
-    lm.setLeasePeriod(100, 50000);
-  }
-
-  /**
    * Set maxRecoveryErrorCount in DFSClient.  In 0.20 pre-append its hard-coded to 5 and
    * makes tests linger.  Here is the exception you'll see:
    * <pre>

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java Thu
Oct 13 22:51:15 2011
@@ -100,7 +100,6 @@ public class TestWALObserver {
     conf.setInt("dfs.client.block.recovery.retries", 2);
 
     TEST_UTIL.startMiniCluster(1);
-    TEST_UTIL.setNameNodeNameSystemLeasePeriod(100, 10000);
     Path hbaseRootDir =
       TEST_UTIL.getDFSCluster().getFileSystem().makeQualified(new Path("/hbase"));
     LOG.info("hbase.rootdir=" + hbaseRootDir);

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java Thu Oct
13 22:51:15 2011
@@ -46,8 +46,9 @@ import org.apache.hadoop.hbase.Coprocess
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver;
 import org.apache.hadoop.hdfs.DFSClient;
+import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction;
+import org.apache.hadoop.hdfs.protocol.FSConstants;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
 import org.apache.hadoop.hdfs.server.namenode.LeaseManager;
@@ -371,7 +372,8 @@ public class TestHLog  {
 
     // Stop the cluster.  (ensure restart since we're sharing MiniDFSCluster)
     try {
-      cluster.getNameNode().setSafeMode(SafeModeAction.SAFEMODE_ENTER);
+      DistributedFileSystem dfs = (DistributedFileSystem) cluster.getFileSystem();
+      dfs.setSafeMode(FSConstants.SafeModeAction.SAFEMODE_ENTER);
       cluster.shutdown();
       try {
         // wal.writer.close() will throw an exception,

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
Thu Oct 13 22:51:15 2011
@@ -140,8 +140,6 @@ public class TestHLogSplit {
     regions = new ArrayList<String>();
     Collections.addAll(regions, "bbb", "ccc");
     InstrumentedSequenceFileLogWriter.activateFailure = false;
-    // Set the soft lease for hdfs to be down from default of 5 minutes or so.
-    TEST_UTIL.setNameNodeNameSystemLeasePeriod(100, 50000);
   }
 
   @After

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java?rev=1183154&r1=1183153&r2=1183154&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
Thu Oct 13 22:51:15 2011
@@ -79,7 +79,6 @@ public class TestWALReplay {
     // The below config supported by 0.20-append and CDH3b2
     conf.setInt("dfs.client.block.recovery.retries", 2);
     TEST_UTIL.startMiniDFSCluster(3);
-    TEST_UTIL.setNameNodeNameSystemLeasePeriod(100, 10000);
     Path hbaseRootDir =
       TEST_UTIL.getDFSCluster().getFileSystem().makeQualified(new Path("/hbase"));
     LOG.info("hbase.rootdir=" + hbaseRootDir);



Mime
View raw message