Skip to content
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

HDFS-17632. RBF: Support listOpenFiles for routers #7075

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

Conversation

kokon191
Copy link
Contributor

Description of PR

Routers don't have support for listOpenFiles yet. Single destination paths are straightforward. Multi destination paths are joined; entries with inodeId > min(max(entry inodeIds)) are ignored to get a consistent prevId for the iterator.

How was this patch tested?

UTs.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 33s 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 _
+0 🆗 mvndep 14m 16s Maven dependency ordering for branch
+1 💚 mvninstall 35m 37s trunk passed
+1 💚 compile 6m 11s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 5m 55s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 1m 26s trunk passed
+1 💚 mvnsite 2m 13s trunk passed
+1 💚 javadoc 1m 52s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 2m 19s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 4m 58s trunk passed
+1 💚 shadedclient 40m 49s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 1m 51s the patch passed
+1 💚 compile 6m 18s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 6m 18s the patch passed
+1 💚 compile 5m 40s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 5m 40s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 24s the patch passed
+1 💚 mvnsite 1m 59s the patch passed
-1 ❌ javadoc 1m 6s /results-javadoc-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.txt hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 generated 1 new + 3116 unchanged - 0 fixed = 3117 total (was 3116)
+1 💚 javadoc 2m 7s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 5m 4s the patch passed
+1 💚 shadedclient 42m 1s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 224m 14s hadoop-hdfs in the patch passed.
-1 ❌ unit 30m 57s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 47s The patch does not generate ASF License warnings.
443m 16s
Reason Tests
Failed junit tests hadoop.hdfs.server.federation.security.token.TestZKDelegationTokenSecretManagerImpl
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/1/artifact/out/Dockerfile
GITHUB PR #7075
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 9033aff95b68 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 07f1c27
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/1/testReport/
Max. process+thread count 3985 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/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 7m 1s 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 _
+0 🆗 mvndep 16m 27s Maven dependency ordering for branch
+1 💚 mvninstall 20m 22s trunk passed
+1 💚 compile 2m 52s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 2m 49s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 0m 50s trunk passed
+1 💚 mvnsite 1m 13s trunk passed
+1 💚 javadoc 1m 14s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 32s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 35s trunk passed
+1 💚 shadedclient 20m 26s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 1m 0s the patch passed
+1 💚 compile 2m 55s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 2m 55s the patch passed
+1 💚 compile 2m 45s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 2m 45s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 37s hadoop-hdfs-project: The patch generated 0 new + 38 unchanged - 1 fixed = 38 total (was 39)
+1 💚 mvnsite 1m 1s the patch passed
+1 💚 javadoc 0m 55s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 23s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 38s the patch passed
+1 💚 shadedclient 20m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 193m 10s hadoop-hdfs in the patch passed.
+1 💚 unit 27m 10s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 34s The patch does not generate ASF License warnings.
333m 25s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/2/artifact/out/Dockerfile
GITHUB PR #7075
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux e0167e8f2118 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 1f61941
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/2/testReport/
Max. process+thread count 5235 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/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.

for (Map.Entry<RemoteLocation, BatchedEntries> entry : results.entrySet()) {
BatchedEntries nsEntries = entry.getValue();
hasMore |= nsEntries.hasMore();
for (int i = 0; i< nsEntries.size(); i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for (int i = 0; i < nsEntries.size(); i++) {

OpenFileEntry ofe = (OpenFileEntry) nsEntries.get(i);
if (ofe.getId() > minOfMax) {
hasMore = true;
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

break?

// Get the largest inodeIds for each namespace, and the smallest inodeId of them
// then ignore all entries above this id to keep a consistent prevId for the next listOpenFiles
long minOfMax = Long.MAX_VALUE;
for (BatchedEntries nsEntries : results.values()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to loop these BatchedEntries once to get the result?

It seems that the efficiency of two cycles is a bit low.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with this option because this approach doesn't require changing the current protocol for listOpenFiles (id, types, path), otherwise client needs to be aware of the last id for each namespace. I think router getListing uses the same logic

@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 _
+0 🆗 mvndep 14m 32s Maven dependency ordering for branch
+1 💚 mvninstall 23m 20s trunk passed
-1 ❌ compile 0m 16s /branch-compile-hadoop-hdfs-project-jdkUbuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.txt hadoop-hdfs-project in trunk failed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.
+1 💚 compile 3m 10s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 0m 51s trunk passed
+1 💚 mvnsite 1m 20s trunk passed
+1 💚 javadoc 1m 13s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 42s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 53s trunk passed
+1 💚 shadedclient 24m 39s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for patch
+1 💚 mvninstall 1m 3s the patch passed
-1 ❌ compile 0m 14s /patch-compile-hadoop-hdfs-project-jdkUbuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.txt hadoop-hdfs-project in the patch failed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.
-1 ❌ javac 0m 14s /patch-compile-hadoop-hdfs-project-jdkUbuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.txt hadoop-hdfs-project in the patch failed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04.
+1 💚 compile 2m 59s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 2m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 40s hadoop-hdfs-project: The patch generated 0 new + 38 unchanged - 1 fixed = 38 total (was 39)
+1 💚 mvnsite 1m 6s the patch passed
+1 💚 javadoc 0m 58s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 33s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 54s the patch passed
+1 💚 shadedclient 22m 51s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 193m 57s hadoop-hdfs in the patch passed.
+1 💚 unit 27m 2s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 30s The patch does not generate ASF License warnings.
332m 7s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/3/artifact/out/Dockerfile
GITHUB PR #7075
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux bf2767350103 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 6bd2257
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/3/testReport/
Max. process+thread count 4817 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7075/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.

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.

3 participants