public class JobManager$ extends Object
Modifier and Type | Field and Description |
---|---|
static JobManager$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
JobManager$() |
Modifier and Type | Method and Description |
---|---|
String |
ARCHIVE_NAME()
Name of the archive actor
|
scala.Tuple12<ExecutorService,InstanceManager,Scheduler,BlobLibraryCacheManager,RestartStrategy,scala.concurrent.duration.FiniteDuration,Object,LeaderElectionService,SubmittedJobGraphStore,CheckpointRecoveryFactory,SavepointStore,scala.concurrent.duration.FiniteDuration> |
createJobManagerComponents(Configuration configuration,
scala.Option<LeaderElectionService> leaderElectionServiceOption)
Create the job manager components as (instanceManager, scheduler, libraryCacheManager,
archiverProps, defaultExecutionRetries,
delayBetweenRetries, timeout)
|
akka.actor.ActorRef |
getJobManagerActorRef(InetSocketAddress address,
akka.actor.ActorSystem system,
Configuration config)
Resolves the JobManager actor reference in a blocking fashion.
|
akka.actor.ActorRef |
getJobManagerActorRef(InetSocketAddress address,
akka.actor.ActorSystem system,
scala.concurrent.duration.FiniteDuration timeout)
Resolves the JobManager actor reference in a blocking fashion.
|
akka.actor.ActorRef |
getJobManagerActorRef(String jobManagerUrl,
akka.actor.ActorSystem system,
scala.concurrent.duration.FiniteDuration timeout)
Resolves the JobManager actor reference in a blocking fashion.
|
scala.concurrent.Future<akka.actor.ActorRef> |
getJobManagerActorRefFuture(InetSocketAddress address,
akka.actor.ActorSystem system,
scala.concurrent.duration.FiniteDuration timeout) |
String |
getJobManagerAkkaURL(akka.actor.ActorSystem system,
scala.Option<String> name) |
String |
getLocalJobManagerAkkaURL(scala.Option<String> name)
Builds the akka actor path for the JobManager actor to address the actor within
its own actor system.
|
String |
getRemoteJobManagerAkkaURL(Configuration config)
Returns the JobManager actor's remote Akka URL, given the configured hostname and port.
|
String |
getRemoteJobManagerAkkaURL(InetSocketAddress address,
scala.Option<String> name)
Builds the akka actor path for the JobManager actor, given the socket address
where the JobManager's actor system runs.
|
String |
JOB_MANAGER_NAME()
Name of the JobManager actor
|
grizzled.slf4j.Logger |
LOG() |
void |
main(String[] args)
Entry point (main method) to run the JobManager in a standalone fashion.
|
scala.Tuple4<Configuration,JobManagerMode,String,Iterator<Integer>> |
parseArgs(String[] args)
Loads the configuration, execution mode and the listening address from the provided command
line arguments.
|
<T> scala.util.Try<T> |
retryOnBindException(scala.Function0<T> fn,
scala.Function0<Object> stopCond,
long maxSleepBetweenRetries)
Retries a function if it fails because of a
BindException . |
void |
runJobManager(Configuration configuration,
JobManagerMode executionMode,
String listeningAddress,
int listeningPort)
Starts and runs the JobManager with all its components.
|
void |
runJobManager(Configuration configuration,
JobManagerMode executionMode,
String listeningAddress,
Iterator<Integer> listeningPortRange)
Starts and runs the JobManager with all its components trying to bind to
a port in the specified range.
|
int |
RUNTIME_FAILURE_RETURN_CODE() |
akka.actor.ActorRef |
startActor(akka.actor.Props props,
akka.actor.ActorSystem actorSystem) |
scala.Tuple4<akka.actor.ActorSystem,akka.actor.ActorRef,akka.actor.ActorRef,scala.Option<WebMonitor>> |
startActorSystemAndJobManagerActors(Configuration configuration,
JobManagerMode executionMode,
String listeningAddress,
int listeningPort,
Class<? extends JobManager> jobManagerClass,
Class<? extends MemoryArchivist> archiveClass)
Starts an ActorSystem, the JobManager and all its components including the WebMonitor.
|
scala.Tuple2<akka.actor.ActorRef,akka.actor.ActorRef> |
startJobManagerActors(Configuration configuration,
akka.actor.ActorSystem actorSystem,
Class<? extends JobManager> jobManagerClass,
Class<? extends MemoryArchivist> archiveClass)
Starts the JobManager and job archiver based on the given configuration, in the
given actor system.
|
scala.Tuple2<akka.actor.ActorRef,akka.actor.ActorRef> |
startJobManagerActors(Configuration configuration,
akka.actor.ActorSystem actorSystem,
scala.Option<String> jobMangerActorName,
scala.Option<String> archiveActorName,
Class<? extends JobManager> jobManagerClass,
Class<? extends MemoryArchivist> archiveClass)
Starts the JobManager and job archiver based on the given configuration, in the
given actor system.
|
int |
STARTUP_FAILURE_RETURN_CODE() |
public static final JobManager$ MODULE$
public grizzled.slf4j.Logger LOG()
public int STARTUP_FAILURE_RETURN_CODE()
public int RUNTIME_FAILURE_RETURN_CODE()
public String JOB_MANAGER_NAME()
public String ARCHIVE_NAME()
public void main(String[] args)
args
- The command line arguments.public void runJobManager(Configuration configuration, JobManagerMode executionMode, String listeningAddress, int listeningPort)
This method blocks indefinitely (or until the JobManager's actor system is shut down).
configuration
- The configuration object for the JobManager.executionMode
- The execution mode in which to run. Execution mode LOCAL will spawn an
an additional TaskManager in the same process.listeningAddress
- The hostname where the JobManager should listen for messages.listeningPort
- The port where the JobManager should listen for messages.public void runJobManager(Configuration configuration, JobManagerMode executionMode, String listeningAddress, Iterator<Integer> listeningPortRange)
configuration
- The configuration object for the JobManager.executionMode
- The execution mode in which to run. Execution mode LOCAL will spawn an
an additional TaskManager in the same process.listeningAddress
- The hostname where the JobManager should listen for messages.listeningPortRange
- The port range where the JobManager should listen for messages.public <T> scala.util.Try<T> retryOnBindException(scala.Function0<T> fn, scala.Function0<Object> stopCond, long maxSleepBetweenRetries)
BindException
.
fn
- The function to retrystopCond
- Flag to signal terminationmaxSleepBetweenRetries
- Max random sleep time between retriespublic scala.Tuple4<akka.actor.ActorSystem,akka.actor.ActorRef,akka.actor.ActorRef,scala.Option<WebMonitor>> startActorSystemAndJobManagerActors(Configuration configuration, JobManagerMode executionMode, String listeningAddress, int listeningPort, Class<? extends JobManager> jobManagerClass, Class<? extends MemoryArchivist> archiveClass)
configuration
- The configuration object for the JobManagerexecutionMode
- The execution mode in which to run. Execution mode LOCAL with spawn an
additional TaskManager in the same process.listeningAddress
- The hostname where the JobManager should listen for messages.listeningPort
- The port where the JobManager should listen for messagesjobManagerClass
- The class of the JobManager to be startedarchiveClass
- The class of the Archivist to be startedpublic scala.Tuple4<Configuration,JobManagerMode,String,Iterator<Integer>> parseArgs(String[] args)
args
- command line argumentspublic scala.Tuple12<ExecutorService,InstanceManager,Scheduler,BlobLibraryCacheManager,RestartStrategy,scala.concurrent.duration.FiniteDuration,Object,LeaderElectionService,SubmittedJobGraphStore,CheckpointRecoveryFactory,SavepointStore,scala.concurrent.duration.FiniteDuration> createJobManagerComponents(Configuration configuration, scala.Option<LeaderElectionService> leaderElectionServiceOption)
configuration
- The configuration from which to parse the config values.leaderElectionServiceOption
- LeaderElectionService which shall be returned if the option
is definedpublic scala.Tuple2<akka.actor.ActorRef,akka.actor.ActorRef> startJobManagerActors(Configuration configuration, akka.actor.ActorSystem actorSystem, Class<? extends JobManager> jobManagerClass, Class<? extends MemoryArchivist> archiveClass)
configuration
- The configuration for the JobManageractorSystem
- The actor system running the JobManagerjobManagerClass
- The class of the JobManager to be startedarchiveClass
- The class of the MemoryArchivist to be startedpublic scala.Tuple2<akka.actor.ActorRef,akka.actor.ActorRef> startJobManagerActors(Configuration configuration, akka.actor.ActorSystem actorSystem, scala.Option<String> jobMangerActorName, scala.Option<String> archiveActorName, Class<? extends JobManager> jobManagerClass, Class<? extends MemoryArchivist> archiveClass)
configuration
- The configuration for the JobManageractorSystem
- The actor system running the JobManagerjobMangerActorName
- Optionally the name of the JobManager actor. If none is given,
the actor will have the name generated by the actor system.archiveActorName
- Optionally the name of the archive actor. If none is given,
the actor will have the name generated by the actor system.jobManagerClass
- The class of the JobManager to be startedarchiveClass
- The class of the MemoryArchivist to be startedpublic akka.actor.ActorRef startActor(akka.actor.Props props, akka.actor.ActorSystem actorSystem)
public String getRemoteJobManagerAkkaURL(InetSocketAddress address, scala.Option<String> name)
address
- The address of the JobManager's actor system.public String getRemoteJobManagerAkkaURL(Configuration config)
config
- The configuration to parsepublic String getLocalJobManagerAkkaURL(scala.Option<String> name)
public String getJobManagerAkkaURL(akka.actor.ActorSystem system, scala.Option<String> name)
public scala.concurrent.Future<akka.actor.ActorRef> getJobManagerActorRefFuture(InetSocketAddress address, akka.actor.ActorSystem system, scala.concurrent.duration.FiniteDuration timeout)
public akka.actor.ActorRef getJobManagerActorRef(String jobManagerUrl, akka.actor.ActorSystem system, scala.concurrent.duration.FiniteDuration timeout)
jobManagerUrl
- 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.public akka.actor.ActorRef getJobManagerActorRef(InetSocketAddress address, akka.actor.ActorSystem system, scala.concurrent.duration.FiniteDuration timeout)
address
- The socket address of the JobManager's actor system.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.public akka.actor.ActorRef getJobManagerActorRef(InetSocketAddress address, akka.actor.ActorSystem system, Configuration config)
address
- The socket address of the JobManager's actor system.system
- The local actor system that should perform the lookup.config
- The config describing the maximum time to wait until the lookup fails.IOException
- Thrown, if the lookup fails.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.