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 . |
Modifier and Type | Field and Description |
---|---|
static ConfigOption<String> |
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
public static final ConfigOption<String> 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 CompletableFuture<ApplicationStatus> getTerminationFuture()
public void startCluster() throws ClusterEntrypointException
ClusterEntrypointException
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception
Exception
protected void initializeServices(Configuration configuration) throws Exception
Exception
protected String getRPCPortRange(Configuration configuration)
RpcService
.configuration
- to extract the port range fromRpcService
protected HighAvailabilityServices createHaServices(Configuration configuration, Executor executor) throws Exception
Exception
protected HeartbeatServices createHeartbeatServices(Configuration configuration)
protected MetricRegistryImpl createMetricRegistry(Configuration configuration)
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 abstract DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration)
protected abstract ArchivedExecutionGraphStore createSerializableExecutionGraphStore(Configuration configuration, ScheduledExecutor scheduledExecutor) throws IOException
IOException
protected static EntrypointClusterConfiguration parseArguments(String[] args) throws FlinkParseException
FlinkParseException
protected static Configuration loadConfiguration(EntrypointClusterConfiguration entrypointClusterConfiguration)
public static void runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.