HDFS-8522. Change heavily recorded NN logs from INFO to DEBUG level. (Contributed by Xiaoyu Yao)
This commit is contained in:
parent
bc11e158b1
commit
3841d09765
@ -957,6 +957,8 @@ Release 2.7.1 - UNRELEASED
|
|||||||
HDFS-8523. Remove usage information on unsupported operation
|
HDFS-8523. Remove usage information on unsupported operation
|
||||||
"fsck -showprogress" from branch-2 (J.Andreina via vinayakumarb)
|
"fsck -showprogress" from branch-2 (J.Andreina via vinayakumarb)
|
||||||
|
|
||||||
|
HDFS-8522. Change heavily recorded NN logs from INFO to DEBUG level. (xyao)
|
||||||
|
|
||||||
Release 2.7.0 - 2015-04-20
|
Release 2.7.0 - 2015-04-20
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -1956,10 +1956,8 @@ boolean truncateInt(String srcArg, long newLength,
|
|||||||
long mtime)
|
long mtime)
|
||||||
throws IOException, UnresolvedLinkException {
|
throws IOException, UnresolvedLinkException {
|
||||||
String src = srcArg;
|
String src = srcArg;
|
||||||
if (NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug(
|
||||||
NameNode.stateChangeLog.debug("DIR* NameSystem.truncate: src="
|
"DIR* NameSystem.truncate: src={} newLength={}", src, newLength);
|
||||||
+ src + " newLength=" + newLength);
|
|
||||||
}
|
|
||||||
if (newLength < 0) {
|
if (newLength < 0) {
|
||||||
throw new HadoopIllegalArgumentException(
|
throw new HadoopIllegalArgumentException(
|
||||||
"Cannot truncate to a negative file size: " + newLength + ".");
|
"Cannot truncate to a negative file size: " + newLength + ".");
|
||||||
@ -2108,10 +2106,10 @@ Block prepareFileForTruncate(INodesInPath iip,
|
|||||||
file.setLastBlock(truncatedBlockUC, blockManager.getStorages(oldBlock));
|
file.setLastBlock(truncatedBlockUC, blockManager.getStorages(oldBlock));
|
||||||
getBlockManager().addBlockCollection(truncatedBlockUC, file);
|
getBlockManager().addBlockCollection(truncatedBlockUC, file);
|
||||||
|
|
||||||
NameNode.stateChangeLog.info("BLOCK* prepareFileForTruncate: "
|
NameNode.stateChangeLog.debug(
|
||||||
+ "Scheduling copy-on-truncate to new size "
|
"BLOCK* prepareFileForTruncate: Scheduling copy-on-truncate to new" +
|
||||||
+ truncatedBlockUC.getNumBytes() + " new block " + newBlock
|
" size {} new block {} old block {}", truncatedBlockUC.getNumBytes(),
|
||||||
+ " old block " + truncatedBlockUC.getTruncateBlock());
|
newBlock, truncatedBlockUC.getTruncateBlock());
|
||||||
} else {
|
} else {
|
||||||
// Use new generation stamp for in-place truncate recovery
|
// Use new generation stamp for in-place truncate recovery
|
||||||
blockManager.convertLastBlockToUnderConstruction(file, lastBlockDelta);
|
blockManager.convertLastBlockToUnderConstruction(file, lastBlockDelta);
|
||||||
@ -2124,10 +2122,10 @@ Block prepareFileForTruncate(INodesInPath iip,
|
|||||||
truncatedBlockUC.getTruncateBlock().setGenerationStamp(
|
truncatedBlockUC.getTruncateBlock().setGenerationStamp(
|
||||||
newBlock.getGenerationStamp());
|
newBlock.getGenerationStamp());
|
||||||
|
|
||||||
NameNode.stateChangeLog.debug("BLOCK* prepareFileForTruncate: "
|
NameNode.stateChangeLog.debug(
|
||||||
+ "Scheduling in-place block truncate to new size "
|
"BLOCK* prepareFileForTruncate: {} Scheduling in-place block " +
|
||||||
+ truncatedBlockUC.getTruncateBlock().getNumBytes()
|
"truncate to new size {}",
|
||||||
+ " block=" + truncatedBlockUC);
|
truncatedBlockUC.getTruncateBlock().getNumBytes(), truncatedBlockUC);
|
||||||
}
|
}
|
||||||
if (shouldRecoverNow) {
|
if (shouldRecoverNow) {
|
||||||
truncatedBlockUC.initializeBlockRecovery(newBlock.getGenerationStamp());
|
truncatedBlockUC.initializeBlockRecovery(newBlock.getGenerationStamp());
|
||||||
@ -2774,11 +2772,9 @@ private LastBlockWithStatus appendFileInt(final String srcArg, String holder,
|
|||||||
String clientMachine, boolean newBlock, boolean logRetryCache)
|
String clientMachine, boolean newBlock, boolean logRetryCache)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
String src = srcArg;
|
String src = srcArg;
|
||||||
if (NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug(
|
||||||
NameNode.stateChangeLog.debug("DIR* NameSystem.appendFile: src=" + src
|
"DIR* NameSystem.appendFile: src={}, holder={}, clientMachine={}",
|
||||||
+ ", holder=" + holder
|
src, holder, clientMachine);
|
||||||
+ ", clientMachine=" + clientMachine);
|
|
||||||
}
|
|
||||||
boolean skipSync = false;
|
boolean skipSync = false;
|
||||||
LocatedBlock lb = null;
|
LocatedBlock lb = null;
|
||||||
HdfsFileStatus stat = null;
|
HdfsFileStatus stat = null;
|
||||||
@ -2806,12 +2802,10 @@ private LastBlockWithStatus appendFileInt(final String srcArg, String holder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lb != null) {
|
if (lb != null) {
|
||||||
if (NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug(
|
||||||
NameNode.stateChangeLog.debug("DIR* NameSystem.appendFile: file "
|
"DIR* NameSystem.appendFile: file {} for {} at {} block {} block" +
|
||||||
+src+" for "+holder+" at "+clientMachine
|
" size {}", src, holder, clientMachine, lb.getBlock(),
|
||||||
+" block " + lb.getBlock()
|
lb.getBlock().getNumBytes());
|
||||||
+" block size " + lb.getBlock().getNumBytes());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
logAuditEvent(true, "append", srcArg);
|
logAuditEvent(true, "append", srcArg);
|
||||||
return new LastBlockWithStatus(lb, stat);
|
return new LastBlockWithStatus(lb, stat);
|
||||||
@ -2840,10 +2834,8 @@ void setBlockPoolId(String bpid) {
|
|||||||
LocatedBlock getAdditionalBlock(
|
LocatedBlock getAdditionalBlock(
|
||||||
String src, long fileId, String clientName, ExtendedBlock previous,
|
String src, long fileId, String clientName, ExtendedBlock previous,
|
||||||
DatanodeInfo[] excludedNodes, String[] favoredNodes) throws IOException {
|
DatanodeInfo[] excludedNodes, String[] favoredNodes) throws IOException {
|
||||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug("BLOCK* getAdditionalBlock: {} inodeId {}" +
|
||||||
NameNode.stateChangeLog.debug("BLOCK* getAdditionalBlock: "
|
" for {}", src, fileId, clientName);
|
||||||
+ src + " inodeId " + fileId + " for " + clientName);
|
|
||||||
}
|
|
||||||
|
|
||||||
waitForLoadingFSImage();
|
waitForLoadingFSImage();
|
||||||
LocatedBlock[] onRetryBlock = new LocatedBlock[1];
|
LocatedBlock[] onRetryBlock = new LocatedBlock[1];
|
||||||
@ -2950,10 +2942,8 @@ LocatedBlock getAdditionalDatanode(String src, long fileId,
|
|||||||
*/
|
*/
|
||||||
void abandonBlock(ExtendedBlock b, long fileId, String src, String holder)
|
void abandonBlock(ExtendedBlock b, long fileId, String src, String holder)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug(
|
||||||
NameNode.stateChangeLog.debug("BLOCK* NameSystem.abandonBlock: " + b
|
"BLOCK* NameSystem.abandonBlock: {} of file {}", b, src);
|
||||||
+ "of file " + src);
|
|
||||||
}
|
|
||||||
waitForLoadingFSImage();
|
waitForLoadingFSImage();
|
||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
FSPermissionChecker pc = getPermissionChecker();
|
FSPermissionChecker pc = getPermissionChecker();
|
||||||
@ -2962,10 +2952,8 @@ void abandonBlock(ExtendedBlock b, long fileId, String src, String holder)
|
|||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
checkNameNodeSafeMode("Cannot abandon block " + b + " for file" + src);
|
checkNameNodeSafeMode("Cannot abandon block " + b + " for file" + src);
|
||||||
FSDirWriteFileOp.abandonBlock(dir, pc, b, fileId, src, holder);
|
FSDirWriteFileOp.abandonBlock(dir, pc, b, fileId, src, holder);
|
||||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug("BLOCK* NameSystem.abandonBlock: {} is " +
|
||||||
NameNode.stateChangeLog.debug("BLOCK* NameSystem.abandonBlock: "
|
"removed from pendingCreates", b);
|
||||||
+ b + " is removed from pendingCreates");
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
}
|
}
|
||||||
@ -2973,7 +2961,8 @@ void abandonBlock(ExtendedBlock b, long fileId, String src, String holder)
|
|||||||
}
|
}
|
||||||
|
|
||||||
INodeFile checkLease(
|
INodeFile checkLease(
|
||||||
String src, String holder, INode inode, long fileId) throws LeaseExpiredException, FileNotFoundException {
|
String src, String holder, INode inode, long fileId)
|
||||||
|
throws LeaseExpiredException, FileNotFoundException {
|
||||||
assert hasReadLock();
|
assert hasReadLock();
|
||||||
final String ident = src + " (inode " + fileId + ")";
|
final String ident = src + " (inode " + fileId + ")";
|
||||||
if (inode == null) {
|
if (inode == null) {
|
||||||
@ -4039,11 +4028,8 @@ private void closeFile(String path, INodeFile file) {
|
|||||||
waitForLoadingFSImage();
|
waitForLoadingFSImage();
|
||||||
// file is closed
|
// file is closed
|
||||||
getEditLog().logCloseFile(path, file);
|
getEditLog().logCloseFile(path, file);
|
||||||
if (NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.debug("closeFile: {} with {} blocks is persisted" +
|
||||||
NameNode.stateChangeLog.debug("closeFile: "
|
" to the file system", path, file.getBlocks().length);
|
||||||
+path+" with "+ file.getBlocks().length
|
|
||||||
+" blocks is persisted to the file system");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5903,7 +5889,9 @@ Collection<CorruptFileBlockInfo> listCorruptFileBlocks(String path,
|
|||||||
if (cookieTab[0] == null) {
|
if (cookieTab[0] == null) {
|
||||||
cookieTab[0] = String.valueOf(getIntCookie(cookieTab[0]));
|
cookieTab[0] = String.valueOf(getIntCookie(cookieTab[0]));
|
||||||
}
|
}
|
||||||
LOG.info("there are no corrupt file blocks.");
|
if (LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("there are no corrupt file blocks.");
|
||||||
|
}
|
||||||
return corruptFiles;
|
return corruptFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5938,7 +5926,9 @@ Collection<CorruptFileBlockInfo> listCorruptFileBlocks(String path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cookieTab[0] = String.valueOf(skip);
|
cookieTab[0] = String.valueOf(skip);
|
||||||
LOG.info("list corrupt file blocks returned: " + count);
|
if (LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("list corrupt file blocks returned: " + count);
|
||||||
|
}
|
||||||
return corruptFiles;
|
return corruptFiles;
|
||||||
} finally {
|
} finally {
|
||||||
readUnlock();
|
readUnlock();
|
||||||
|
Loading…
Reference in New Issue
Block a user