public class TaskManagerRunner extends Object implements FatalErrorHandler, AutoCloseableAsync
Constructor and Description |
---|
TaskManagerRunner(Configuration configuration,
ResourceID resourceId) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
closeAsync()
Trigger the closing of the resource and return the corresponding
close future.
|
static RpcService |
createRpcService(Configuration configuration,
HighAvailabilityServices haServices)
Create a RPC service for the task manager.
|
CompletableFuture<Void> |
getTerminationFuture() |
static void |
main(String[] args) |
void |
onFatalError(Throwable exception)
Being called when a fatal error occurs.
|
static void |
runTaskManager(Configuration configuration,
ResourceID resourceId) |
void |
start() |
static TaskExecutor |
startTaskManager(Configuration configuration,
ResourceID resourceID,
RpcService rpcService,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
MetricRegistry metricRegistry,
BlobCacheService blobCacheService,
boolean localCommunicationOnly,
FatalErrorHandler fatalErrorHandler) |
protected void |
terminateJVM() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TaskManagerRunner(Configuration configuration, ResourceID resourceId) throws Exception
Exception
public CompletableFuture<Void> closeAsync()
AutoCloseableAsync
closeAsync
in interface AutoCloseableAsync
public CompletableFuture<Void> getTerminationFuture()
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 terminateJVM()
public static void runTaskManager(Configuration configuration, ResourceID resourceId) throws Exception
Exception
public static TaskExecutor startTaskManager(Configuration configuration, ResourceID resourceID, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, BlobCacheService blobCacheService, boolean localCommunicationOnly, FatalErrorHandler fatalErrorHandler) throws Exception
Exception
public static RpcService createRpcService(Configuration configuration, HighAvailabilityServices haServices) throws Exception
configuration
- The configuration for the TaskManager.haServices
- to use for the task manager hostname retrievalException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.