public abstract class ClusterEntrypoint extends Object implements AutoCloseableAsync, 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 . |
protected static class |
ClusterEntrypoint.ShutdownBehaviour
Shutdown behaviour of a
ClusterEntrypoint . |
Modifier and Type | Field and Description |
---|---|
static 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(Configuration configuration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
@Internal public static final 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(Configuration configuration)
public int getRestPort()
public int getRpcPort()
public CompletableFuture<ApplicationStatus> getTerminationFuture()
public void startCluster() throws ClusterEntrypointException
ClusterEntrypointException
protected boolean supportsReactiveMode()
public static SecurityContext installSecurityContext(Configuration configuration) throws Exception
Exception
protected void initializeServices(Configuration configuration, PluginManager pluginManager) throws Exception
Exception
protected String getRPCPortRange(Configuration configuration)
RpcService
.configuration
- to extract the port range fromRpcService
protected HighAvailabilityServices createHaServices(Configuration configuration, Executor executor, RpcSystemUtils rpcSystemUtils) throws Exception
Exception
protected HeartbeatServices createHeartbeatServices(Configuration configuration)
protected MetricRegistryImpl createMetricRegistry(Configuration configuration, PluginManager pluginManager, RpcSystemUtils rpcSystemUtils)
public CompletableFuture<Void> closeAsync()
AutoCloseableAsync
closeAsync
in interface AutoCloseableAsync
protected CompletableFuture<Void> stopClusterServices(boolean cleanupHaData)
public void onFatalError(Throwable exception)
FatalErrorHandler
IMPORTANT: This call should never be blocking since it might be called from within the
main thread of an RpcEndpoint
.
onFatalError
in interface FatalErrorHandler
exception
- causeprotected void cleanupDirectories(ClusterEntrypoint.ShutdownBehaviour shutdownBehaviour) throws IOException
ClusterEntrypoint
.shutdownBehaviour
- specifying the shutdown behaviourIOException
- if the temporary directories could not be cleaned upprotected abstract DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) throws IOException
IOException
protected abstract ExecutionGraphInfoStore createSerializableExecutionGraphStore(Configuration configuration, ScheduledExecutor scheduledExecutor) throws IOException
IOException
public static EntrypointClusterConfiguration parseArguments(String[] args) throws FlinkParseException
FlinkParseException
protected static Configuration loadConfiguration(EntrypointClusterConfiguration entrypointClusterConfiguration)
public static void runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.