hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijie Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1363) Get / Cancel / Renew delegation token api should be non blocking
Date Fri, 28 Feb 2014 04:11:20 GMT

    [ https://issues.apache.org/jira/browse/YARN-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915442#comment-13915442
] 

Zhijie Shen commented on YARN-1363:
-----------------------------------

Jian, thanks for the comments.

bq. we don’t need a separate api getIsObtained in GetDelegationTokenResponse, setting the
token as null means not obtained.

This is because I want to make three kinds of responses semantically consistent, and since
we anyway make the change incompatible, it's good to change to what looks better.

bq. RMDelegationTokenEventType: CREATE_RMDT-> CREATE, similarly others.

Done

bq. RMDelegationTokenIdentifier.renew(): I think it’s fine to blockingly renew the token
here instead of keeping polling as this renew method is called by DelegationTokenRenewer which
is already asynchronously renewing.

This is because renew/cancel is called from ApplicationClientProtocol.

bq. RMDTOperationState.IN_PROFESS typo

Done

bq. can RMDTOperationKey contain RMDTIdentifer and the operation type as the key?

I understand you concern here, but I intentionally extract owner, user and renewer from RMDTIdentifer
to construct the key, as they are the only fields in RMDTIdentifer that are used to by hashCode()
and equals(). However, to make the code clearer, I add a constructor for RMDTOperationKey
to take RMDTIdentifer as param.

bq. createTokenAsync: we can return the RMDTOperationValue which includes the token, and so
we don’t need a separate method pollToken to get the token. similarly for renew

I did the following instead: in xxxxTokenAsync, instead of returning the state, returning
the result/throwing the exception if the state is FINISHED, which should make the code clearer.

bq. the following code is duplicated in the try and catch, similarly for cancel.

I refactored the code in handleRMDelegationTokenEvent.


> Get / Cancel / Renew delegation token api should be non blocking
> ----------------------------------------------------------------
>
>                 Key: YARN-1363
>                 URL: https://issues.apache.org/jira/browse/YARN-1363
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Omkar Vinit Joshi
>            Assignee: Zhijie Shen
>         Attachments: YARN-1363.1.patch, YARN-1363.10.patch, YARN-1363.10.patch, YARN-1363.2.patch,
YARN-1363.3.patch, YARN-1363.4.patch, YARN-1363.5.patch, YARN-1363.6.patch, YARN-1363.7.patch,
YARN-1363.8.patch, YARN-1363.9.patch
>
>
> Today GetDelgationToken, CancelDelegationToken and RenewDelegationToken are all blocking
apis.
> * As a part of these calls we try to update RMStateStore and that may slow it down.
> * Now as we have limited number of client request handlers we may fill up client handlers
quickly.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message