From 577b96ef42f9927e82b33d4a672b40fd69b27a63 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Wed, 16 Jun 2021 20:37:56 -0700 Subject: [PATCH] HDFS-16074. Remove an expensive debug string concatenation (#3107) Reviewed-by: Ayush Saxena Reviewed-by: Akira Ajisaka Reviewed-by: Inigo Goiri Reviewed-by: Hui Fei Reviewed-by: Viraj Jasani Reviewed-by: litao (cherry picked from commit 1ad674e5489e6080f21c308673ecc73a54ba3752) --- .../main/java/org/apache/hadoop/hdfs/DFSOutputStream.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java index 9003e51139..e07b24749b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java @@ -480,9 +480,10 @@ private synchronized void writeChunkPrepare(int buflen, currentPacket = createPacket(packetSize, chunksPerPacket, getStreamer() .getBytesCurBlock(), getStreamer().getAndIncCurrentSeqno(), false); DFSClient.LOG.debug("WriteChunk allocating new packet seqno={}," - + " src={}, packetSize={}, chunksPerPacket={}, bytesCurBlock={}", + + " src={}, packetSize={}, chunksPerPacket={}, bytesCurBlock={}," + + " output stream={}", currentPacket.getSeqno(), src, packetSize, chunksPerPacket, - getStreamer().getBytesCurBlock() + ", " + this); + getStreamer().getBytesCurBlock(), this); } }