You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "zhihai xu (JIRA)" <ji...@apache.org> on 2015/09/25 21:49:05 UTC

[jira] [Commented] (HADOOP-12178) NPE during handling of SASL setup if problem with SASL resolver class

    [ 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?
{code}
new IOException("Couldn't set up IO streams: "+ t, t)
{code}

> 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
(v6.3.4#6332)