-
Notifications
You must be signed in to change notification settings - Fork 336
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
SAMZA-2582: Add a metric to track container failure tracking metric for Samza #1417
Open
Sanil15
wants to merge
5
commits into
apache:master
Choose a base branch
from
Sanil15:per-container-failure-metric
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
09a030e
Per container failure tracking metric for Samza
Sanil15 4189ae8
Add teardown to the tests to prevent memory leaks
Sanil15 f6d6214
Address Rays comments
Sanil15 1fe3c09
Rebasing with Master
Sanil15 5ebf385
Fix the shutdown sequence for container process manager test
Sanil15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,7 +191,7 @@ public ContainerProcessManager(Config config, SamzaApplicationState state, Metri | |
this.jobConfig = new JobConfig(clusterManagerConfig); | ||
|
||
this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); | ||
|
||
this.containerProcessManagerMetrics = new ContainerProcessManagerMetrics(jobConfig, state, registry); | ||
this.clusterResourceManager = resourceManager; | ||
this.containerManager = containerManager; | ||
this.diagnosticsManager = Option.empty(); | ||
|
@@ -254,6 +254,11 @@ public void start() { | |
}); | ||
containerAllocator.requestResources(processorToHost); | ||
|
||
// Initialize the per processor failure count to be 0 | ||
processorToHostMapping.keySet().forEach(processorId -> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment below on how/why this information isnt really in "state" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. replied there |
||
containerProcessManagerMetrics.registerProcessorFailureCountMetric(processorId); | ||
}); | ||
|
||
// Start container allocator thread | ||
LOG.info("Starting the container allocator thread"); | ||
allocatorThread.start(); | ||
|
@@ -490,6 +495,7 @@ void onResourceCompletedWithUnknownStatus(SamzaResourceStatus resourceStatus, St | |
LOG.info("Container ID: {} for Processor ID: {} failed with exit code: {}.", containerId, processorId, exitStatus); | ||
Instant now = Instant.now(); | ||
state.failedContainers.incrementAndGet(); | ||
containerProcessManagerMetrics.incrementProcessorFailureCountMetric(processorId); | ||
state.jobHealthy.set(false); | ||
|
||
state.neededProcessors.incrementAndGet(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 believe we decided to use "processorId" for 0,1,2..
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.
that lingo is used internally in code as the naming conventions for javadocs, this is public-facing metrics page where we do not need to have context between processorId and containerId