xinglin opened a new pull request, #6446:
URL: https://github.com/apache/hadoop/pull/6446
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
In DFSInputStream#actualGetFromOneDataNode() and
DFSInputStream#readBuffer(), it would send the exception stacktrace to the
dfsClient.LOG whenever we fail on a DN. However, in most cases, the read
request will be served successfully by reading from the next available DN. The
existence of exception stacktrace in the log has caused multiple hadoop users
at Linkedin to consider this WARN message as the RC/fatal error for their jobs.
We would like to improve the log message and avoid sending the stacktrace to
dfsClient.LOG when a read succeeds. The stackTrace when reading reach DN is
sent to the log only when we really need to fail a read request (when
chooseDataNode()/refetchLocations() throws a BlockMissingException).
### How was this patch tested?
```
mvn test -Dtest=TestPread,TestRead
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hdfs.TestPread
[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
72.325 s - in org.apache.hadoop.hdfs.TestPread
[INFO] Running org.apache.hadoop.hdfs.TestRead
[WARNING] Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed:
29.558 s - in org.apache.hadoop.hdfs.TestRead
```
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]