You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wanglijie95 (via GitHub)" <gi...@apache.org> on 2023/02/14 13:37:12 UTC
[GitHub] [flink] wanglijie95 opened a new pull request, #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
wanglijie95 opened a new pull request, #21932:
URL: https://github.com/apache/flink/pull/21932
## What is the purpose of the change
Currently, the dynamic flag of stream graph is not set when [translate transformations](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L324). However, the dynamic flag will be used ([here](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraph.java#L696)) when translating, we should set the dynamic flag before the translating.
## Verifying this change
`ForwardForUnspecifiedPartitionerTest#testConvertToCorrectPartitioner`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (**no**)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**no**)
- The serializers: (**no**)
- The runtime per-record code paths (performance sensitive): (**no**)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (**no**)
- The S3 file system connector: (**no**)
## Documentation
- Does this pull request introduce a new feature? (**no**)
- If yes, how is the feature documented? (**not applicable**)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #21932:
URL: https://github.com/apache/flink/pull/21932#issuecomment-1429765602
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c261abaf64d094110e4c35494c77727e885c3378",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "c261abaf64d094110e4c35494c77727e885c3378",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c261abaf64d094110e4c35494c77727e885c3378 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wanglijie95 commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107982799
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -316,6 +316,14 @@ public StreamGraph generate() {
configuration.get(
ExecutionCheckpointingOptions.ENABLE_CHECKPOINTS_AFTER_TASKS_FINISH));
shouldExecuteInBatchMode = shouldExecuteInBatchMode();
+ Optional<JobManagerOptions.SchedulerType> schedulerTypeOptional =
+ executionConfig.getSchedulerType();
+ boolean dynamic =
+ shouldExecuteInBatchMode
+ && schedulerTypeOptional.orElse(
+ JobManagerOptions.SchedulerType.AdaptiveBatch)
+ == JobManagerOptions.SchedulerType.AdaptiveBatch;
+ streamGraph.setDynamic(dynamic);
Review Comment:
-> How about to introduce a method maybeSetDynamic() and invoke it in configureStreamGraph(...)?
Maybe `setDynamic(final StreamGraph graph)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wanglijie95 commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107982799
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -316,6 +316,14 @@ public StreamGraph generate() {
configuration.get(
ExecutionCheckpointingOptions.ENABLE_CHECKPOINTS_AFTER_TASKS_FINISH));
shouldExecuteInBatchMode = shouldExecuteInBatchMode();
+ Optional<JobManagerOptions.SchedulerType> schedulerTypeOptional =
+ executionConfig.getSchedulerType();
+ boolean dynamic =
+ shouldExecuteInBatchMode
+ && schedulerTypeOptional.orElse(
+ JobManagerOptions.SchedulerType.AdaptiveBatch)
+ == JobManagerOptions.SchedulerType.AdaptiveBatch;
+ streamGraph.setDynamic(dynamic);
Review Comment:
-> How about to introduce a method maybeSetDynamic() and invoke it in configureStreamGraph(...)?
Maybe `isDynamic(final StreamGraph graph)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wanglijie95 commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107982799
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -316,6 +316,14 @@ public StreamGraph generate() {
configuration.get(
ExecutionCheckpointingOptions.ENABLE_CHECKPOINTS_AFTER_TASKS_FINISH));
shouldExecuteInBatchMode = shouldExecuteInBatchMode();
+ Optional<JobManagerOptions.SchedulerType> schedulerTypeOptional =
+ executionConfig.getSchedulerType();
+ boolean dynamic =
+ shouldExecuteInBatchMode
+ && schedulerTypeOptional.orElse(
+ JobManagerOptions.SchedulerType.AdaptiveBatch)
+ == JobManagerOptions.SchedulerType.AdaptiveBatch;
+ streamGraph.setDynamic(dynamic);
Review Comment:
-> How about to introduce a method maybeSetDynamic() and invoke it in configureStreamGraph(...)?
Maybe `setDynamic(final StreamGraph graph)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zhuzhurk commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107960286
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -316,6 +316,14 @@ public StreamGraph generate() {
configuration.get(
ExecutionCheckpointingOptions.ENABLE_CHECKPOINTS_AFTER_TASKS_FINISH));
shouldExecuteInBatchMode = shouldExecuteInBatchMode();
+ Optional<JobManagerOptions.SchedulerType> schedulerTypeOptional =
+ executionConfig.getSchedulerType();
+ boolean dynamic =
+ shouldExecuteInBatchMode
+ && schedulerTypeOptional.orElse(
+ JobManagerOptions.SchedulerType.AdaptiveBatch)
+ == JobManagerOptions.SchedulerType.AdaptiveBatch;
+ streamGraph.setDynamic(dynamic);
Review Comment:
How about to introduce a method `maybeSetDynamic()` and invoke it in `configureStreamGraph(...)`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zhuzhurk commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107961853
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -316,6 +316,14 @@ public StreamGraph generate() {
configuration.get(
ExecutionCheckpointingOptions.ENABLE_CHECKPOINTS_AFTER_TASKS_FINISH));
shouldExecuteInBatchMode = shouldExecuteInBatchMode();
+ Optional<JobManagerOptions.SchedulerType> schedulerTypeOptional =
+ executionConfig.getSchedulerType();
+ boolean dynamic =
+ shouldExecuteInBatchMode
+ && schedulerTypeOptional.orElse(
+ JobManagerOptions.SchedulerType.AdaptiveBatch)
+ == JobManagerOptions.SchedulerType.AdaptiveBatch;
+ streamGraph.setDynamic(dynamic);
Review Comment:
Maybe add a hotfix commit to also move the above invocations `setAutoParallelismEnabled` and `setEnableCheckpointsAfterTasksFinish` into `configureStreamGraph()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wanglijie95 closed pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 closed pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
URL: https://github.com/apache/flink/pull/21932
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zhuzhurk commented on a diff in pull request #21932: [FLINK-31055][runtime] Fix the bug that dynamic flag of stream graph does not take effect when translating the transformations
Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #21932:
URL: https://github.com/apache/flink/pull/21932#discussion_r1107989004
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java:
##########
@@ -359,6 +345,17 @@ private boolean shouldDisableUnalignedCheckpointing(StreamEdge edge) {
return partitioner.isPointwise() || partitioner.isBroadcast();
}
+ private void setDynamic(final StreamGraph graph) {
Review Comment:
This parameter is not needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org