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

MAPREDUCE-7431. ShuffleHandler refactor and fix after Netty4 upgrade. #5311

Merged
merged 4 commits into from Feb 10, 2023

Conversation

tomicooler
Copy link
Contributor

@tomicooler tomicooler commented Jan 18, 2023

Change-Id: Ifedad2fae1ddd8f22623b5d44875b20a3b3fd318

Description of PR

Key takeaways:

  • refactor: make ShuffleChannelHandler not sharable
  • content-length is set regardless of keep-alive
  • file access is validated before sending anything
  • any error during sending the content, just log and close the connection, the clients can check the content-length versus received size
  • removed the 3x async sendMap for cycle, see details in the Jira
  • fixed boss group's thread count and the accepted channel group initiation
  • fixed future handling on last content
  • fixed missing return after sendError
  • fixed memory leak in channelRead
  • unit tests are run with ResourceLeakDetector.setLevel(PARANOID)
  • unit tests validate the content
  • unit tests with SSL
  • documentation of the HTTP request / response

Check Jira for more details: https://issues.apache.org/jira/browse/MAPREDUCE-7431

How was this patch tested?

The new unit tests are better at validating the content of the response.

Generated a 10 GB input.
{code}
hdfs dfs -rm -r -skipTrash /tmp/sort_input
yarn jar hadoop-3.4.0-SNAPSHOT/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.4.0-SNAPSHOT.jar randomwriter "-Dmapreduce.randomwriter.totalbytes=10000000000" /tmp/sort_input
{code}

Then sorted it, tested with -r 1 and -r 40 too.
{code}
hdfs dfs -rm -r -skipTrash /tmp/sort_output
yarn jar hadoop-3.4.0-SNAPSHOT/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.4.0-SNAPSHOT.jar sort -Dmapreduce.job.reduce.slowstart.completedmaps=1 -r 40 /tmp/sort_input /tmp/sort_output | tee sort_app_output.txt
{code}

Tested with SSL enabled/disabled too.

I saw no performance degradation during my measurements (compared to the latest netty4 version).

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?

  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

    I added ch.qos.logback for just a test dependency. LGPL.

  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

Change-Id: Ifedad2fae1ddd8f22623b5d44875b20a3b3fd318
Change-Id: Iaf37e847d689c6b46a5d819f3397865e1d2c05d7
@tomicooler tomicooler marked this pull request as draft January 18, 2023 16:41
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s 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.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 48m 10s trunk passed
+1 💚 compile 0m 26s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 23s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 24s trunk passed
+1 💚 mvnsite 0m 29s trunk passed
+1 💚 javadoc 0m 31s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javadoc 0m 20s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 0m 52s trunk passed
+1 💚 shadedclient 26m 47s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 31s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 19s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 12s /results-checkstyle-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle: The patch generated 11 new + 8 unchanged - 29 fixed = 19 total (was 37)
+1 💚 mvnsite 0m 21s the patch passed
-1 ❌ javadoc 0m 18s /patch-javadoc-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-mapreduce-client-shuffle in the patch failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
-1 ❌ javadoc 0m 16s /patch-javadoc-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkPrivateBuild-1.8.0_352-8u352-ga-1~20.04-b08.txt hadoop-mapreduce-client-shuffle in the patch failed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08.
+1 💚 spotbugs 0m 47s the patch passed
+1 💚 shadedclient 26m 18s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 35s hadoop-mapreduce-client-shuffle in the patch passed.
-1 ❌ asflicense 0m 33s /results-asflicense.txt The patch generated 1 ASF License warnings.
111m 5s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/1/artifact/out/Dockerfile
GITHUB PR #5311
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux ebbc81ae26e4 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ea8f12a
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/1/testReport/
Max. process+thread count 538 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/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 53s 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.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 47m 56s trunk passed
+1 💚 compile 0m 28s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 25s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 25s trunk passed
+1 💚 mvnsite 0m 27s trunk passed
+1 💚 javadoc 0m 32s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javadoc 0m 21s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 0m 52s trunk passed
+1 💚 shadedclient 25m 51s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 33s the patch passed
+1 💚 compile 0m 22s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 22s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 11s /results-checkstyle-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle: The patch generated 11 new + 8 unchanged - 29 fixed = 19 total (was 37)
+1 💚 mvnsite 0m 22s the patch passed
-1 ❌ javadoc 0m 17s /patch-javadoc-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-mapreduce-client-shuffle in the patch failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
-1 ❌ javadoc 0m 16s /patch-javadoc-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkPrivateBuild-1.8.0_352-8u352-ga-1~20.04-b08.txt hadoop-mapreduce-client-shuffle in the patch failed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08.
+1 💚 spotbugs 0m 46s the patch passed
+1 💚 shadedclient 26m 22s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 36s hadoop-mapreduce-client-shuffle in the patch passed.
-1 ❌ asflicense 0m 33s /results-asflicense.txt The patch generated 1 ASF License warnings.
110m 18s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/2/artifact/out/Dockerfile
GITHUB PR #5311
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 4edd60006a54 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8fefb83
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/2/testReport/
Max. process+thread count 630 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/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.

