Class TaskManagerRunner
- java.lang.Object
-
- org.apache.flink.runtime.taskexecutor.TaskManagerRunner
-
- All Implemented Interfaces:
FatalErrorHandler
public class TaskManagerRunner extends Object implements FatalErrorHandler
This class is the executable entry point for the task manager in yarn or standalone mode. It constructs the related components (network, I/O manager, memory manager, RPC service, HA service) and starts them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaskManagerRunner.Result
static interface
TaskManagerRunner.TaskExecutorService
static interface
TaskManagerRunner.TaskExecutorServiceFactory
Factory forTaskExecutor
.
-
Field Summary
Fields Modifier and Type Field Description static int
FAILURE_EXIT_CODE
-
Constructor Summary
Constructors Constructor Description TaskManagerRunner(Configuration configuration, PluginManager pluginManager, TaskManagerRunner.TaskExecutorServiceFactory taskExecutorServiceFactory)
-
Method Summary
-
-
-
Field Detail
-
FAILURE_EXIT_CODE
@VisibleForTesting public static final int FAILURE_EXIT_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TaskManagerRunner
public TaskManagerRunner(Configuration configuration, PluginManager pluginManager, TaskManagerRunner.TaskExecutorServiceFactory taskExecutorServiceFactory) throws Exception
- Throws:
Exception
-
-
Method Detail
-
closeAsync
public CompletableFuture<TaskManagerRunner.Result> closeAsync()
-
getTerminationFuture
public CompletableFuture<TaskManagerRunner.Result> getTerminationFuture()
-
onFatalError
public void onFatalError(Throwable exception)
Description copied from interface:FatalErrorHandler
Being called when a fatal error occurs.IMPORTANT: This call should never be blocking since it might be called from within the main thread of an
RpcEndpoint
.- Specified by:
onFatalError
in interfaceFatalErrorHandler
- Parameters:
exception
- cause
-
loadConfiguration
public static Configuration loadConfiguration(String[] args) throws FlinkParseException
- Throws:
FlinkParseException
-
runTaskManager
public static int runTaskManager(Configuration configuration, PluginManager pluginManager) throws Exception
- Throws:
Exception
-
runTaskManagerProcessSecurely
public static void runTaskManagerProcessSecurely(String[] args)
-
runTaskManagerProcessSecurely
public static void runTaskManagerProcessSecurely(Configuration configuration)
-
createTaskExecutorService
public static TaskManagerRunner.TaskExecutorService createTaskExecutorService(Configuration configuration, ResourceID resourceID, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, BlobCacheService blobCacheService, boolean localCommunicationOnly, ExternalResourceInfoProvider externalResourceInfoProvider, WorkingDirectory workingDirectory, FatalErrorHandler fatalErrorHandler, DelegationTokenReceiverRepository delegationTokenReceiverRepository) throws Exception
- Throws:
Exception
-
startTaskManager
public static TaskExecutor startTaskManager(Configuration configuration, ResourceID resourceID, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, TaskExecutorBlobService taskExecutorBlobService, boolean localCommunicationOnly, ExternalResourceInfoProvider externalResourceInfoProvider, WorkingDirectory workingDirectory, FatalErrorHandler fatalErrorHandler, DelegationTokenReceiverRepository delegationTokenReceiverRepository) throws Exception
- Throws:
Exception
-
-