hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1345905 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java src/main/java/org/apache/hadoop/hbase/util/Merge.java
Date Mon, 04 Jun 2012 10:07:01 GMT
Author: jmhsieh
Date: Mon Jun  4 10:07:00 2012
New Revision: 1345905

URL: http://svn.apache.org/viewvc?rev=1345905&view=rev
Log:
HBASE-5874 When 'fs.default.name' not configured, the hbck tool and Merge tool throws IllegalArgumentException
(fulin wang)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/Merge.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1345905&r1=1345904&r2=1345905&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Jun  4 10:07:00 2012
@@ -78,6 +78,7 @@ Release 0.92.2 - Unreleased
    HBASE-6133  TestRestartCluster failing in 0.92
    HBASE-6124  Backport HBASE-6033 to 0.90, 0.92 and 0.94 (Jimmy Xiang)
    HBASE-6068  Secure HBase cluster : Client not able to call some admin APIs (Matteo Bertozzi)
+   HBASE-5874  When 'fs.default.name' not configured, the hbck tool and Merge tool throws
IllegalArgumentException (fulin wang)
 
   IMPROVEMENTS
    HBASE-5592  Make it easier to get a table from shell (Ben West)

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java?rev=1345905&r1=1345904&r2=1345905&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java Mon Jun
 4 10:07:00 2012
@@ -18,6 +18,7 @@
 package org.apache.hadoop.hbase.util;
 
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -2988,7 +2989,10 @@ public class HBaseFsck {
 
     // create a fsck object
     Configuration conf = HBaseConfiguration.create();
-    conf.set("fs.defaultFS", conf.get(HConstants.HBASE_DIR));
+    Path hbasedir = new Path(conf.get(HConstants.HBASE_DIR));
+    URI defaultFs = hbasedir.getFileSystem(conf).getUri();
+    conf.set("fs.defaultFS", defaultFs.toString());     // for hadoop 0.21+
+    conf.set("fs.default.name", defaultFs.toString());  // for hadoop 0.20
     HBaseFsck fsck = new HBaseFsck(conf);
     long sleepBeforeRerun = DEFAULT_SLEEP_BEFORE_RERUN;
 

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/Merge.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/Merge.java?rev=1345905&r1=1345904&r2=1345905&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/Merge.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/Merge.java Mon Jun  4 10:07:00
2012
@@ -373,8 +373,12 @@ public class Merge extends Configured im
   }
 
   private void usage() {
-    System.err.println(
-        "Usage: bin/hbase merge <table-name> <region-1> <region-2>\n");
+    System.err
+        .println("For hadoop 0.20,  Usage: bin/hbase org.apache.hadoop.hbase.util.Merge "
+            + "[-Dfs.default.name=hdfs://nn:port] <table-name> <region-1> <region-2>\n");
+    System.err
+        .println("For hadoop 0.21+, Usage: bin/hbase org.apache.hadoop.hbase.util.Merge "
+            + "[-Dfs.defaultFS=hdfs://nn:port] <table-name> <region-1> <region-2>\n");
   }
 
   public static void main(String[] args) {



Mime
View raw message