HDFS-10841. Remove duplicate or unused variable in appendFile(). Contributed by Kihwal Lee.

This commit is contained in:
Xiao Chen 2016-09-06 11:48:35 -07:00
parent 7c213c341d
commit f6c0b7543f

View File

@ -84,12 +84,10 @@ final class FSDirAppendOp {
final LocatedBlock lb; final LocatedBlock lb;
final FSDirectory fsd = fsn.getFSDirectory(); final FSDirectory fsd = fsn.getFSDirectory();
final String src;
final INodesInPath iip; final INodesInPath iip;
fsd.writeLock(); fsd.writeLock();
try { try {
iip = fsd.resolvePathForWrite(pc, srcArg); iip = fsd.resolvePathForWrite(pc, srcArg);
src = iip.getPath();
// Verify that the destination does not exist as a directory already // Verify that the destination does not exist as a directory already
final INode inode = iip.getLastINode(); final INode inode = iip.getLastINode();
final String path = iip.getPath(); final String path = iip.getPath();
@ -111,7 +109,7 @@ final class FSDirAppendOp {
// not support appending file with striped blocks // not support appending file with striped blocks
if (file.isStriped()) { if (file.isStriped()) {
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
"Cannot append to files with striped block " + src); "Cannot append to files with striped block " + path);
} }
BlockManager blockManager = fsd.getBlockManager(); BlockManager blockManager = fsd.getBlockManager();