Author: hairong
Date: Mon Jun 30 14:16:58 2008
New Revision: 672927
URL: http://svn.apache.org/viewvc?rev=672927&view=rev
Log:
Merge -r 672924:672925 from trunk to branch 0.18 to move the change of
HADOOP-3572 into the release 0.18.0 section.
Modified:
hadoop/core/branches/branch-0.18/CHANGES.txt
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=672927&r1=672926&r2=672927&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Mon Jun 30 14:16:58 2008
@@ -691,6 +691,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/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java?rev=672927&r1=672926&r2=672927&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
(original)
+++
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
Mon Jun 30 14:16:58 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) {