-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
[FLINK-36067][runtime] Support optimize stream graph based on input info. #25790
base: master
Are you sure you want to change the base?
Conversation
9d3e01f
to
9b2cc2a
Compare
@@ -273,6 +273,16 @@ public void onNewJobVerticesAdded(List<JobVertex> newVertices, int pendingOperat | |||
|
|||
// 4. update json plan | |||
getExecutionGraph().setJsonPlan(JsonPlanGenerator.generatePlan(getJobGraph())); | |||
|
|||
// 5. update the DistributionPattern of the upstream results consumed by the newly created | |||
// JobVertex and aggregate subpartition bytes. |
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.
aggregate subpartition bytes. -> aggregate subpartition bytes when possible.
I would find is useful to describe in more detail was aggregate subpartition bytes means and why we can perform this optimization in some circumstances.
@@ -937,6 +965,26 @@ SpeculativeExecutionHandler getSpeculativeExecutionHandler() { | |||
return speculativeExecutionHandler; | |||
} | |||
|
|||
private void tryUpdateResultInfo(IntermediateDataSetID id, DistributionPattern targetPattern) { |
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.
could you add some comments detailing the algorithm and its benefits.
…OptimizationStrategy
…artition info when all consumers created and initialized.
9b2cc2a
to
ecc3183
Compare
@@ -207,6 +210,10 @@ public boolean isForward() { | |||
return intermediateDataSet.isForward(); | |||
} | |||
|
|||
public boolean isEveryConsumerConsumeAllSubPartitions() { |
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 am confused by why this method is checking broadcasts - how does this relate to downstream consumers being able to consume the subpartitions
@@ -35,6 +35,14 @@ public interface IntermediateResultInfo { | |||
*/ | |||
boolean isBroadcast(); | |||
|
|||
/** | |||
* Indicates whether every downstream consumer needs to consume all produced sub-partitions. |
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 see this method seems to be relate to broadcasts - it would be good to explain how.
What is the purpose of the change
[FLINK-36067][runtime] Support optimize stream graph based on input info.
Brief change log
Verifying this change
This change added tests.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation