hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r672925 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
Date Mon, 30 Jun 2008 21:14:39 GMT
Author: hairong
Date: Mon Jun 30 14:14:39 2008
New Revision: 672925

URL: http://svn.apache.org/viewvc?rev=672925&view=rev
Log:
HADOOP-3572. SetQuotas usage interface has some minor bugs. Contributed by Hairong Kuang.

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

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=672925&r1=672924&r2=672925&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Jun 30 14:14:39 2008
@@ -718,6 +718,8 @@
     HADOOP-3539. Exception when closing DFSClient while multiple files are
     open. (Benjamin Gufler via hairong)
 
+    HADOOP-3572. SetQuotas usage interface has some minor bugs. (hairong)
+
 Release 0.17.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java?rev=672925&r1=672924&r2=672925&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java Mon Jun 30 14:14:39
2008
@@ -981,8 +981,10 @@
     synchronized (rootDir) {
       rootDir.getExistingPathINodes(components, inodes);
       INode targetNode = inodes[inodes.length-1];
-      if (targetNode == null || !targetNode.isDirectory()) {
+      if (targetNode == null) {
         throw new FileNotFoundException("Directory does not exist: " + srcs);
+      } else if (!targetNode.isDirectory()) {
+        throw new FileNotFoundException("Cannot set quota on a file: " + srcs);  
       } else { // a directory inode
         INodeDirectory dirNode = (INodeDirectory)targetNode;
         if (dirNode instanceof INodeDirectoryWithQuota) { 



Mime
View raw message