Change-Id: I1d60976cc8113fc9c5f736de6869f40e93b5063a
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
-1 ❌ mvninstall 45m 0s /branch-mvninstall-root.txt root in trunk failed.
+1 💚 compile 0m 26s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 24s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 24s trunk passed
+1 💚 mvnsite 0m 26s trunk passed
+1 💚 javadoc 0m 34s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javadoc 0m 22s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 0m 52s trunk passed
+1 💚 shadedclient 26m 38s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 0m 24s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 24s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 20s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 15s /results-checkstyle-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle: The patch generated 1 new + 5 unchanged - 32 fixed = 6 total (was 37)
+1 💚 mvnsite 0m 23s the patch passed
+1 💚 javadoc 0m 20s hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 generated 0 new + 0 unchanged - 3 fixed = 0 total (was 3)
+1 💚 javadoc 0m 18s hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkPrivateBuild-1.8.0_352-8u352-ga-120.04-b08 with JDK Private Build-1.8.0_352-8u352-ga-120.04-b08 generated 0 new + 0 unchanged - 3 fixed = 0 total (was 3)
+1 💚 spotbugs 0m 53s the patch passed
+1 💚 shadedclient 28m 10s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 37s hadoop-mapreduce-client-shuffle in the patch passed.
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
110m 42s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/3/artifact/out/Dockerfile
GITHUB PR #5311
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 5c70fe9bae8f 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 6c572c8
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/3/testReport/
Max. process+thread count 615 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/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.

Change-Id: I3f17d76b3629a67ec8846327fed30fc927b10ec7
@tomicooler tomicooler marked this pull request as ready for review January 19, 2023 11:17
@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 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 46m 28s trunk passed
+1 💚 compile 0m 25s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 23s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 25s trunk passed
+1 💚 mvnsite 0m 28s trunk passed
+1 💚 javadoc 0m 31s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javadoc 0m 21s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 0m 52s trunk passed
+1 💚 shadedclient 26m 52s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 33s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 13s /results-checkstyle-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle: The patch generated 1 new + 5 unchanged - 32 fixed = 6 total (was 37)
+1 💚 mvnsite 0m 20s the patch passed
+1 💚 javadoc 0m 17s hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 generated 0 new + 0 unchanged - 3 fixed = 0 total (was 3)
+1 💚 javadoc 0m 16s hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-shuffle-jdkPrivateBuild-1.8.0_352-8u352-ga-120.04-b08 with JDK Private Build-1.8.0_352-8u352-ga-120.04-b08 generated 0 new + 0 unchanged - 3 fixed = 0 total (was 3)
+1 💚 spotbugs 0m 45s the patch passed
+1 💚 shadedclient 27m 3s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 36s hadoop-mapreduce-client-shuffle in the patch passed.
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
110m 39s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/4/artifact/out/Dockerfile
GITHUB PR #5311
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 2b5931453a0f 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 59a1f40
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/4/testReport/
Max. process+thread count 585 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5311/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.

boolean keepAliveParam = false;
if (keepAliveList != null && keepAliveList.size() == 1) {
keepAliveParam = Boolean.parseBoolean(keepAliveList.get(0));
if (LOG.isDebugEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this if is required 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.

I guess it was used like this to perform better when DEBUG log is not activated. (The log parameters are not evaluated). This is just copy-pasta code from the original solution, no change here.

}

if (mapIds == null || reduceQ == null || jobQ == null) {
sendError(ctx, "Required param job, map and reduce", BAD_REQUEST);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe some error log can be added here what was null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No change here from my side.

new ShuffleHeader(mapId, info.partLength, info.rawLength, reduce)));
final File spillFile =
new File(mapOutputInfo.mapOutputFileName.toString());
RandomAccessFile spill = SecureIOUtils.openForRandomRead(spillFile, "r", user, null);
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be closed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The FadvisedFileRegion/FadvisedChunkedFile closes the file.

