-
Notifications
You must be signed in to change notification settings - Fork 45
Add application-scoped YARN resource usage API #267
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
Merged
gerashegalov
merged 7 commits into
NVIDIA:dev
from
gerashegalov:feature/yarn-resource-cost-python-api-signed
Sep 11, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0ee2641
Add application-scoped YARN resource usage API
gerashegalov 822aea8
Include Python API in standalone bundle
gerashegalov 1708e40
Classify permanent YARN accounting failures
gerashegalov 09459a8
Fix YARN API archival edge cases
gerashegalov a68f70d
Support single-file S3 event logs
gerashegalov e90aaec
Support file URI event logs
gerashegalov f03a2ef
Clarify retryable YARN metadata evidence
gerashegalov 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=77", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "yarn-resource-cost" | ||
| version = "0.1.0" | ||
| description = "Portable YARN resource accounting for Spark applications" | ||
| readme = "README.md" | ||
| requires-python = ">=3.10,<3.13" | ||
| license = "Apache-2.0" | ||
| classifiers = [ | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| aws = ["boto3>=1.34"] | ||
|
|
||
| [project.scripts] | ||
| yarn-resource-cost = "yarn_resource_cost:cli_main" | ||
|
|
||
| [tool.setuptools] | ||
| py-modules = [ | ||
| "calculate_yarn_job_cost", | ||
| "yarn_job_cost_adapters", | ||
| "yarn_job_cost_api", | ||
| "yarn_job_cost_core", | ||
| "yarn_job_cost_dataproc", | ||
| "yarn_job_cost_defaults", | ||
| "yarn_job_cost_discovery", | ||
| "yarn_job_cost_eventlog", | ||
| "yarn_resource_cost", | ||
| ] |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
When an archived node-registration record itself lacks an instance type, GPU capacity, or another required resource capacity, these conditions are included in
transient_incomplete_evidenceand the API returnsretryable=True. Additional archived logs cannot repair invalid metadata already present in the registration record, so callers repeatedly retry an accounting result that cannot become complete.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.
Thanks — this is intentionally retryable. Each attempt materializes a fresh archive snapshot, and the parser reconciles containers only after all archived RM logs have been read. A later complete registration for the same node can therefore supply an instance type or resource capacity that was absent from an earlier registration.
I added a regression in f03a2ef that starts with a partial registration missing instanceType and returns complete=false, retryable=true; it then adds a later complete registration and verifies the result becomes complete=true, retryable=false. I also corrected the stale inline comment that had incorrectly described incomplete node metadata as irreparable. Conflicting accounting-policy evidence remains non-retryable.