public abstract class ClusterEntrypoint extends Object implements org.apache.flink.util.AutoCloseableAsync, org.apache.flink.runtime.rpc.FatalErrorHandler
Specialization of this class can be used for the session mode and the per-job mode
| Modifier and Type | Class and Description |
|---|---|
static class |
ClusterEntrypoint.ExecutionMode
Execution mode of the
MiniDispatcher. |
| Modifier and Type | Field and Description |
|---|---|
static org.apache.flink.configuration.ConfigOption<String> |
INTERNAL_CLUSTER_EXECUTION_MODE |
protected static org.slf4j.Logger |
LOG |
protected static int |
RUNTIME_FAILURE_RETURN_CODE |
protected static int |
STARTUP_FAILURE_RETURN_CODE |
| Modifier | Constructor and Description |
|---|---|
protected |
ClusterEntrypoint(org.apache.flink.configuration.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupDirectories()
Clean up of temporary directories created by the
ClusterEntrypoint. |
CompletableFuture<Void> |
closeAsync() |
protected abstract DispatcherResourceManagerComponentFactory |
createDispatcherResourceManagerComponentFactory(org.apache.flink.configuration.Configuration configuration) |
protected HighAvailabilityServices |
createHaServices(org.apache.flink.configuration.Configuration configuration,
Executor executor,
org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) |
protected HeartbeatServices |
createHeartbeatServices(org.apache.flink.configuration.Configuration configuration) |
protected MetricRegistryImpl |
createMetricRegistry(org.apache.flink.configuration.Configuration configuration,
org.apache.flink.core.plugin.PluginManager pluginManager,
org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) |
protected abstract ExecutionGraphInfoStore |
createSerializableExecutionGraphStore(org.apache.flink.configuration.Configuration configuration,
org.apache.flink.util.concurrent.ScheduledExecutor scheduledExecutor) |
protected String |
getRPCPortRange(org.apache.flink.configuration.Configuration configuration)
Returns the port range for the common
RpcService. |
CompletableFuture<ApplicationStatus> |
getTerminationFuture() |
protected void |
initializeServices(org.apache.flink.configuration.Configuration configuration,
org.apache.flink.core.plugin.PluginManager pluginManager) |
protected static org.apache.flink.configuration.Configuration |
loadConfiguration(EntrypointClusterConfiguration entrypointClusterConfiguration) |
void |
onFatalError(Throwable exception) |
protected static EntrypointClusterConfiguration |
parseArguments(String[] args) |
static void |
runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint) |
void |
startCluster() |
protected CompletableFuture<Void> |
stopClusterServices(boolean cleanupHaData) |
protected boolean |
supportsReactiveMode() |
public static final org.apache.flink.configuration.ConfigOption<String> INTERNAL_CLUSTER_EXECUTION_MODE
protected static final org.slf4j.Logger LOG
protected static final int STARTUP_FAILURE_RETURN_CODE
protected static final int RUNTIME_FAILURE_RETURN_CODE
protected ClusterEntrypoint(org.apache.flink.configuration.Configuration configuration)
public CompletableFuture<ApplicationStatus> getTerminationFuture()
public void startCluster()
throws ClusterEntrypointException
ClusterEntrypointExceptionprotected boolean supportsReactiveMode()
protected void initializeServices(org.apache.flink.configuration.Configuration configuration,
org.apache.flink.core.plugin.PluginManager pluginManager)
throws Exception
Exceptionprotected String getRPCPortRange(org.apache.flink.configuration.Configuration configuration)
RpcService.configuration - to extract the port range fromRpcServiceprotected HighAvailabilityServices createHaServices(org.apache.flink.configuration.Configuration configuration, Executor executor, org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils) throws Exception
Exceptionprotected HeartbeatServices createHeartbeatServices(org.apache.flink.configuration.Configuration configuration)
protected MetricRegistryImpl createMetricRegistry(org.apache.flink.configuration.Configuration configuration, org.apache.flink.core.plugin.PluginManager pluginManager, org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils)
public CompletableFuture<Void> closeAsync()
closeAsync in interface org.apache.flink.util.AutoCloseableAsyncprotected CompletableFuture<Void> stopClusterServices(boolean cleanupHaData)
public void onFatalError(Throwable exception)
onFatalError in interface org.apache.flink.runtime.rpc.FatalErrorHandlerprotected void cleanupDirectories()
throws IOException
ClusterEntrypoint.IOException - if the temporary directories could not be cleaned upprotected abstract DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(org.apache.flink.configuration.Configuration configuration) throws IOException
IOExceptionprotected abstract ExecutionGraphInfoStore createSerializableExecutionGraphStore(org.apache.flink.configuration.Configuration configuration, org.apache.flink.util.concurrent.ScheduledExecutor scheduledExecutor) throws IOException
IOExceptionprotected static EntrypointClusterConfiguration parseArguments(String[] args) throws FlinkParseException
FlinkParseExceptionprotected static org.apache.flink.configuration.Configuration loadConfiguration(EntrypointClusterConfiguration entrypointClusterConfiguration)
public static void runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.