You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/02/16 06:11:51 UTC
[GitHub] [flink] rmetzger commented on a change in pull request #14910: [FLINK-21259] Add Failing state for DeclarativeScheduler
rmetzger commented on a change in pull request #14910:
URL: https://github.com/apache/flink/pull/14910#discussion_r576570468
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/declarative/MockExecutionGraph.java
##########
@@ -69,15 +73,22 @@ public MockExecutionGraph() throws IOException {
1,
ExecutionGraph.class.getClassLoader(),
VoidBlobWriter.getInstance(),
- PartitionReleaseStrategyFactoryLoader.loadPartitionReleaseStrategyFactory(
- new Configuration()),
+ getPartitionReleaseStrategyFactoryLoader(),
NettyShuffleMaster.INSTANCE,
NoOpJobMasterPartitionTracker.INSTANCE,
ScheduleMode.EAGER,
NoOpExecutionDeploymentListener.get(),
(execution, newState) -> {},
0L);
this.setJsonPlan(""); // field must not be null for ArchivedExecutionGraph creation
+ this.attachJobGraph(Collections.emptyList()); // method must be called to initialize
+ // PartitionReleaseStrategy.
+ }
+
+ private static PartitionReleaseStrategy.Factory getPartitionReleaseStrategyFactoryLoader() {
+ Configuration conf = new Configuration();
+ conf.set(PARTITION_RELEASE_DURING_JOB_EXECUTION, false);
+ return PartitionReleaseStrategyFactoryLoader.loadPartitionReleaseStrategyFactory(conf);
Review comment:
Yes, I agree. This is very fragile and annoying to maintain.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org