(The openForRandomRead() could be moved to each Fadvised() constructor to make it a bit harder to make a mistake with it, but the current code can't throw and exception between openForRandomRead and giving it to Fadvised constructors.)

log4j.logger.io.netty=TRACE
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can stay as INFO, to reduce the build test times

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't log that much at all.

@K0K0V0K
Copy link
Contributor

K0K0V0K commented Jan 19, 2023

+1, non-binding

@brumi1024 brumi1024 merged commit 151b71d into apache:trunk Feb 10, 2023
@brumi1024
Copy link
Member

Thanks @tomicooler, the patch looks good to me, merged to trunk. Thanks @K0K0V0K for the review.

@ayushtkn
Copy link
Member

the test is failing now:
https://ci-hadoop.apache.org/view/Hadoop/job/hadoop-qbt-trunk-java8-linux-x86_64/1143/testReport/junit/org.apache.hadoop.mapred/TestShuffleHandler/testMapFileAccess/

Though it passes locally for me.
Looks like something specific to jenkins:

Caused by: java.io.IOException: Owner 'jenkins' for path /tmp/test-shuffle-channel-handler1169959588626711767/job_1111111111111_0001/testUser/attempt_1111111111111_0001_m_000001_0/index did not match expected owner 'testUser'

anyone planning to fix or should we revert this?

@tomicooler
Copy link
Contributor Author

the test is failing now: https://ci-hadoop.apache.org/view/Hadoop/job/hadoop-qbt-trunk-java8-linux-x86_64/1143/testReport/junit/org.apache.hadoop.mapred/TestShuffleHandler/testMapFileAccess/

Though it passes locally for me. Looks like something specific to jenkins:

Caused by: java.io.IOException: Owner 'jenkins' for path /tmp/test-shuffle-channel-handler1169959588626711767/job_1111111111111_0001/testUser/attempt_1111111111111_0001_m_000001_0/index did not match expected owner 'testUser'

anyone planning to fix or should we revert this?

MAPREDUCE-7434

@ayushtkn
Copy link
Member

Thank you Tamas for volunteering!!!

jojochuang pushed a commit to jojochuang/hadoop that referenced this pull request May 23, 2023
…tty4 upgrade. (apache#5311)

This commit does not contain secrets

Change-Id: Ic693413cba6aed4cea3b645c4b65c559450ec40d
DremioQA pushed a commit to dremio/hadoop that referenced this pull request Jun 14, 2023
…ter Netty4 upgrade. (apache#5311)

(cherry picked from commit 151b71d)
Change-Id: I5575dbebaf379aa908312ae0b9cda3f81a694738
DremioQA pushed a commit to dremio/hadoop that referenced this pull request Feb 2, 2024
…ter Netty4 upgrade. (apache#5311)

(cherry picked from commit 151b71d)
Change-Id: I5575dbebaf379aa908312ae0b9cda3f81a694738
DremioQA pushed a commit to dremio/hadoop that referenced this pull request Apr 5, 2024
This list captures the current state of non-upstream changes in our branch
that are not in the public repo.

---Changes cherry-picked to branch-3.3.6-dremio from branch-3.3.2-dremio---
The below changes were on branch-3.3.2-dremio and needed to be brought to
branch-3.3.6-dremio to prevent regressing scenarios these changes addressed.

HADOOP-18928: S3AFileSystem URL encodes twice where Path has trailing / (proposed)
DX-69726: Bumping okie from 1.6.0 to 3.4.0 (CVE-2023-3635)
DX-69726: Bumping okie from 1.6.0 to 3.4.0 (CVE-2023-3635)
DX-66470: Allow for custom shared key signer for ABFS
DX-66673: Backport HADOOP-18602. Remove netty3 dependency
DX-66673: Backport MAPREDUCE-7434. Fix ShuffleHandler tests. Contributed by Tamas Domok
DX-66673: Backport MAPREDUCE-7431. ShuffleHandler refactor and fix after Netty4 upgrade. (apache#5311)
DX-66673: Backport HADOOP-15327. Upgrade MR ShuffleHandler to use Netty4 apache#3259. Contributed by Szilard Nemeth.
DX-66673: Backport HADOOP-17115. Replace Guava Sets usage by Hadoop's own Sets in hadoop-common and hadoop-tools (apache#2985)
HADOOP-18676. jettison dependency override in hadoop-common lib
DX-52816: Downgrade azure-data-lake-store-sdk to 2.3.3 to support dremio version.
DX-52701: Remove node based module by Naveen Kumar
DX-32012: Adding BatchList Iterator for ListFiles by “ajmeera.nagaraju”
DX-18552: Make file status check optional in S3AFileSystem create()
Add flag to skip native tests by Laurent Goujon
DX-21904: Support S3 requester-pays headers by Brandon Huang
DX-21471: Fix checking of use of OAuth credentials with AzureNativeFileSystem
DX-19314: make new kms format configurable
DX-17058 Add FileSystem to META-INF/services
DX-17317 Fix incorrect parameter passed into AzureADAuthenticator-getTokenUsingClientCreds by TiffanyLam
DX-17276 Azure AD support for StorageV1 by James Duong
DX-17276 Add Azure AD support in Dremio's hadoop-azure library for Storage V1 support
unwraps BindException in HttpServer2

---Changes picked up by moving to 3.3.6---
The below changes were changes on branch-3.3.2-dremio that did not need to
come to branch-3.3.6-dremio as the public 3.3.6 branch contained the fixes
already.

DX-67500: Backport HADOOP-18136. Verify FileUtils.unTar() handling of missing .tar files.
DX-66673: Backport HADOOP-18079. Upgrade Netty to 4.1.77. (apache#3977)
DX-66673: Backport HADOOP-11245. Update NFS gateway to use Netty4 (apache#2832) (apache#4997)
DX-64051: Bump jettison from 1.1 to 1.5.4 in hadoop/branch-3.3.2-dremio
DX-64051: Bump jettison from 1.1 to 1.5.4 in hadoop/branch-3.3.2-dremio
DX-63800 Bump commons-net from 3.6 to 3.9.0 to address CVE-2021-37533
DX-27168: removing org.codehaus.jackson

Change-Id: I6cdb968e33826105caff96e1c3d2c6313a550689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants