-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-2458][FLINK-2449]Access distributed cache entries for CollectionExecution and in Iterative tasks. #970
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
1a1ddb3 to
0675cb4
Compare
| @@ -79,7 +68,7 @@ public AbstractRuntimeUDFContext(String name, | |||
| this.subtaskIndex = subtaskIndex; | |||
| this.userCodeClassLoader = userCodeClassLoader; | |||
| this.executionConfig = executionConfig; | |||
| this.distributedCache = new DistributedCache(cpTasks); | |||
| this.distributedCache = Preconditions.checkNotNull(new DistributedCache(cpTasks)); | |||
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.
Don't you want to check cpTasks for being null?
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.
Ah yes. Sorry.
c22cdec to
05c5326
Compare
|
Addressed PR comments. There is one unrelated failure on the GroupReduceITCase. I've filed a JIRA for that. |
05c5326 to
e571f3b
Compare
|
Looks good, in general. Can you add the test to one of the other iteration test files? This saves cluster startup and shutdown costs, making builds faster. Maybe to the iteration aggregators, or iteration accumulators. |
| @@ -501,4 +536,22 @@ public int getSuperstepNumber() { | |||
| return (T) previousAggregates.get(name); | |||
| } | |||
| } | |||
|
|
|||
| private static final class DoingNothing implements Callable<Path>{ | |||
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.
It actually does something ;-)
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.
Haha. Yes. In an earlier version of the code, it wasn't. :')
fe9bb3a to
376425c
Compare
|
I've moved the test to an existing |
376425c to
a8d1385
Compare
|
I'd like to get this merged soon. This removes multiple constructors for Runtime contexts and establishes a clean hierarchy, making any changes to the constructors easier. This will be useful for two Jiras on exposing task configuration and task attempt number to the Runtime context. |
885fdd2 to
a1a3824
Compare
|
These changes have been reverted back |
| @@ -897,7 +897,7 @@ class TaskManager( | |||
| config.timeout, | |||
| libCache, | |||
| fileCache, | |||
| runtimeInfo) | |||
| new TaskRuntimeInfo(hostname, taskManagerConfig, tdd.getAttemptNumber)) | |||
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.
Why is this changed from before?
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 is to provide access to Task attempt number from Runtime Context. I should add a description of the other tickets this resolves.
Is this a good idea though? To fix five issues in one PR? Or should I open a separate one and keep this one for just distributed cache?
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.
generally we try to keep one PR for one issue, exceptions should only be done for closely related issues.
why did you decide to add these issues into this PR? ( i have a hard time understanding it, since the commits barely touch the same files.
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.
Yes. The addition of distributed cache removes the need for multiple constructors for RuntimeContexts. Since providing access to runtime information needed changing the constructors, I deemed it better to work with what would be the only needed constructors after merging this.
I can revert this commit and open a separate PR for the other three issues if necessary.
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.
I would prefer if you opened a second PR once this is merged. The issues are not really related to each other; the 2nd commit was simply made based on the 1st commit. We would end up having two separate discussions in 1 PR, which i think is a bad idea.
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.
Ah. Yes. That makes sense. I will revert this and open a separate PR. Apologies.
a1a3824 to
a8d1385
Compare
|
Reverting back to make this PR only about the distributed cache. |
|
We are indeed falling behind on merging pull requests, right now. Many committers are on vacation this month, and for the others, the large amount of pull requests is hard to keep up with, especially next to the work on our own issues. Hope this will get better in a week or two. I'll try to get a look at this very soon... |
|
In the |
|
Aside from the comment above, this looks good. Would merge this, after the comment is addressed. |
a8d1385 to
a37b329
Compare
[FLINK-2449]Allow use of distributed cache from Collection Environments
a37b329 to
e264224
Compare
|
Addressed comments. @StephanEwen |
|
Looks good, merging this! |
…from Iteration contexts & use of distributed cache from Collection Environments This closes apache#970
This takes care of that too.