Skip to content
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

Terminate at end of hour #334

Merged
merged 3 commits into from
Jan 12, 2012
Merged

Conversation

coyotemarin
Copy link
Collaborator

Adds the ability to terminate job flows near the end of the hour to the idle job flow killer. Fixes #319.

run_time = now - start
return timedelta(seconds=((-run_time).seconds % 3600.0 or 3600.0))


Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be consolidated with est_time_to_hour in mrjob.emr? https://github.com/Yelp/mrjob/blob/master/mrjob/emr.py#L188

It looks like they do the same thing but with slightly different output formats.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That sounds reasonable. I think I'll create mrjob/pool.py and move this and the code to read pool name into that file (as well as whatever pooling logic I can move).

Can you file this as a separate issue in the v0.3.2 milestone though (with the "Cleanup" label)? Better to do things in bite-sized pieces.

@irskep
Copy link
Contributor

irskep commented Jan 12, 2012

Since my comments are covered by #336, I'm merging this.

irskep added a commit that referenced this pull request Jan 12, 2012
@irskep irskep merged commit 5766e2b into Yelp:master Jan 12, 2012
Sign up for free to 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.

terminate idle job flows near end of hour
2 participants