hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhe Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12615) Fix NPE in MiniKMS.start()
Date Wed, 16 Dec 2015 22:04:46 GMT

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

Zhe Zhang commented on HADOOP-12615:
------------------------------------

Thanks Wei-Chiu. +1 on the latest patch pending a couple of minor suggestions:
# In {{ThreadUtil#getResourceAsStream}} I suggest we throw an exception when current thread's
CL is null. Pls let me know you have an explanation that the same input stream will be returned
from ThreadUtil's CL.
# Similarly, I suggest we remove the change in {{Server}}, or change it to throw an exception.
Otherwise it will possibly use the CL of ThreadUtil.
{code}
	    if (is == null) {
	      throw new IOException("Can not read resource file '" +
	          resourceName + "'");
	    }
{code}

> Fix NPE in MiniKMS.start()
> --------------------------
>
>                 Key: HADOOP-12615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12615
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: kms, test
>    Affects Versions: 3.0.0
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Minor
>              Labels: jenkins, supportability, test
>         Attachments: HADOOP-12615.001.patch, HADOOP-12615.002.patch, HADOOP-12615.003.patch,
HADOOP-12615.004.patch, HADOOP-12615.005.patch, HADOOP-12615.006.patch
>
>
> Sometimes, KMS resource file can not be loaded. When this happens, an InputStream variable
will be a null pointer which will subsequently throw NPE.
> This is a supportability JIRA that makes the error message more explicit, and explain
why NPE is thrown. Ultimately, leads us to understand why the resource files can not be loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message