zhuzhurk commented on a change in pull request #11213: [FLINK-16276][tests] 
Introduce a builder and factory methods to create DefaultScheduler for testing
URL: https://github.com/apache/flink/pull/11213#discussion_r385532166
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -280,23 +281,8 @@ private ExecutionGraph createExecutionGraph(
                        failoverStrategy);
        }
 
-       /**
-        * @deprecated Direct access to the execution graph by scheduler 
implementations is discouraged
-        * because currently the execution graph has various features and 
responsibilities that a
-        * scheduler should not be concerned about. The following specialized 
abstractions to the
-        * execution graph and accessors should be preferred over direct access:
-        * <ul>
-        *     <li>{@link #getSchedulingTopology()}
-        *     <li>{@link #getFailoverTopology()}
-        *     <li>{@link #getInputsLocationsRetriever()}
-        *     <li>{@link #getExecutionVertex(ExecutionVertexID)}
-        *     <li>{@link #getExecutionVertexId(ExecutionAttemptID)}
-        *     <li>{@link #getExecutionVertexIdOrThrow(ExecutionAttemptID)}
-        * </ul>
-        * Currently, only {@link LegacyScheduler} requires direct access to 
the execution graph.
-        */
-       @Deprecated
-       protected ExecutionGraph getExecutionGraph() {
+       @VisibleForTesting
+       public ExecutionGraph getExecutionGraph() {
 
 Review comment:
   There would be quite a few tests to be reworked. 
   - ExecutionGraphDeploymentTest
   - ExecutionGraphPartitionReleaseTest
   - ExecutionGraphVariousFailuesTest
   - ExecutionTest
   - ExecutionVertexCancelTest
   - ExecutionVertexInputConstraintTest
   - ExecutionVertexTest
   - ExecutionGraphNotEnoughResourceTest
   - ExecutionGraphCheckpointCoordinatorTest
   - ExecutionGraphColocationRestartTest
   - ExecutionGraphSuspendTest
   - FinalizeOnMasterTest
   
   Most of them does not need much effort to be based on the new scheduler if 
we exposes ExecutionGraph. It would make the work much easier since we only 
need to force scheduling related actions to be conducted via the scheduler.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to