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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #544 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/544/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* hadoop-common-project/hadoop-common/CHANGES.txt
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-Hdfs-trunk #2481 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/2481/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* hadoop-common-project/hadoop-common/CHANGES.txt
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-Mapreduce-trunk #2535 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2535/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #604 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/604/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #591 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/591/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* hadoop-common-project/hadoop-common/CHANGES.txt
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

SUCCESS: Integrated in Hadoop-Yarn-trunk #1327 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/1327/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-12178:
-

FAILURE: Integrated in Hadoop-trunk-Commit #8715 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/8715/])
HADOOP-12178. NPE during handling of SASL setup if problem with SASL (zxu: rev 
ed9806ea40b945df0637c21b68964d1d2bd204f3)
* hadoop-common-project/hadoop-common/CHANGES.txt
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java


> 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
> Fix For: 2.8.0
>
> 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)


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

2015-10-27 Thread zhihai xu (JIRA)

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

zhihai xu commented on HADOOP-12178:


Committed it to trunk and branch-2, thanks [~steve_l] for the contribution! 
thanks [~hitliuyi] for the review!

> 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)


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

2015-10-26 Thread zhihai xu (JIRA)

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

zhihai xu commented on HADOOP-12178:


Thanks for the explanations! Checking null pointer may avoid potential NPE from 
code change in the future. +1 for the patch. Will commit this tomorrow if there 
are no objections.

> 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)


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

2015-10-26 Thread Steve Loughran (JIRA)

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

Steve Loughran commented on HADOOP-12178:
-

I'm happy with being robustly paranoid here. We have hit problems with nothing 
resembling a stack trace to track this down, and getting this patch in should 
be enough to stop that hitting anyone else.

> 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)


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

2015-09-25 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-12178:


\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | pre-patch |  17m 21s | Pre-patch trunk compilation is 
healthy. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any 
@author tags. |
| {color:red}-1{color} | tests included |   0m  0s | The patch doesn't appear 
to include any new or modified tests.  Please justify why no new tests are 
needed for this patch. Also please list what manual steps were performed to 
verify this patch. |
| {color:green}+1{color} | javac |   7m 51s | There were no new javac warning 
messages. |
| {color:green}+1{color} | javadoc |  10m  9s | There were no new javadoc 
warning messages. |
| {color:green}+1{color} | release audit |   0m 24s | The applied patch does 
not increase the total number of release audit warnings. |
| {color:green}+1{color} | checkstyle |   1m  5s | There were no new checkstyle 
issues. |
| {color:green}+1{color} | whitespace |   0m  1s | The patch has no lines that 
end in whitespace. |
| {color:green}+1{color} | install |   1m 27s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 33s | The patch built with 
eclipse:eclipse. |
| {color:green}+1{color} | findbugs |   1m 55s | The patch does not introduce 
any new Findbugs (version 3.0.0) warnings. |
| {color:green}+1{color} | common tests |  23m  0s | Tests passed in 
hadoop-common. |
| | |  63m 50s | |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12745025/HADOOP-12178-001.patch 
|
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / 83e65c5 |
| hadoop-common test log | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7705/artifact/patchprocess/testrun_hadoop-common.txt
 |
| Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7705/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7705/console |


This message was automatically generated.

> 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)


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

2015-09-25 Thread zhihai xu (JIRA)

[ 
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)


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

2015-07-20 Thread Steve Loughran (JIRA)

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

Steve Loughran commented on HADOOP-12178:
-

I don't think we need to catch {{Exception}}; IOE should be all that is caught

# it's only IOEs indicating SASL setup problems which *maybe* can be recovered 
from
# That's what is on the signature too. RTEs are the ones that come up despite 
the signature.
# Even with IOEs, there's a lot of possible causes that can't be retried; we'll 
let those surface later.

I realise that leaving as Exception appears the lower risk, but as RTEs are 
caught and rethrown, and with {{RTE, IOE}} being the sole exceptions that I can 
see the codepath handling, I think we should be explicit that it is only IOEs 
that are caught and re-attempted

> 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)


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

2015-07-16 Thread Yi Liu (JIRA)

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

Yi Liu commented on HADOOP-12178:
-

Steve, sorry for late response.
I agree with you not all exceptions indicates a problem with SASL connection, 
and some can be rethrown. Seems {{setupSaslConnection}} only throws IOException 
which is must handled, but not very sure if there are other exceptions thrown 
out. 
To be safety, could we keep the
{code}
} catch (Exception ex) {
{code}
Thanks.

> 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)


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

