hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhihai xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12178) NPE during handling of SASL setup if problem with SASL resolver class
Date Fri, 25 Sep 2015 19:49:05 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-12178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908570#comment-14908570

zhihai xu commented on HADOOP-12178:

Thanks for the patch [~steve_l]! 
bq.  things like NPEs, class-loading problems, etc, are not suitable to fallback, so should
just be rethrown.
Agreed. IMHO, yes, It makes sense to just catch IOE.
bq. Given the constructor doesn't include IOE as an exception, I actually think the case of
IOE+rpcclient==null isn't possible, but felt that keeping the check in there would only be
another safety option.
I double checked the code path, I also think IOE+rpcclient==null isn't possible. Shall we
remove the check? If this really happens, it is most likely a bug inside {{setupSaslConnection}}.
IMHO, the safety option is not necessary and it will also make the code simpler.
Minor nit: Can we add a space before {{+}} at the following code?
new IOException("Couldn't set up IO streams: "+ t, t)

> NPE during handling of SASL setup if problem with SASL resolver class
> ---------------------------------------------------------------------
>                 Key: HADOOP-12178
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12178
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 2.7.1
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-12178-001.patch
> If there's any problem in the constructor of {{SaslRpcClient}}, then IPC Client throws
an NPE rather than forwarding the stack trace. This is because the exception handler assumes
that {{saslRpcClient}} is not null, that the exception is related to the SASL setup itself.
> The exception handler needs to check for {{saslRpcClient}} being null, and if so, rethrow
the exception

This message was sent by Atlassian JIRA

View raw message