hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r664205 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSImage.java src/java/org/apache/hadoop/dfs/QuotaExceededException.java
Date Sat, 07 Jun 2008 00:02:07 GMT
Author: hairong
Date: Fri Jun  6 17:02:07 2008
New Revision: 664205

URL: http://svn.apache.org/viewvc?rev=664205&view=rev
Log:
HADOOP-3511. Namenode should not restore the root's quota if the quota was not saved in the
image. Contributed by Hairong Kuang.

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

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=664205&r1=664204&r2=664205&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Jun  6 17:02:07 2008
@@ -531,6 +531,9 @@
     HADOOP-3491. Name-node shutdown causes InterruptedException in 
     ResolutionMonitor. (Lohit Vijayarenu via shv)
 
+    HADOOP-3511. Fixes namenode image to not set the root's quota to an
+    invalid value when the quota was not saved in the image. (hairong)
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java?rev=664205&r1=664204&r2=664205&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java Fri Jun  6 17:02:07 2008
@@ -786,7 +786,9 @@
         }
         if (path.length() == 0) { // it is the root
           // update the root's attributes
-          fsDir.rootDir.setQuota(quota);
+          if (quota != -1) {
+            fsDir.rootDir.setQuota(quota);
+          }
           fsDir.rootDir.setModificationTime(modificationTime);
           fsDir.rootDir.setPermissionStatus(permissions);
           continue;

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/QuotaExceededException.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/QuotaExceededException.java?rev=664205&r1=664204&r2=664205&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/QuotaExceededException.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/QuotaExceededException.java Fri Jun 
6 17:02:07 2008
@@ -46,7 +46,7 @@
   public String getMessage() {
     String msg = super.getMessage();
     if (msg == null) {
-      return "The quota" + pathName==null?"":(" of " + pathName) + 
+      return "The quota" + (pathName==null?"":(" of " + pathName)) + 
           " is exceeded: quota=" + quota + " count=" + count;
     } else {
       return msg;



Mime
View raw message