forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-7910] [tests] Generalize Test(Stream)Environment to use JobExe…
…cutor This commit introduces the JobExecutor interface which abstracts the actual mini cluster from the Test(Stream)Environment. By letting the Flip-6 MiniCluster as well as the FlinkMiniCluster implement this interface, we can run all test base jobs either on the Flip-6 mini cluster or on the current mini cluster. This closes apache#4897.
- Loading branch information
1 parent
51a2787
commit 057edf9
Showing
7 changed files
with
91 additions
and
37 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/JobExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http:https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.runtime.minicluster; | ||
|
||
import org.apache.flink.api.common.JobExecutionResult; | ||
import org.apache.flink.runtime.client.JobExecutionException; | ||
import org.apache.flink.runtime.jobgraph.JobGraph; | ||
|
||
/** | ||
* Interface for {@link JobGraph} executors. | ||
*/ | ||
public interface JobExecutor { | ||
|
||
/** | ||
* Run the given job and block until its execution result can be returned. | ||
* | ||
* @param jobGraph to execute | ||
* @return Execution result of the executed job | ||
* @throws JobExecutionException if the job failed to execute | ||
*/ | ||
JobExecutionResult executeJobBlocking(final JobGraph jobGraph) throws JobExecutionException, InterruptedException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters