HDFS-4073. Two minor improvements to FSDirectory. Contributed by Jing Zhao

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1399861 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2012-10-18 21:18:25 +00:00
parent 865c67a569
commit c1bd54daa3
2 changed files with 8 additions and 1 deletions

View File

@ -398,6 +398,8 @@ Release 2.0.3-alpha - Unreleased
HDFS-4068. DatanodeID and DatanodeInfo member should be private. (eli)
HDFS-4073. Two minor improvements to FSDirectory. (Jing Zhao via szetszwo)
OPTIMIZATIONS
BUG FIXES

View File

@ -290,13 +290,18 @@ INode unprotectedAddFile( String path,
try {
newNode = addNode(path, newNode, UNKNOWN_DISK_SPACE);
} catch (IOException e) {
if(NameNode.stateChangeLog.isDebugEnabled()) {
NameNode.stateChangeLog.debug(
"DIR* FSDirectory.unprotectedAddFile: exception when add " + path
+ " to the file system", e);
}
return null;
}
return newNode;
}
INodeDirectory addToParent(byte[] src, INodeDirectory parentINode,
INode newNode, boolean propagateModTime) throws UnresolvedLinkException {
INode newNode, boolean propagateModTime) {
// NOTE: This does not update space counts for parents
INodeDirectory newParent = null;
writeLock();