-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11028. Add metrics for container allocation latency #3754
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
base: trunk
Are you sure you want to change the base?
Conversation
💔 -1 overall
This message was automatically generated. |
...er/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
Show resolved
Hide resolved
...er/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
Outdated
Show resolved
Hide resolved
...ourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptMetrics.java
Outdated
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
am1.allocate(new ArrayList<ResourceRequest>(), | ||
new ArrayList<ContainerId>()).getAllocatedContainers()); | ||
nm1.nodeHeartbeat(true); | ||
Thread.sleep(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something that are no sleeps?
...er/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
Outdated
Show resolved
Hide resolved
if (rmMetrics != null) { | ||
rmMetrics.setAllocateLatenciesTimestamps(request.getAskList()); | ||
} | ||
AllocateResponse response = allocate(request, amrmTokenIdentifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to put the two rmMetrics != null
together.
No need to do the allocate in between, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, second time we are updating latencies based on AllocateResponse, so allocate call is required in between.
🎊 +1 overall
This message was automatically generated. |
nm1.nodeHeartbeat(true); | ||
allocatedContainers.addAll(am1.allocate(new ArrayList<ResourceRequest>(), | ||
new ArrayList<ContainerId>()).getAllocatedContainers()); | ||
Thread.sleep(100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could replace this with a waitFor so we bound the time instead of getting to a potential infinite loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added maxRetries variable to avoid potential infinite loop.
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Description of PR
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?