HDFS-15425. Review Logging of DFSClient. Contributed by Hongbing Wang.
This commit is contained in:
parent
2bbd00dff4
commit
4f26454a7d
@ -332,12 +332,9 @@ public DFSClient(URI nameNodeUri, ClientProtocol rpcNamenode,
|
||||
MIN_REPLICATION,
|
||||
HdfsClientConfigKeys.BlockWrite.ReplaceDatanodeOnFailure.
|
||||
MIN_REPLICATION_DEFAULT);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(
|
||||
"Sets " + HdfsClientConfigKeys.BlockWrite.ReplaceDatanodeOnFailure.
|
||||
MIN_REPLICATION + " to "
|
||||
+ dtpReplaceDatanodeOnFailureReplication);
|
||||
}
|
||||
LOG.debug("Sets {} to {}",
|
||||
HdfsClientConfigKeys.BlockWrite.ReplaceDatanodeOnFailure.
|
||||
MIN_REPLICATION, dtpReplaceDatanodeOnFailureReplication);
|
||||
this.ugi = UserGroupInformation.getCurrentUser();
|
||||
|
||||
this.namenodeUri = nameNodeUri;
|
||||
|
@ -110,9 +110,7 @@ public class DFSStripedInputStream extends DFSInputStream {
|
||||
dataBlkNum, parityBlkNum);
|
||||
decoder = CodecUtil.createRawDecoder(dfsClient.getConfiguration(),
|
||||
ecPolicy.getCodecName(), coderOptions);
|
||||
if (DFSClient.LOG.isDebugEnabled()) {
|
||||
DFSClient.LOG.debug("Creating an striped input stream for file " + src);
|
||||
}
|
||||
DFSClient.LOG.debug("Creating an striped input stream for file {}", src);
|
||||
}
|
||||
|
||||
private boolean useDirectBuffer() {
|
||||
@ -465,10 +463,8 @@ protected LocatedBlock refreshLocatedBlock(LocatedBlock block)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (DFSClient.LOG.isDebugEnabled()) {
|
||||
DFSClient.LOG.debug("refreshLocatedBlock for striped blocks, offset="
|
||||
+ block.getStartOffset() + ". Obtained block " + lb + ", idx=" + idx);
|
||||
}
|
||||
DFSClient.LOG.debug("refreshLocatedBlock for striped blocks, offset={}." +
|
||||
" Obtained block {}, idx={}", block.getStartOffset(), lb, idx);
|
||||
return StripedBlockUtil.constructInternalBlock(
|
||||
lsb, i, cellSize, dataBlkNum, idx);
|
||||
}
|
||||
@ -526,7 +522,7 @@ protected void reportLostBlock(LocatedBlock lostBlock,
|
||||
if (!warnedNodes.containsAll(dnUUIDs)) {
|
||||
DFSClient.LOG.warn(Arrays.toString(nodes) + " are unavailable and " +
|
||||
"all striping blocks on them are lost. " +
|
||||
"IgnoredNodes = " + ignoredNodes);
|
||||
"IgnoredNodes = {}", ignoredNodes);
|
||||
warnedNodes.addAll(dnUUIDs);
|
||||
}
|
||||
} else {
|
||||
|
@ -353,10 +353,8 @@ void readStripe() throws IOException {
|
||||
StripingChunkReadResult r = StripedBlockUtil
|
||||
.getNextCompletedStripedRead(service, futures, 0);
|
||||
dfsStripedInputStream.updateReadStats(r.getReadStats());
|
||||
if (DFSClient.LOG.isDebugEnabled()) {
|
||||
DFSClient.LOG.debug("Read task returned: " + r + ", for stripe "
|
||||
+ alignedStripe);
|
||||
}
|
||||
DFSClient.LOG.debug("Read task returned: {}, for stripe {}",
|
||||
r, alignedStripe);
|
||||
StripingChunk returnedChunk = alignedStripe.chunks[r.index];
|
||||
Preconditions.checkNotNull(returnedChunk);
|
||||
Preconditions.checkState(returnedChunk.state == StripingChunk.PENDING);
|
||||
|
Loading…
Reference in New Issue
Block a user