[ 
https://issues.apache.org/jira/browse/HDDS-1430?focusedWorklogId=229946&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-229946
 ]

ASF GitHub Bot logged work on HDDS-1430:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Apr/19 22:46
            Start Date: 18/Apr/19 22:46
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #752: HDDS-1430. 
NPE if secure ozone if KMS uri is not defined. Contributed by Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/752#discussion_r276858612
 
 

 ##########
 File path: 
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/OzoneFileSystem.java
 ##########
 @@ -59,7 +59,13 @@ public URI getKeyProviderUri() throws IOException {
   @Override
   public DelegationTokenIssuer[] getAdditionalTokenIssuers()
       throws IOException {
-    KeyProvider keyProvider = getKeyProvider();
+    KeyProvider keyProvider;
+    try {
+      keyProvider = getKeyProvider();
+    } catch (IOException ioe) {
+      LOG.error("Error retrieving KeyProvider.", ioe);
+      return null;
+    }
     if (keyProvider instanceof DelegationTokenIssuer) {
 
 Review comment:
   Why don't we just check keyProvider!=null on Line 69 before check if 
keyProvider instanceof? This way, we don't need other changes. 
   
   Note getKeyProvider() will be eventually fixed when OM returns its KMS uri 
to the client as part of it service discovery. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 229946)
    Time Spent: 20m  (was: 10m)

> NPE if secure ozone if KMS uri is not defined.
> ----------------------------------------------
>
>                 Key: HDDS-1430
>                 URL: https://issues.apache.org/jira/browse/HDDS-1430
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>    Affects Versions: 0.4.0
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> OzoneKMSUtil.getKeyProvider throws NPE if KMS uri is not defined. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to