hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r639870 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Fri, 21 Mar 2008 21:39:58 GMT
Author: jimk
Date: Fri Mar 21 14:39:56 2008
New Revision: 639870

URL: http://svn.apache.org/viewvc?rev=639870&view=rev
Log:
HADOOP-3066. Should not require superuser privilege to query if hdfs is in safe mode

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=639870&r1=639869&r2=639870&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Mar 21 14:39:56 2008
@@ -326,6 +326,9 @@
 
     HADOOP-3012. dfs -mv file to user home directory throws exception if 
     the user home directory does not exist. (Mahadev Konar via dhruba)
+    
+    HADOOP-3066. Should not require superuser privilege to query if hdfs is in
+    safe mode (jimk)
 
 Release 0.16.2 - Unreleased
 

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?rev=639870&r1=639869&r2=639870&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Fri Mar 21 14:39:56
2008
@@ -3936,15 +3936,16 @@
   }
     
   boolean setSafeMode(SafeModeAction action) throws IOException {
-    checkSuperuserPrivilege();
-    switch(action) {
-    case SAFEMODE_LEAVE: // leave safe mode
-      leaveSafeMode(false);
-      break;
-    case SAFEMODE_ENTER: // enter safe mode
-      enterSafeMode();
-      break;
-    case SAFEMODE_GET: // get safe mode
+    if (action != SafeModeAction.SAFEMODE_GET) {
+      checkSuperuserPrivilege();
+      switch(action) {
+      case SAFEMODE_LEAVE: // leave safe mode
+        leaveSafeMode(false);
+        break;
+      case SAFEMODE_ENTER: // enter safe mode
+        enterSafeMode();
+        break;
+      }
     }
     return isInSafeMode();
   }



Mime
View raw message