Skip to content

Conversation

sachingoel0101
Copy link
Contributor

Passes the attempt number all the way from TaskDeploymentDescriptor to the RuntimeContext.
Small thing I want to confirm: For RuntimeContext in Tez, is it okay to use TaskContext#getTaskAttemptNumber provided by Tez as a proxy for the attempt number?

@rmetzger
Copy link
Contributor

Can you maybe extend a test which is restarting a job multiple times and check there that the attempt number is set properly?

@sachingoel0101 sachingoel0101 force-pushed the attempt_number branch 2 times, most recently from 497519e to 5d6d2c3 Compare November 20, 2015 13:17
@sachingoel0101
Copy link
Contributor Author

@rmetzger I have added a test case to verify the functionality.

@sachingoel0101 sachingoel0101 force-pushed the attempt_number branch 4 times, most recently from 2aefaf0 to 4df71f5 Compare November 25, 2015 15:59
@sachingoel0101
Copy link
Contributor Author

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.].

@rmetzger
Copy link
Contributor

Hey @sachingoel0101, I think @StephanEwen is the best contact person here. Since this affects a very important interface we shouldn't make any mistakes ;)

@sachingoel0101
Copy link
Contributor Author

I'll wait for Stephan to review this then.

@StephanEwen
Copy link
Contributor

I'll shepherd this pull request in...

@StephanEwen
Copy link
Contributor

This generally looks good and pretty straight forward.
As such it is actually good to merge.

I remember that a while back, we were discussing to create a TaskInfo object that would contain "subtaskIndex", "parallelism", "name", "name-with-subtask", "attempt", "vertex id", "attempt id", etc...
Having such an object would allow to pass all these elements simply from the TaskDeploymentDescriptor to the Task to the RuntimeContext. And whenever we add another field, we need not propagate it manually through all the functions calls, but simply add it to the TaskInfo.

What do you think?

@sachingoel0101
Copy link
Contributor Author

Yes. I was planning to start working on that after this. Since it's
preferable to fix different jiras in different commits, it'd be good if I
can base my work after this is committed. What do you think?
On Dec 2, 2015 6:39 PM, "Stephan Ewen" notifications@github.com wrote:

This generally looks good and pretty straight forward.
As such it is actually good to merge.

I remember that a while back, we were discussing to create a TaskInfo
object that would contain "subtaskIndex", "parallelism", "name",
"name-with-subtask", "attempt", "vertex id", "attempt id", etc...
Having such an object would allow to pass all these elements simply from
the TaskDeploymentDescriptor to the Task to the RuntimeContext. And
whenever we add another field, we need not propagate it manually through
all the functions calls, but simply add it to the TaskInfo.

What do you think?


Reply to this email directly or view it on GitHub
#1386 (comment).

@StephanEwen
Copy link
Contributor

As far as I can see from these changes, introducing a TaskInfo will completely subsume this change here and change every line again.

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...

@sachingoel0101
Copy link
Contributor Author

@StephanEwen you're absolutely right. It will most certainly do that.
I will push both things in a single commit and file an additional jira for introducing the TaskInfo object.

@sachingoel0101 sachingoel0101 force-pushed the attempt_number branch 10 times, most recently from 77696aa to a467953 Compare December 6, 2015 14:24
@sachingoel0101
Copy link
Contributor Author

@StephanEwen can you take a look again? I have introduced the TaskInfo object in the second commit, and we can squash them before merging.

@StephanEwen
Copy link
Contributor

Checking this out...

@StephanEwen
Copy link
Contributor

I am adding a number of comments. When you address them, please do not squash commits, so we can review just the changes separately.

Copy link
Contributor

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.

@StephanEwen
Copy link
Contributor

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.

@sachingoel0101 sachingoel0101 force-pushed the attempt_number branch 2 times, most recently from 4897edf to 22a681d Compare December 6, 2015 20:31
@sachingoel0101
Copy link
Contributor Author

@StephanEwen thanks for the review. I have addressed all but one of your comments.

@sachingoel0101
Copy link
Contributor Author

Travis passes. Should be good to merge.
This also resolves FLINK-2524, so the commit message should reflect that too.

@StephanEwen
Copy link
Contributor

Thanks for addressing the comments.

+1, will merge this...

StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Dec 7, 2015
…meContext and add TaskInfo to hold all task related parameters.

This closes apache#1386
@asfgit asfgit closed this in e8734b2 Dec 7, 2015
@sachingoel0101 sachingoel0101 deleted the attempt_number branch December 7, 2015 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants