[ https://issues.apache.org/jira/browse/HDFS-17793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17954223#comment-17954223 ]
ASF GitHub Bot commented on HDFS-17793: --------------------------------------- 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. > RBF: Enable the router asynchronous RPC feature to handle getDelegationToken > request errors > ------------------------------------------------------------------------------------------- > > Key: HDFS-17793 > URL: https://issues.apache.org/jira/browse/HDFS-17793 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Xiping Zhang > Assignee: Xiping Zhang > Priority: Major > Labels: pull-request-available > Attachments: image-2025-05-27-10-58-55-652.png, > image-2025-05-27-10-59-27-965.png, image-2025-05-27-11-04-40-734.png, > image-2025-05-27-11-27-09-710.png > > > !image-2025-05-27-10-58-55-652.png|width=1209,height=230! > !image-2025-05-27-10-59-27-965.png! -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org