Skip to content

TEZ-4554: Counter for used nodes within a DAG - #362

Merged
abstractdog merged 3 commits into
apache:masterfrom
abstractdog:TEZ-4554
Jun 25, 2024
Merged

TEZ-4554: Counter for used nodes within a DAG#362
abstractdog merged 3 commits into
apache:masterfrom
abstractdog:TEZ-4554

Conversation

@abstractdog

@abstractdogabstractdog commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

tested on a small tez container mode cluster

with 2 healthy and running yarn nodemanagers:

INFO : org.apache.tez.common.counters.DAGCounter:
...
INFO : NODE_USED_COUNT: 2
INFO : NODE_TOTAL_COUNT: 2

after stopping 1 nodemanager:

INFO : org.apache.tez.common.counters.DAGCounter:
...
INFO : NODE_USED_COUNT: 1
INFO : NODE_TOTAL_COUNT: 2

after decommissioning 1 nodemanager:

INFO : org.apache.tez.common.counters.DAGCounter:
...
INFO : NODE_USED_COUNT: 1
INFO : NODE_TOTAL_COUNT: 1

also tested with LLAP on Cloudera CDW (3 LLAP daemons)

INFO : NODE_USED_COUNT: 3
INFO : NODE_TOTAL_COUNT: 3

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

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

public void addUsedContainer(Container container) {
containersUsedByCurrentDAG.add(container.getId());
nodesUsedByCurrentDAG.add(container.getNodeId());
nodeHostsUsedByCurrentDAG.add(container.getNodeId().getHost());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can container.getNodeId() be null in any scenario?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

hm, should not be, in that case it's a yarn bug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ohhk

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

thanks @ayushtkn for the review
I think that empty findbugs alert doesn't make any sense, I'll rerun the precommit test once again

@tez-yetus

This comment was marked as outdated.

@abstractdog

abstractdog commented Jun 21, 2024

Copy link
Copy Markdown
ContributorAuthor

thanks @ayushtkn for the review so far

seems like I have to slightly change this patch before moving to HIVE-28201, because it returns all nodes by TaskSchedulerManager.getNumClusterNodes, which is served by a cachedNodeCount, local to the TaskSchedulerManager, it won't be accessible from the LlapTaskSchedulerService
I'm about to change this method to call and accumulate the individual TaskSchedulers' (e.g. the LLAP one) getClusterNodeCount to make LLAP able to be return with a real value:
https://github.com/apache/hive/blob/1c9969a003b09abc851ae7e19631ad208d3b6066/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java#L1062

best scenario is that HIVE-28201 won't need any implementation

I'll let you know later

@abstractdog

abstractdog commented Jun 21, 2024

Copy link
Copy Markdown
ContributorAuthor

with the new commit, I was able to handle LLAP as well, updated the PR description with beeline outputs
also, removed NODE_HOSTS_USED_COUNT I felt a bit useless and confusing handling it separately from NODE_USED_COUNT

@ayushtkn : I would appreciate a second look when you have the chance

@tez-yetus

This comment was marked as outdated.

Change-Id: Ic72fbe3d490e2729ece74f07b42891d1c191b1c5
@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec22m 31sDocker 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 2 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep5m 47sMaven dependency ordering for branch
+1 💚mvninstall10m 2smaster passed
+1 💚compile1m 22smaster passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu122.04.1
+1 💚compile1m 15smaster passed with JDK Private Build-1.8.0_412-8u412-ga-1~22.04.1-b08
+1 💚checkstyle1m 29smaster passed
+1 💚javadoc1m 15smaster passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu122.04.1
+1 💚javadoc1m 6smaster passed with JDK Private Build-1.8.0_412-8u412-ga-1~22.04.1-b08
+0 🆗spotbugs1m 20sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs2m 59smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall0m 50sthe patch passed
+1 💚compile0m 53sthe patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu122.04.1
+1 💚javac0m 53sthe patch passed
+1 💚compile0m 48sthe patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~22.04.1-b08
+1 💚javac0m 48sthe patch passed
+1 💚checkstyle0m 34sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 34sthe patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu122.04.1
+1 💚javadoc0m 36sthe patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~22.04.1-b08
+1 💚findbugs2m 16sthe patch passed
_ Other Tests _
+1 💚unit2m 19stez-api in the patch passed.
+1 💚unit5m 13stez-dag in the patch passed.
+1 💚asflicense0m 26sThe patch does not generate ASF License warnings.
63m 48s
SubsystemReport/Notes
DockerClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-362/9/artifact/out/Dockerfile
GITHUB PR#362
JIRA IssueTEZ-4554
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 7f89bbf01fa4 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 0ac505b
Default JavaPrivate Build-1.8.0_412-8u412-ga-1~22.04.1-b08
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu122.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~22.04.1-b08
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-362/9/testReport/
Max. process+thread count367 (vs. ulimit of 5500)
modulesC: tez-api tez-dag U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-362/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.

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@abstractdog
abstractdog merged commit 19b2351 into apache:masterJun 25, 2024
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

@abstractdog@tez-yetus@ayushtkn