You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2009/12/30 01:48:37 UTC

svn commit: r894525 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/util/FSUtils.java

Author: apurtell
Date: Wed Dec 30 00:48:36 2009
New Revision: 894525

URL: http://svn.apache.org/viewvc?rev=894525&view=rev
Log:
HBASE-2075 Master requires HDFS superuser privileges due to waitOnSafeMode

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=894525&r1=894524&r2=894525&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Wed Dec 30 00:48:36 2009
@@ -141,6 +141,7 @@
                at the same time
    HBASE-2026  NPE in StoreScanner on compaction
    HBASE-2072  fs.automatic.close isn't passed to FileSystem
+   HBASE-2075  Master requires HDFS superuser privileges due to waitOnSafeMode
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=894525&r1=894524&r2=894525&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java Wed Dec 30 00:48:36 2009
@@ -251,13 +251,18 @@
     // Are there any data nodes up yet?
     // Currently the safe mode check falls through if the namenode is up but no
     // datanodes have reported in yet.
-    while (dfs.getDataNodeStats().length == 0) {
-      LOG.info("Waiting for dfs to come up...");
-      try {
-        Thread.sleep(wait);
-      } catch (InterruptedException e) {
-        //continue
+    try {
+      while (dfs.getDataNodeStats().length == 0) {
+        LOG.info("Waiting for dfs to come up...");
+        try {
+          Thread.sleep(wait);
+        } catch (InterruptedException e) {
+          //continue
+        }
       }
+    } catch (IOException e) {
+      // getDataNodeStats can fail if superuser privilege is required to run
+      // the datanode report, just ignore it
     }
     // Make sure dfs is not in safe mode
     while (dfs.setSafeMode(FSConstants.SafeModeAction.SAFEMODE_GET)) {