Skip to content

TEZ-1037: Replace multiple members in TaskAttemptImpl for container related stuff with a single reference to the container. - #305

Merged
abstractdog merged 8 commits into
apache:masterfrom
ayushtkn:TEZ-1037
Aug 24, 2023

Conversation

@ayushtkn

Copy link
Copy Markdown
Member

No description provided.

…elated stuff with a single reference to the container.
Change-Id: I987e92f3cc504f0701a2b7ebde53aac62daf84fc
@tez-yetus

This comment was marked as outdated.

Change-Id: I53d85bd7bd22283875122cda7b62af342f8cf689
@tez-yetus

This comment was marked as outdated.

@ayushtkn

Copy link
Copy Markdown
MemberAuthor

I have 3 checkstyle warnings, 2 for unused import, I will fix it. One for creating getter/setter, which looks overkill to me for test purpose and to make checkstyle happy.
Let me know if that is still a required thing, I can add setter/getter

Change-Id: Ibee2288595810c5330181a6eb416ff34bdd283fd
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 39sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall16m 49smaster passed
+1 💚compile0m 44smaster passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu122.04.1
+1 💚compile0m 38smaster passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
+1 💚checkstyle1m 20smaster passed
+1 💚javadoc0m 33smaster passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu122.04.1
+1 💚javadoc0m 21smaster passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
+0 🆗spotbugs1m 47sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 45smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 29sthe patch passed
+1 💚compile0m 33sthe patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu122.04.1
+1 💚javac0m 33sthe patch passed
+1 💚compile0m 26sthe patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
+1 💚javac0m 26sthe patch passed
-0 ⚠️checkstyle0m 21stez-dag: The patch generated 1 new + 79 unchanged - 1 fixed = 80 total (was 80)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 9sthe patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu122.04.1
+1 💚javadoc0m 9sthe patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
+1 💚findbugs1m 16sthe patch passed
_ Other Tests _
+1 💚unit5m 6stez-dag in the patch passed.
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
32m 37s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/3/artifact/out/Dockerfile
GITHUB PR#305
JIRA IssueTEZ-1037
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 268d13160038 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 5beab4c
Default JavaPrivate Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu122.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu122.04-b09
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/3/artifact/out/diff-checkstyle-tez-dag.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/3/testReport/
Max. process+thread count214 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/3/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog

abstractdog commented Aug 7, 2023

Copy link
Copy Markdown
Contributor

I can see that we're doing lots of interning stuff in the TaskAttemptImpl, which kind of looks like boilerplate from the TaskAttempImpl class' point of view
however, I believe these intern calls were done for a reason: what about wrapping this yarn container into a tez implementation that can hide all the intern + null checks + whatever? so
instead of:

StringInterner.intern(RackResolver.resolve(container.getNodeId().getHost()).getNetworkLocation());

let it be:

container.getNodeRackName();

basically, a new TezContainer (or name it as you like) class can have all these fields that you're about to remove from TaskAttemptImpl

optionally: look for usages of org.apache.hadoop.yarn.api.records.Container in tez code and remove it from there too (it can be done in followup tickets)

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@ayushtkn

Copy link
Copy Markdown
MemberAuthor

@abstractdog I have addressed the review comments, added a new TezContainer Class & pushed the methods there, let me know if it looks good.

One checkstyle is left intentionally, that visibility is changed for test & satisfying that looked like an overkill

import org.apache.hadoop.yarn.util.RackResolver;
import org.apache.tez.util.StringInterner;

public class TezContainer extends Container {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please add a class javadoc comment clarifying the purpose of this class
which is basically to have a convenience wrapper around org.apache.hadoop.yarn.api.records.Container

@abstractdog

Copy link
Copy Markdown
Contributor

@abstractdog I have addressed the review comments, added a new TezContainer Class & pushed the methods there, let me know if it looks good.

One checkstyle is left intentionally, that visibility is changed for test & satisfying that looked like an overkill

everything looks good, left a minor comment about TezContainer, otherwise +1

@abstractdog
abstractdog self-requested a review August 23, 2023 13:26
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 33sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall13m 18smaster passed
+1 💚compile0m 44smaster passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu122.04
+1 💚compile0m 37smaster passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚checkstyle1m 21smaster passed
+1 💚javadoc0m 32smaster passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu122.04
+1 💚javadoc0m 20smaster passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+0 🆗spotbugs1m 47sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 45smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 27sthe patch passed
+1 💚compile0m 31sthe patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu122.04
+1 💚javac0m 31sthe patch passed
+1 💚compile0m 26sthe patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚javac0m 26sthe patch passed
-0 ⚠️checkstyle0m 21stez-dag: The patch generated 2 new + 79 unchanged - 1 fixed = 81 total (was 80)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 9sthe patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu122.04
+1 💚javadoc0m 8sthe patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚findbugs1m 15sthe patch passed
_ Other Tests _
+1 💚unit5m 0stez-dag in the patch passed.
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
28m 48s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/9/artifact/out/Dockerfile
GITHUB PR#305
JIRA IssueTEZ-1037
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 77ba9496ad48 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 5beab4c
Default JavaPrivate Build-1.8.0_382-8u382-ga-1~22.04.1-b05
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/9/artifact/out/diff-checkstyle-tez-dag.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/9/testReport/
Max. process+thread count217 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-305/9/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog
abstractdog merged commit 4b97acb into apache:masterAug 24, 2023
zhuxt2015 pushed a commit to zhuxt2015/tez that referenced this pull request May 14, 2024
…elated stuff with a single reference to the container. (apache#305) (Ayush Saxena reviewed by Laszlo Bodor)
(cherry picked from commit 4b97acb)
zhuxt2015 pushed a commit to zhuxt2015/tez that referenced this pull request May 14, 2024
…tainer related stuff with a single reference to the container. (apache#305) (Ayush Saxena reviewed by Laszlo Bodor)"
This reverts commit 5baad9a.
prabhjyotsingh added a commit to acceldata-io/tez that referenced this pull request Oct 22, 2024
…tainer related stuff with a single reference to the container. (apache#305) (Ayush Saxena reviewed by Laszlo Bodor)"
This reverts commit 4b97acb.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ayushtkn@tez-yetus@abstractdog