Copilot commented on code in PR #7714:
URL: https://github.com/apache/hadoop/pull/7714#discussion_r2111611930


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/RouterAsyncClientProtocol.java:
##########
@@ -1164,4 +1167,28 @@ public Path getEnclosingRoot(String src) throws 
IOException {
     return asyncReturn(Path.class);
   }
 
+  @Override
+  public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
+      throws IOException {
+    rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
+    asyncComplete(getSecurityManager().getDelegationToken(renewer));
+    return asyncReturn(Token.class);

Review Comment:
   [nitpick] Using `asyncReturn(Token.class)` loses the generic type 
information (`DelegationTokenIdentifier`). Consider an explicit cast or adding 
`@SuppressWarnings("unchecked")` to make the conversion clear and safe.
   ```suggestion
       return (Token<DelegationTokenIdentifier>) asyncReturn(Token.class);
   ```



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -2524,4 +2524,8 @@ public void setServerDefaultsLastUpdate(long 
serverDefaultsLastUpdate) {
   public RouterFederationRename getRbfRename() {
     return rbfRename;
   }
+
+  public RouterSecurityManager getSecurityManager() {

Review Comment:
   This new public getter lacks Javadoc and audience annotations; consider 
adding a brief description and an `@InterfaceAudience` tag to clarify intended 
use.



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