Xiao Chen commented on HADOOP-15234:

Thanks for the patch [~zhenyi].

Some comments:
 * We can actually use preconditions {{checkArgument}} method to check the 
variable and provide the exception message.
 * Suggest to use {{HADOOP_SECURITY_KEY_PROVIDER_PATH}} from 
{{CommonConfigurationKeysPublic}} instead of hard code.
 * Idea of testing is good. Suggest to instead of using {{isExitSystem}}, use a 
more self-explaining variable name like {{rethrowExceptionForTesting}}

> NPE when initializing KMSWebApp
> -------------------------------
>                 Key: HADOOP-15234
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15234
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: kms
>            Reporter: Xiao Chen
>            Assignee: fang zhenyi
>            Priority: Major
>         Attachments: HADOOP-15234.001.patch
> During KMS startup, if the {{keyProvider}} is null, it will NPE inside 
> KeyProviderExtension.
> {noformat}
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.crypto.key.KeyProviderExtension.<init>(KeyProviderExtension.java:43)
>       at 
> org.apache.hadoop.crypto.key.CachingKeyProvider.<init>(CachingKeyProvider.java:93)
>       at 
> org.apache.hadoop.crypto.key.kms.server.KMSWebApp.contextInitialized(KMSWebApp.java:170)
> {noformat}
> We're investigating the exact scenario that could lead to this, but the NPE 
> and log around it can be improved.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to