svn merge -c 1399861 from trunk for HDFS-4073. Two minor improvements to FSDirectory.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1399862 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9b7e8c4274
commit
a0fb053e7b
|
@ -66,6 +66,8 @@ Release 2.0.3-alpha - Unreleased
|
||||||
|
|
||||||
HDFS-4068. DatanodeID and DatanodeInfo member should be private. (eli)
|
HDFS-4068. DatanodeID and DatanodeInfo member should be private. (eli)
|
||||||
|
|
||||||
|
HDFS-4073. Two minor improvements to FSDirectory. (Jing Zhao via szetszwo)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -290,13 +290,18 @@ public class FSDirectory implements Closeable {
|
||||||
try {
|
try {
|
||||||
newNode = addNode(path, newNode, UNKNOWN_DISK_SPACE);
|
newNode = addNode(path, newNode, UNKNOWN_DISK_SPACE);
|
||||||
} catch (IOException e) {
|
} 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 null;
|
||||||
}
|
}
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
INodeDirectory addToParent(byte[] src, INodeDirectory parentINode,
|
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
|
// NOTE: This does not update space counts for parents
|
||||||
INodeDirectory newParent = null;
|
INodeDirectory newParent = null;
|
||||||
writeLock();
|
writeLock();
|
||||||
|
|
Loading…
Reference in New Issue