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

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

                Author: ASF GitHub Bot
            Created on: 02/Oct/19 05:52
            Start Date: 02/Oct/19 05:52
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1571: 
HDDS-2228. Fix NPE in OzoneDelegationTokenManager#addPersistedDelegat…
URL: https://github.com/apache/hadoop/pull/1571#discussion_r330380311
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/OzoneDelegationTokenSecretManager.java
 ##########
 @@ -84,13 +84,16 @@
    * milliseconds
    * @param dtRemoverScanInterval how often the tokens are scanned for expired
    * tokens in milliseconds
+   * @param certClient certificate client to SCM CA
    */
   public OzoneDelegationTokenSecretManager(OzoneConfiguration conf,
       long tokenMaxLifetime, long tokenRenewInterval,
       long dtRemoverScanInterval, Text service,
-      S3SecretManager s3SecretManager) throws IOException {
+      S3SecretManager s3SecretManager, CertificateClient certClient)
+      throws IOException {
     super(new SecurityConfig(conf), tokenMaxLifetime, tokenRenewInterval,
         service, LOG);
+    setCertClient(certClient);
 
 Review comment:
   I understood why it is done like this by adding a new method setCertClient, 
as the OzoneSecretManager is base class for OzoneBlockTokenSecretManager also. 
Does it look clean if we pass the certClient to superclass constructor?
   If it is too much change I am fine with the current approach too.
 
----------------------------------------------------------------
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: 321695)
    Time Spent: 0.5h  (was: 20m)

> Fix NPE in OzoneDelegationTokenManager#addPersistedDelegationToken
> ------------------------------------------------------------------
>
>                 Key: HDDS-2228
>                 URL: https://issues.apache.org/jira/browse/HDDS-2228
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>    Affects Versions: 0.4.0
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Blocker
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The certClient was not initialized in proper order as a result, when OM 
> restart with delegation token issued, the ozone delegation token secret 
> manager NPE. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to