sodonnel commented on a change in pull request #2728:
URL: https://github.com/apache/hadoop/pull/2728#discussion_r610529393
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
##########
@@ -905,6 +907,14 @@ void waitForAckedSeqno(long seqno) throws IOException {
}
try {
dataQueue.wait(1000); // when we receive an ack, we notify on
+ long duration = Time.monotonicNow() - begin;
+ if (duration > writeTimeout) {
+ LOG.error("No ack received, took {}ms (threshold={}ms). "
+ + "File being written: {}, block: {}, "
+ + "Write pipeline datanodes: {}.",
+ duration, writeTimeout, src, block, nodes);
+ throw new InterruptedIOException("No ack received. ");
Review comment:
I think it would be good to log the duration waited and perhaps the
timeout in the exception, eg:
```
throw new InterruptedIOException("No ack received after " + duration / 1000
+ "s and a timeout of " + writeTimeout / 1000 + "s");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]