2015-07-14 Thread Steve Loughran (JIRA)

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

Steve Loughran commented on HADOOP-12178:
-

I looked at the code and thought, yes, we should be rethrowing non IOEs, as 
they represent different failure modes and the sasl client logic would be 
implicitly passed

It comes down to this: the reason the exceptions are being caught and processed 
is the assumption that all exceptions raised in the {{doAs}} clause indicate a 
problem with SASL, and that a new attempt should be made. I don't believe 
that's the case. things like NPEs, class-loading problems, etc, are not 
suitable to fallback, so should just be rethrown. 

my first pass impl actually did
{code}
} catch (RuntimeException ex) { 
 throw e; 
} catch (IOException ex) {
 ...
}
{code}
Doing it this way guarantees that the rethrown exception retains the existing 
type and doesn't get lost in an IOE chain.

The current patch doesn' t need to do that, anything != IOE is impliciatly 
handled. The check for rpcclient == null is there to handle the case that the 
construction process fails for some other reason. 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. 

Do you believe that there are some exceptions which can be raised during SASL 
setup which are not IOEs, yet for which the SASL handling can kick in?




> 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)


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

2015-07-13 Thread Yi Liu (JIRA)

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

Yi Liu commented on HADOOP-12178:
-

Thanks Steve.

{code}
-} catch (Exception ex) {
+} catch (IOException ex) {
{code}
I think changing {{Exception}} to {{IOException}} is unnecessary.
If {{SaslPropertiesResolver.getInstance(conf)}} throws RTE, then {{doAs}} will 
also throws RTE, if we change it to IOE, it can't be caught , so {{if 
(saslRpcClient == null)}} can't reach,  furthermore we need to handle other 
exception here.  

Others look good, just no need to change the exception.

> 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)


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

2015-07-13 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-12178:


\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:red}-1{color} | pre-patch |  15m 30s | Findbugs (version ) appears to 
be broken on trunk. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any 
@author tags. |
| {color:red}-1{color} | tests included |   0m  0s | The patch doesn't appear 
to include any new or modified tests.  Please justify why no new tests are 
needed for this patch. Also please list what manual steps were performed to 
verify this patch. |
| {color:green}+1{color} | javac |   7m 44s | There were no new javac warning 
messages. |
| {color:green}+1{color} | javadoc |   9m 38s | There were no new javadoc 
warning messages. |
| {color:green}+1{color} | release audit |   0m 22s | The applied patch does 
not increase the total number of release audit warnings. |
| {color:green}+1{color} | checkstyle |   0m 41s | There were no new checkstyle 
issues. |
| {color:green}+1{color} | whitespace |   0m  0s | The patch has no lines that 
end in whitespace. |
| {color:green}+1{color} | install |   1m 22s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 33s | The patch built with 
eclipse:eclipse. |
| {color:green}+1{color} | findbugs |   1m 51s | The patch does not introduce 
any new Findbugs (version 3.0.0) warnings. |
| {color:green}+1{color} | common tests |  22m 30s | Tests passed in 
hadoop-common. |
| | |  60m 14s | |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12745025/HADOOP-12178-001.patch 
|
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / 19295b3 |
| hadoop-common test log | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7259/artifact/patchprocess/testrun_hadoop-common.txt
 |
| Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7259/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/7259/console |


This message was automatically generated.

> 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)


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

2015-07-02 Thread Steve Loughran (JIRA)

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

Steve Loughran commented on HADOOP-12178:
-



Tail end of the log 
{code}
Caused by: java.io.IOException: Couldn't set up IO streams
at 
org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:769)\
at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:367)\
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1462)\
at org.apache.hadoop.ipc.Client.call(Client.java:1381)\
... 30 more\
Caused by: java.lang.NullPointerException\
at 
org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:720)\
{code}

Delving into the code, I think the problem is that 
{{SaslPropertiesResolver.getInstance(conf)}} can't instantiate the class listed 
in the config. This raises an RTE, which is caught by {{ipc.Client}}, which 
then calls at the uninitalized {{saslRpcClient}}

# Catching and rethrowing all RTEs would be a start.
# and {{saslRpcClient}} should be checked for null-ness before use

> 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
>
> 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)