xiaoyuyao commented on a change in 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_r279027806
 
 

 ##########
 File path: 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/OzoneKMSUtil.java
 ##########
 @@ -128,6 +128,9 @@ public static URI getKeyProviderUri(UserGroupInformation 
ugi,
 
   public static KeyProvider getKeyProvider(final Configuration conf,
       final URI serverProviderUri) throws IOException{
+    if (serverProviderUri == null) {
 
 Review comment:
   We should not call getKeyProvider when provider uri is not defined. In 
RpcClient#getKeyProvider() and RestClient#getkeyProvider(), we should do
   
   String kpUri = getKeyProviderUri();
   return kpUri == null ? null : OzoneKMSUtil.getKeyProvider(conf, kpUri);
   

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


With regards,
Apache Git Services

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

Reply via email to