public abstract class ClusterEntrypoint extends Object implements FatalErrorHandler
Specialization of this class can be used for the session mode and the per-job mode
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
protected static int |
RUNTIME_FAILURE_RETURN_CODE |
protected static int |
STARTUP_FAILURE_RETURN_CODE |
protected static int |
SUCCESS_RETURN_CODE |
Modifier | Constructor and Description |
---|---|
protected |
ClusterEntrypoint(Configuration configuration) |
protected static final org.slf4j.Logger LOG
protected static final int SUCCESS_RETURN_CODE
protected static final int STARTUP_FAILURE_RETURN_CODE
protected static final int RUNTIME_FAILURE_RETURN_CODE
protected ClusterEntrypoint(Configuration configuration)
public CompletableFuture<Boolean> getTerminationFuture()
protected void startCluster()
protected void configureFileSystems(Configuration configuration) throws Exception
Exception
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception
Exception
protected void runCluster(Configuration configuration) throws Exception
Exception
protected void initializeServices(Configuration configuration) throws Exception
Exception
protected RpcService createRpcService(Configuration configuration, String bindAddress, String portRange) throws Exception
Exception
protected HighAvailabilityServices createHaServices(Configuration configuration, Executor executor) throws Exception
Exception
protected HeartbeatServices createHeartbeatServices(Configuration configuration)
protected MetricRegistryImpl createMetricRegistry(Configuration configuration)
protected void shutDown(boolean cleanupHaData) throws FlinkException
FlinkException
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 void startClusterComponents(Configuration configuration, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, BlobServer blobServer, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry) throws Exception
Exception
protected void stopClusterComponents(boolean cleanupHaData) throws Exception
Exception
protected static ClusterConfiguration parseArguments(String[] args)
protected static Configuration loadConfiguration(ClusterConfiguration clusterConfiguration)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.