public class TaskManager$ extends Object
Modifier and Type | Field and Description |
---|---|
static TaskManager$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
TaskManager$() |
Modifier and Type | Method and Description |
---|---|
akka.actor.Props |
getTaskManagerProps(Class<? extends TaskManager> taskManagerClass,
TaskManagerConfiguration taskManagerConfig,
ResourceID resourceID,
TaskManagerLocation taskManagerLocation,
MemoryManager memoryManager,
IOManager ioManager,
NetworkEnvironment networkEnvironment,
HighAvailabilityServices highAvailabilityServices,
MetricRegistry metricsRegistry) |
akka.actor.ActorRef |
getTaskManagerRemoteReference(String taskManagerUrl,
akka.actor.ActorSystem system,
scala.concurrent.duration.FiniteDuration timeout)
Resolves the TaskManager actor reference in a blocking fashion.
|
scala.concurrent.duration.FiniteDuration |
HEARTBEAT_INTERVAL() |
grizzled.slf4j.Logger |
LOG()
TaskManager logger for synchronous logging (not through the logging actor)
|
void |
main(String[] args)
Entry point (main method) to run the TaskManager in a standalone fashion.
|
long |
MAX_STARTUP_CONNECT_TIME()
Maximum time (milli seconds) that the TaskManager will spend searching for a
|
Configuration |
parseArgsAndLoadConfig(String[] args)
Parse the command line arguments of the TaskManager and loads the configuration.
|
void |
runTaskManager(String taskManagerHostname,
ResourceID resourceID,
int actorSystemPort,
Configuration configuration,
HighAvailabilityServices highAvailabilityServices)
Starts and runs the TaskManager.
|
void |
runTaskManager(String taskManagerHostname,
ResourceID resourceID,
int actorSystemPort,
Configuration configuration,
HighAvailabilityServices highAvailabilityServices,
Class<? extends TaskManager> taskManagerClass)
Starts and runs the TaskManager.
|
int |
RUNTIME_FAILURE_RETURN_CODE()
Return code for critical errors during the runtime
|
scala.Tuple2<String,Object> |
selectNetworkInterfaceAndPort(Configuration configuration,
HighAvailabilityServices highAvailabilityServices) |
void |
selectNetworkInterfaceAndRunTaskManager(Configuration configuration,
ResourceID resourceID,
Class<? extends TaskManager> taskManagerClass)
Starts and runs the TaskManager.
|
akka.actor.ActorRef |
startTaskManagerComponentsAndActor(Configuration configuration,
ResourceID resourceID,
akka.actor.ActorSystem actorSystem,
HighAvailabilityServices highAvailabilityServices,
String taskManagerHostname,
scala.Option<String> taskManagerActorName,
boolean localTaskManagerCommunication,
Class<? extends TaskManager> taskManagerClass)
Starts the task manager actor.
|
long |
STARTUP_CONNECT_LOG_SUPPRESS()
Time (milli seconds) after which the TaskManager will start logging failed
|
int |
STARTUP_FAILURE_RETURN_CODE()
Return code for unsuccessful TaskManager startup
|
public static final TaskManager$ MODULE$
public grizzled.slf4j.Logger LOG()
public int STARTUP_FAILURE_RETURN_CODE()
public int RUNTIME_FAILURE_RETURN_CODE()
public long MAX_STARTUP_CONNECT_TIME()
public long STARTUP_CONNECT_LOG_SUPPRESS()
public scala.concurrent.duration.FiniteDuration HEARTBEAT_INTERVAL()
public void main(String[] args)
args
- The command line arguments.public Configuration parseArgsAndLoadConfig(String[] args) throws Exception
args
- Command line argumentsException
public void selectNetworkInterfaceAndRunTaskManager(Configuration configuration, ResourceID resourceID, Class<? extends TaskManager> taskManagerClass) throws Exception
This method first tries to select the network interface to use for the TaskManager communication. The network interface is used both for the actor communication (coordination) as well as for the data exchange between task managers. Unless the hostname/interface is explicitly configured in the configuration, this method will try out various interfaces and methods to connect to the JobManager and select the one where the connection attempt is successful.
After selecting the network interface, this method brings up an actor system for the TaskManager and its actors, starts the TaskManager's services (library cache, shuffle network stack, ...), and starts the TaskManager itself.
configuration
- The configuration for the TaskManager.taskManagerClass
- The actor class to instantiate.
Allows to use TaskManager subclasses for example for YARN.resourceID
- (undocumented)Exception
public scala.Tuple2<String,Object> selectNetworkInterfaceAndPort(Configuration configuration, HighAvailabilityServices highAvailabilityServices) throws IOException, IllegalConfigurationException
public void runTaskManager(String taskManagerHostname, ResourceID resourceID, int actorSystemPort, Configuration configuration, HighAvailabilityServices highAvailabilityServices) throws Exception
This method will also spawn a process reaper for the TaskManager (kill the process if the actor fails) and optionally start the JVM memory logging thread.
taskManagerHostname
- The hostname/address of the interface where the actor system
will communicate.resourceID
- The id of the resource which the task manager will run on.actorSystemPort
- The port at which the actor system will communicate.configuration
- The configuration for the TaskManager.highAvailabilityServices
- Service factory for high availability servicesException
public void runTaskManager(String taskManagerHostname, ResourceID resourceID, int actorSystemPort, Configuration configuration, HighAvailabilityServices highAvailabilityServices, Class<? extends TaskManager> taskManagerClass) throws Exception
This method will also spawn a process reaper for the TaskManager (kill the process if the actor fails) and optionally start the JVM memory logging thread.
taskManagerHostname
- The hostname/address of the interface where the actor system
will communicate.resourceID
- The id of the resource which the task manager will run on.actorSystemPort
- The port at which the actor system will communicate.configuration
- The configuration for the TaskManager.highAvailabilityServices
- Service factory for high availability servicestaskManagerClass
- The actor class to instantiate. Allows the use of TaskManager
subclasses for example for YARN.Exception
public akka.actor.ActorRef startTaskManagerComponentsAndActor(Configuration configuration, ResourceID resourceID, akka.actor.ActorSystem actorSystem, HighAvailabilityServices highAvailabilityServices, String taskManagerHostname, scala.Option<String> taskManagerActorName, boolean localTaskManagerCommunication, Class<? extends TaskManager> taskManagerClass) throws IllegalConfigurationException, IOException, Exception
configuration
- The configuration for the TaskManager.resourceID
- The id of the resource which the task manager will run on.actorSystem
- The actor system that should run the TaskManager actor.highAvailabilityServices
- Factory to create high availability servicestaskManagerHostname
- The hostname/address that describes the TaskManager's data location.taskManagerActorName
- Optionally the name of the TaskManager actor. If none is given,
the actor will use a random name.localTaskManagerCommunication
- If true, the TaskManager will not initiate the
TCP network stack.taskManagerClass
- The class of the TaskManager actor. May be used to give
subclasses that understand additional actor messages.IllegalConfigurationException
- Thrown, if the given config contains illegal values.IOException
- Thrown, if any of the I/O components (such as buffer pools,
I/O manager, ...) cannot be properly started.Exception
- Thrown is some other error occurs while parsing the configuration
or starting the TaskManager components.public akka.actor.Props getTaskManagerProps(Class<? extends TaskManager> taskManagerClass, TaskManagerConfiguration taskManagerConfig, ResourceID resourceID, TaskManagerLocation taskManagerLocation, MemoryManager memoryManager, IOManager ioManager, NetworkEnvironment networkEnvironment, HighAvailabilityServices highAvailabilityServices, MetricRegistry metricsRegistry)
public akka.actor.ActorRef getTaskManagerRemoteReference(String taskManagerUrl, akka.actor.ActorSystem system, scala.concurrent.duration.FiniteDuration timeout) throws IOException
taskManagerUrl
- The akka URL of the JobManager.system
- The local actor system that should perform the lookup.timeout
- The maximum time to wait until the lookup fails.IOException
- Thrown, if the lookup fails.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.