ayushtkn commented on a change in pull request #2066:
URL: https://github.com/apache/ozone/pull/2066#discussion_r598889982
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
##########
@@ -587,4 +587,15 @@ public CertificateClient getCertificateClient() {
public void setCertificateClient(CertificateClient client) {
dnCertClient = client;
}
+
+ @Override
+ public void printError(Throwable error) {
+ if (error.getMessage() == null || error.getMessage().length() == 0) {
+ //message could be null in case of NPE. This is unexpected so we can
+ //print out the stack trace.
+ LOG.error("Exception in HddsDatanodeService.", error);
+ } else {
+ LOG.error(error.getMessage().split("\n")[0]);
Review comment:
Guess can keep this only for both the cases :
```
LOG.error("Exception in HddsDatanodeService.", error);
```
Sometimes having trace of the exception really helps
--
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]