hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1909) Use new HA code for Non-HA in OM
Date Fri, 30 Aug 2019 17:43:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 30/Aug/19 17:42
            Start Date: 30/Aug/19 17:42
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1225: HDDS-1909. Use new
HA code for Non-HA in OM.
URL: https://github.com/apache/hadoop/pull/1225#discussion_r319613353
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java
 ##########
 @@ -101,6 +115,29 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
     UpdateGetDelegationTokenRequest updateGetDelegationTokenRequest =
         getOmRequest().getUpdateGetDelegationTokenRequest();
 
+    OMResponse.Builder omResponse =
+        OMResponse.newBuilder()
+            .setCmdType(OzoneManagerProtocolProtos.Type.GetDelegationToken)
+            .setStatus(OzoneManagerProtocolProtos.Status.OK)
+            .setSuccess(true);
+
+    OMClientResponse omClientResponse = null;
+
+
+    // If security is not enabled and token request is received, leader
+    // returns token null. So, check here if updatedGetDelegationTokenResponse
+    // has response set or not. If it is not set, then token is null.
+    if (!updateGetDelegationTokenRequest.getGetDelegationTokenResponse()
+        .hasResponse()) {
+      omClientResponse = new OMGetDelegationTokenResponse(null, -1L,
+          omResponse.setGetDelegationTokenResponse(
+              GetDelegationTokenResponseProto.newBuilder()).build());
+      omClientResponse.setFlushFuture(
 
 Review comment:
   No, it will not be written to DB. Because we have below code in OMGetDelegationTokenResponse.
   ```
   if (ozoneTokenIdentifier != null &&
           getOMResponse().getStatus() == OzoneManagerProtocolProtos.Status.OK) {
   ```
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 304445)
    Time Spent: 10h 50m  (was: 10h 40m)

> Use new HA code for Non-HA in OM
> --------------------------------
>
>                 Key: HDDS-1909
>                 URL: https://issues.apache.org/jira/browse/HDDS-1909
>             Project: Hadoop Distributed Data Store
>          Issue Type: New Feature
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10h 50m
>  Remaining Estimate: 0h
>
> This Jira is to use new HA code of OM in Non-HA code path.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message