Skip to content

HDFS-17793. [ARR] RBF: Enable the router asynchronous RPC feature to handle DelegationToken request errors #7714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

zhangxiping1
Copy link
Contributor

Enable the router asynchronous RPC feature to handle getDelegationToken request errors.

@hfutatzhanghb
Copy link
Contributor

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.

@KeeProMise
Copy link
Member

KeeProMise commented May 27, 2025

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:

image
@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 KeeProMise changed the title HDFS-17793. RBF: Enable the router asynchronous RPC feature to handle… HDFS-17793. [ARR] RBF: Enable the router asynchronous RPC feature to handle… May 27, 2025
@KeeProMise KeeProMise changed the title HDFS-17793. [ARR] RBF: Enable the router asynchronous RPC feature to handle… HDFS-17793. [ARR] RBF: Enable the router asynchronous RPC feature to handle DelegationToken request errors May 27, 2025
@zhangxiping1
Copy link
Contributor Author

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:

image ```java @OverRide public Token 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 token)
throws IOException {
rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
asyncComplete(this.securityManager.renewDelegationToken(token));
return asyncReturn(Long.class);
}

@OverRide
public void cancelDelegationToken(Token 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.

@KeeProMise KeeProMise requested a review from Copilot May 27, 2025 06:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Enable the router’s asynchronous RPC support for delegation token operations by removing the old synchronous overrides and adding a basic test.

  • Added a test stub for getDelegationToken in the async RPC test suite.
  • Removed the synchronous getDelegationToken, renewDelegationToken, and cancelDelegationToken overrides in favor of the async router mechanism.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
hadoop-hdfs-project/.../TestRouterAsyncRpc.java Added testgetDelegationToken stub without assertions
hadoop-hdfs-project/.../RouterClientNamenodeProtocolServerSideTranslatorPB.java Removed synchronous delegation-token RPC overrides
Comments suppressed due to low confidence (2)

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncRpc.java:95

  • [nitpick] The method name testgetDelegationToken is inconsistent with camelCase conventions; consider renaming it to testGetDelegationToken for readability and consistency.
public void testgetDelegationToken() throws Exception {

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/protocolPB/RouterClientNamenodeProtocolServerSideTranslatorPB.java:979

  • The synchronous overrides for delegation token operations were removed without replacement; callers of these RPCs will now receive null. Implement the asyncRouterServer logic for getDelegationToken, renewDelegationToken, and cancelDelegationToken to ensure proper handling.
@Override


@Test
public void testgetDelegationToken() throws Exception {
rndRouter.getFileSystem().getDelegationToken("yarn");
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not include any assertions to verify the returned token or expected error; add assertions (e.g., assertNotNull or expected exception) to validate behavior.

Suggested change
rndRouter.getFileSystem().getDelegationToken("yarn");
// Get the delegation token for the user "yarn".
org.apache.hadoop.security.token.Token<?> token =
rndRouter.getFileSystem().getDelegationToken("yarn");
// Assert that the token is not null.
assertNotNull(token, "Delegation token should not be null");
// Optionally, verify additional properties of the token.
assertEquals("yarn", token.getService().toString(),
"The token service should match the requested user");

Copilot uses AI. Check for mistakes.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 21m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 41m 8s trunk passed
+1 💚 compile 1m 14s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 43s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 32s trunk passed
+1 💚 mvnsite 0m 47s trunk passed
+1 💚 javadoc 0m 44s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 32s trunk passed
+1 💚 shadedclient 40m 33s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 1m 4s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 4s the patch passed
+1 💚 compile 0m 34s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 34s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 20s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0)
+1 💚 mvnsite 0m 37s the patch passed
+1 💚 javadoc 0m 31s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 25s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 29s the patch passed
+1 💚 shadedclient 40m 14s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 49m 19s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 39s The patch does not generate ASF License warnings.
206m 46s
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/1/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 1dc538c6ddc0 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / cfff3b9
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/1/testReport/
Max. process+thread count 2845 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 22m 38s trunk passed
+1 💚 compile 0m 34s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 27s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 29s trunk passed
+1 💚 javadoc 0m 29s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 20s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 59s trunk passed
+1 💚 shadedclient 20m 13s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 20s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 33s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 14s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
+1 💚 mvnsite 0m 23s the patch passed
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 17s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 54s the patch passed
+1 💚 shadedclient 20m 6s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 42m 44s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
114m 45s
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/3/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 764edda9506b 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 1a0e9a7
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/3/testReport/
Max. process+thread count 2892 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@KeeProMise
Copy link
Member

@zhangxiping1 Here is a Checkstyle exception /hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:171: protected RouterSecurityManager securityManager = null;:35: Variable 'securityManager' must be private and have accessor methods. [VisibilityModifier]

@zhangxiping1
Copy link
Contributor Author

@zhangxiping1 Here is a Checkstyle exception /hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:171: protected RouterSecurityManager securityManager = null;:35: Variable 'securityManager' must be private and have accessor methods. [VisibilityModifier]

ok ,I'll make some more revisions.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 40m 42s trunk passed
+1 💚 compile 1m 14s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 43s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 33s trunk passed
+1 💚 mvnsite 0m 47s trunk passed
+1 💚 javadoc 0m 44s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 33s trunk passed
+1 💚 shadedclient 39m 54s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 1m 7s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 7s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 35s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 20s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
+1 💚 mvnsite 0m 38s the patch passed
+1 💚 javadoc 0m 32s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 25s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 31s the patch passed
+1 💚 shadedclient 40m 18s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 49m 16s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 39s The patch does not generate ASF License warnings.
185m 22s
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/2/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 5915fdf5e03b 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 1a0e9a7
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/2/testReport/
Max. process+thread count 2809 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 20s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 23m 49s trunk passed
+1 💚 compile 0m 31s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 23s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 18s trunk passed
+1 💚 mvnsite 0m 27s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 19s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 55s trunk passed
+1 💚 shadedclient 21m 32s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 19s the patch passed
+1 💚 compile 0m 29s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 29s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 20s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 12s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 javadoc 0m 17s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 15s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 52s the patch passed
+1 💚 shadedclient 22m 5s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 40m 57s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 23s The patch does not generate ASF License warnings.
116m 47s
Reason Tests
Failed junit tests hadoop.hdfs.server.federation.router.TestRouterMountTableCacheRefresh
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/4/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux d720409919bc 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 31ed810
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/4/testReport/
Max. process+thread count 3139 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 20s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 23m 39s trunk passed
+1 💚 compile 0m 32s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 23s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 19s trunk passed
+1 💚 mvnsite 0m 26s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 20s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 54s trunk passed
+1 💚 shadedclient 22m 7s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 22s the patch passed
+1 💚 compile 0m 29s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 29s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 10s the patch passed
+1 💚 mvnsite 0m 22s the patch passed
+1 💚 javadoc 0m 17s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 15s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 50s the patch passed
+1 💚 shadedclient 23m 30s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 42m 17s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
119m 59s
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/5/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 530e10c6ffc4 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5420337
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/5/testReport/
Max. process+thread count 2913 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/5/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@zhangxiping1
Copy link
Contributor Author

@KeeProMise hi, lao tie, it seems to be okay.

@KeeProMise
Copy link
Member

@KeeProMise hi, lao tie, it seems to be okay.

@zhangxiping1 LGTM + 1. Let's wait for two days to see if there are any other comments.

Comment on lines 93 to 94


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zhangxiping1 Just leave a blank line here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 50s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 41m 36s trunk passed
+1 💚 compile 1m 13s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 42s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 32s trunk passed
+1 💚 mvnsite 0m 46s trunk passed
+1 💚 javadoc 0m 43s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 32s trunk passed
+1 💚 shadedclient 39m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 36s the patch passed
+1 💚 compile 1m 6s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 6s the patch passed
+1 💚 compile 0m 34s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 34s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 21s the patch passed
+1 💚 mvnsite 0m 38s the patch passed
+1 💚 javadoc 0m 32s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 24s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 29s the patch passed
+1 💚 shadedclient 39m 58s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 49m 38s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
185m 29s
Subsystem Report/Notes
Docker ClientAPI=1.49 ServerAPI=1.49 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/6/artifact/out/Dockerfile
GITHUB PR #7714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 64a892f0b07d 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ec35000
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/6/testReport/
Max. process+thread count 2756 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7714/6/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@KeeProMise KeeProMise requested a review from Copilot May 28, 2025 11:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables the router’s asynchronous RPC feature to support delegation token operations and adds a basic test for the new async getDelegationToken call.

  • Added async implementations for getDelegationToken, renewDelegationToken, and cancelDelegationToken in RouterAsyncClientProtocol
  • Exposed getSecurityManager() in RouterClientProtocol to back the async handlers
  • Introduced a new test to verify no exception is thrown when calling getDelegationToken asynchronously

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TestRouterAsyncRpc.java Added testGetDelegationTokenAsyncRpc using assertDoesNotThrow
RouterAsyncClientProtocol.java Implemented async methods for delegation token operations
RouterClientProtocol.java Exposed getSecurityManager() getter
Comments suppressed due to low confidence (2)

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncRpc.java:97

  • The test only asserts that no exception is thrown; consider adding assertNotNull on the returned token to validate the async call actually returns a valid delegation token.
assertDoesNotThrow(() -> {

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncRpc.java:94

  • There are no tests covering renewDelegationToken or cancelDelegationToken async methods; consider adding similar tests to ensure those flows handle errors correctly.
@Test

throws IOException {
rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);
asyncComplete(getSecurityManager().getDelegationToken(renewer));
return asyncReturn(Token.class);
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
return asyncReturn(Token.class);
return (Token<DelegationTokenIdentifier>) asyncReturn(Token.class);

Copilot uses AI. Check for mistakes.

@@ -2524,4 +2524,8 @@ public void setServerDefaultsLastUpdate(long serverDefaultsLastUpdate) {
public RouterFederationRename getRbfRename() {
return rbfRename;
}

public RouterSecurityManager getSecurityManager() {
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.

Copy link
Contributor

@hfutatzhanghb hfutatzhanghb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants