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(org.apache.flink.configuration.Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureFileSystems(org.apache.flink.configuration.Configuration configuration) |
protected HighAvailabilityServices |
createHaServices(org.apache.flink.configuration.Configuration configuration,
Executor executor) |
protected HeartbeatServices |
createHeartbeatServices(org.apache.flink.configuration.Configuration configuration) |
protected MetricRegistryImpl |
createMetricRegistry(org.apache.flink.configuration.Configuration configuration) |
protected RpcService |
createRpcService(org.apache.flink.configuration.Configuration configuration,
String bindAddress,
String portRange) |
CompletableFuture<Boolean> |
getTerminationFuture() |
protected void |
initializeServices(org.apache.flink.configuration.Configuration configuration) |
protected SecurityContext |
installSecurityContext(org.apache.flink.configuration.Configuration configuration) |
protected static org.apache.flink.configuration.Configuration |
loadConfiguration(ClusterConfiguration clusterConfiguration) |
void |
onFatalError(Throwable exception)
Being called when a fatal error occurs.
|
protected static ClusterConfiguration |
parseArguments(String[] args) |
protected void |
runCluster(org.apache.flink.configuration.Configuration configuration) |
protected void |
shutDown(boolean cleanupHaData) |
protected void |
startCluster() |
protected abstract void |
startClusterComponents(org.apache.flink.configuration.Configuration configuration,
RpcService rpcService,
HighAvailabilityServices highAvailabilityServices,
BlobServer blobServer,
HeartbeatServices heartbeatServices,
MetricRegistry metricRegistry) |
protected void |
stopClusterComponents(boolean cleanupHaData) |
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(org.apache.flink.configuration.Configuration configuration)
public CompletableFuture<Boolean> getTerminationFuture()
protected void startCluster()
protected void configureFileSystems(org.apache.flink.configuration.Configuration configuration) throws Exception
Exception
protected SecurityContext installSecurityContext(org.apache.flink.configuration.Configuration configuration) throws Exception
Exception
protected void runCluster(org.apache.flink.configuration.Configuration configuration) throws Exception
Exception
protected void initializeServices(org.apache.flink.configuration.Configuration configuration) throws Exception
Exception
protected RpcService createRpcService(org.apache.flink.configuration.Configuration configuration, String bindAddress, String portRange) throws Exception
Exception
protected HighAvailabilityServices createHaServices(org.apache.flink.configuration.Configuration configuration, Executor executor) throws Exception
Exception
protected HeartbeatServices createHeartbeatServices(org.apache.flink.configuration.Configuration configuration)
protected MetricRegistryImpl createMetricRegistry(org.apache.flink.configuration.Configuration configuration)
protected void shutDown(boolean cleanupHaData) throws org.apache.flink.util.FlinkException
org.apache.flink.util.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(org.apache.flink.configuration.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 org.apache.flink.configuration.Configuration loadConfiguration(ClusterConfiguration clusterConfiguration)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.