zhangxiping1 commented on PR #7714:
URL: https://github.com/apache/hadoop/pull/7714#issuecomment-2911208467

   > > Hi, @zhangxiping1 . Thanks for reporting this problem. Make sense to me. 
We have another way to resolve it, that is using asyncComplete(xxx). Hi, 
@KeeProMise . could you help review this pr when you have free time? Let's 
discuss which way is better.
   > > Hi @zhangxiping1 You can modify it like this: implement the 
getDelegationToken, renewDelegationToken, and cancelDelegationToken methods in 
the RouterAsyncClientProtocol class:
   > 
   > <img alt="image" width="908" 
src="https://private-user-images.githubusercontent.com/38941777/447745892-a6d6cacc-941b-4145-977d-157d7c53f4a3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDgzMjU1NDIsIm5iZiI6MTc0ODMyNTI0MiwicGF0aCI6Ii8zODk0MTc3Ny80NDc3NDU4OTItYTZkNmNhY2MtOTQxYi00MTQ1LTk3N2QtMTU3ZDdjNTNmNGEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTI3VDA1NTQwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFhNGY1YWYyZjg0NzJiNWFmMzA1NTY4ZjUxMjZkYjcwNjM2ODNlMjk1OTJiOWJkNWMyYjgwZTQ1N2UxMzUxODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hkanO91CREXL_Fu_a5K6FSIgcUYiMO1JHtLChc9Iq6o";>
   > ```java
   > @Override
   >   public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
   >       throws IOException {
   >     rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
   >     asyncComplete(this.securityManager.getDelegationToken(renewer));
   >     return asyncReturn(Token.class);
   >   }
   > 
   >   @Override
   >   public long renewDelegationToken(Token<DelegationTokenIdentifier> token)
   >       throws IOException {
   >     rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
   >     asyncComplete(this.securityManager.renewDelegationToken(token));
   >     return asyncReturn(Long.class);
   >   }
   > 
   >   @Override
   >   public void cancelDelegationToken(Token<DelegationTokenIdentifier> token)
   >       throws IOException {
   >     rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
   >     this.securityManager.cancelDelegationToken(token);
   >     asyncComplete(null);
   >   }
   > ```
   
   @KeeProMise   ok,I'll revise and submit the following later.


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

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to