[
https://issues.apache.org/jira/browse/HADOOP-16019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734060#comment-16734060
]
Steve Loughran edited comment on HADOOP-16019 at 1/4/19 11:41 AM:
------------------------------------------------------------------
checkstyle is line too long, please break
I'd prefer you just use +
{code}
("Could not Load ZK acls or aut: " + ex, ex)
{code}
Why? Not all exceptions have a getMessage value (e.g. NullPointerException).
was (Author: [email protected]):
checkstyle is line too long, please break
Given the exception is being logged, no need for the +ex.getMessage() on the
string. If you really want it, I'd prefer ex.toString (not all exceptions have
a message, with NPE being the key example). You can go
{code}
LOG.warn("text {}", e, e)
{code}
and have the toString invoked only on demand.
> ZKDelegationTokenSecretManager won't log exception message occured in
> function setJaasConfiguration
> ---------------------------------------------------------------------------------------------------
>
> Key: HADOOP-16019
> URL: https://issues.apache.org/jira/browse/HADOOP-16019
> Project: Hadoop Common
> Issue Type: Improvement
> Components: common
> Affects Versions: 3.1.0
> Reporter: luhuachao
> Assignee: luhuachao
> Priority: Minor
> Attachments: HADOOP-16019.1.patch, HADOOP-16019.2.patch
>
>
> * when the config ZK_DTSM_ZK_KERBEROS_KEYTAB or
> ZK_DTSM_ZK_KERBEROS_PRINCIPAL are not set, the IllegalArgumentException
> message cannot be logged.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]