-
Notifications
You must be signed in to change notification settings - Fork 161
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
LIHADOOP-43781: TonY should support enforcing maximum total number of tasks #174
Conversation
static void validateTonyConf(Configuration tonyConf) { | ||
int maxTasks = tonyConf.getInt(TonyConfigurationKeys.TONY_MAX_TASKS, -1); | ||
if (maxTasks >= 0) { | ||
int numRequestedTasks = Utils.parseContainerRequests(tonyConf).values().stream() |
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.
This seems fine, but have we considered whether we want a per-jobtype limit or an aggregate limit?
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's a good idea. I'll add per-jobtype limit support, too (e.g.: tony.worker.max-tasks
).
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.
In my latest commit, added tony.X.max-instances
and renamed the global limit to tony.task.max-total-instances
.
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.
lgtm!
Addresses #169.
tony.X.max-instances
andtony.task.max-total-instances
configs that allow limiting the number of X instances or total task instances a job can request.RuntimeException
if violated