HDFS-6836: Merging r1617603 from trunk to branch-2.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1617604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2014-08-12 21:50:09 +00:00
parent 004068c391
commit f1f1ff8f82
2 changed files with 6 additions and 3 deletions

View File

@ -135,6 +135,9 @@ Release 2.6.0 - UNRELEASED
HDFS-6838. Code cleanup for unnecessary INode replacement. HDFS-6838. Code cleanup for unnecessary INode replacement.
(Jing Zhao via wheat9) (Jing Zhao via wheat9)
HDFS-6836. HDFS INFO logging is verbose & uses file appenders. (Xiaoyu
Yao via Arpit Agarwal)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-6690. Deduplicate xattr names in memory. (wang) HDFS-6690. Deduplicate xattr names in memory. (wang)

View File

@ -687,7 +687,7 @@ class BlockSender implements java.io.Closeable {
// Trigger readahead of beginning of file if configured. // Trigger readahead of beginning of file if configured.
manageOsCache(); manageOsCache();
final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; final long startTime = ClientTraceLog.isDebugEnabled() ? System.nanoTime() : 0;
try { try {
int maxChunksPerPacket; int maxChunksPerPacket;
int pktBufSize = PacketHeader.PKT_MAX_HEADER_LEN; int pktBufSize = PacketHeader.PKT_MAX_HEADER_LEN;
@ -733,9 +733,9 @@ class BlockSender implements java.io.Closeable {
sentEntireByteRange = true; sentEntireByteRange = true;
} }
} finally { } finally {
if (clientTraceFmt != null) { if ((clientTraceFmt != null) && ClientTraceLog.isDebugEnabled()) {
final long endTime = System.nanoTime(); final long endTime = System.nanoTime();
ClientTraceLog.info(String.format(clientTraceFmt, totalRead, ClientTraceLog.debug(String.format(clientTraceFmt, totalRead,
initialOffset, endTime - startTime)); initialOffset, endTime - startTime));
} }
close(); close();