HDFS-11547. Add logs for slow BlockReceiver while writing data to disk. Contributed by Xiaobing Zhou.
This commit is contained in:
parent
e1a99802fc
commit
ffa160ddb8
@ -711,6 +711,10 @@ private int receivePacket() throws IOException {
|
||||
streams.writeDataToDisk(dataBuf.array(),
|
||||
startByteToDisk, numBytesToDisk);
|
||||
long duration = Time.monotonicNow() - begin;
|
||||
if (duration > datanodeSlowLogThresholdMs) {
|
||||
LOG.warn("Slow BlockReceiver write data to disk cost:" + duration
|
||||
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
|
||||
}
|
||||
|
||||
if (duration > maxWriteToDiskMs) {
|
||||
maxWriteToDiskMs = duration;
|
||||
|
Loading…
Reference in New Issue
Block a user