-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-2488] Expose Attempt Number in RuntimeContext #1386
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
Conversation
Can you maybe extend a test which is restarting a job multiple times and check there that the attempt number is set properly? |
497519e
to
5d6d2c3
Compare
@rmetzger I have added a test case to verify the functionality. |
2aefaf0
to
4df71f5
Compare
Hi @rmetzger, can you take another look? I need to base some further work on this [related to cleaning up passing of task name, index, etc.]. |
Hey @sachingoel0101, I think @StephanEwen is the best contact person here. Since this affects a very important interface we shouldn't make any mistakes ;) |
I'll wait for Stephan to review this then. |
4df71f5
to
a5fec2e
Compare
I'll shepherd this pull request in... |
This generally looks good and pretty straight forward. I remember that a while back, we were discussing to create a What do you think? |
Yes. I was planning to start working on that after this. Since it's
|
As far as I can see from these changes, introducing a You are right, usually different issues should go into different pull requests. But here, one change is a superset of the other change, so that the "task attempt" change without the "task info" change becomes obsolete. I am not strictly against merging this, just thinking that it makes sense to put the TaskInfo into this change as well... |
@StephanEwen you're absolutely right. It will most certainly do that. |
77696aa
to
a467953
Compare
@StephanEwen can you take a look again? I have introduced the |
Checking this out... |
I am adding a number of comments. When you address them, please do not squash commits, so we can review just the changes separately. |
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.
Good set of checks. Would be good to add a non-null check for taskName
as well.
Optional: statically importing ´checkArgument` makes it even nicer.
All in all, pretty good change. Makes many parts of the code nicer. Also good java docs and comments! Comments were added inline. Nothing major, few details. |
4897edf
to
22a681d
Compare
@StephanEwen thanks for the review. I have addressed all but one of your comments. |
…n such as name, index, etc. from Task Deployment Descriptor to the RuntimeContext
22a681d
to
9d3b78c
Compare
Travis passes. Should be good to merge. |
Thanks for addressing the comments. +1, will merge this... |
…meContext and add TaskInfo to hold all task related parameters. This closes apache#1386
Passes the attempt number all the way from
TaskDeploymentDescriptor
to theRuntimeContext
.Small thing I want to confirm: For
RuntimeContext
in Tez, is it okay to useTaskContext#getTaskAttemptNumber
provided by Tez as a proxy for the attempt number?