public class TestUtils extends Object
| Constructor and Description |
|---|
TestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getMostRecentCompletedCheckpoint(File checkpointDir)
Deprecated.
please use
CommonTestUtils.getLatestCompletedCheckpointPath(JobID,
MiniCluster) which is less prone to NoSuchFileException and IO-intensive. |
static Optional<File> |
getMostRecentCompletedCheckpointMaybe(File checkpointDir)
Deprecated.
please use
CommonTestUtils.getLatestCompletedCheckpointPath(JobID,
MiniCluster) which is less prone to NoSuchFileException and IO-intensive. |
static org.apache.flink.runtime.checkpoint.metadata.CheckpointMetadata |
loadCheckpointMetadata(String savepointPath) |
static void |
submitJobAndWaitForResult(org.apache.flink.client.program.ClusterClient<?> client,
org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader) |
static void |
tryExecute(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment see,
String name)
Execute the job and wait for the job result synchronously.
|
static void |
waitUntilAllTasksAreRunning(org.apache.flink.client.program.rest.RestClusterClient<?> restClusterClient,
org.apache.flink.api.common.JobID jobId)
Wait util all task of a job turns into RUNNING state.
|
static void |
waitUntilExternalizedCheckpointCreated(File checkpointDir)
Deprecated.
please use
org.apache.flink.runtime.testutils.CommonTestUtils#waitForCheckpoint(JobID, MiniCluster,
Deadline) which is less prone to NoSuchFileException and IO-intensive. |
static void |
waitUntilJobCanceled(org.apache.flink.api.common.JobID jobId,
org.apache.flink.client.program.ClusterClient<?> client) |
public static void tryExecute(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment see,
String name)
throws Exception
Exception - If executing the environment throws an exception which does not have SuccessException as a cause.public static void submitJobAndWaitForResult(org.apache.flink.client.program.ClusterClient<?> client,
org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader)
throws Exception
Exceptionpublic static org.apache.flink.runtime.checkpoint.metadata.CheckpointMetadata loadCheckpointMetadata(String savepointPath) throws IOException
IOException@Deprecated public static File getMostRecentCompletedCheckpoint(File checkpointDir) throws IOException
CommonTestUtils.getLatestCompletedCheckpointPath(JobID,
MiniCluster) which is less prone to NoSuchFileException and IO-intensive.IOException@Deprecated public static Optional<File> getMostRecentCompletedCheckpointMaybe(File checkpointDir) throws IOException
CommonTestUtils.getLatestCompletedCheckpointPath(JobID,
MiniCluster) which is less prone to NoSuchFileException and IO-intensive.IOException@Deprecated public static void waitUntilExternalizedCheckpointCreated(File checkpointDir) throws InterruptedException, IOException
org.apache.flink.runtime.testutils.CommonTestUtils#waitForCheckpoint(JobID, MiniCluster,
Deadline) which is less prone to NoSuchFileException and IO-intensive.InterruptedExceptionIOExceptionpublic static void waitUntilJobCanceled(org.apache.flink.api.common.JobID jobId,
org.apache.flink.client.program.ClusterClient<?> client)
throws ExecutionException,
InterruptedException
public static void waitUntilAllTasksAreRunning(org.apache.flink.client.program.rest.RestClusterClient<?> restClusterClient,
org.apache.flink.api.common.JobID jobId)
throws Exception
restClusterClient - RestClusterClient which could be InjectClusterClient.ExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.