Constructor and Description |
---|
AkkaUtils() |
Modifier and Type | Method and Description |
---|---|
static scala.concurrent.duration.FiniteDuration |
askTimeout(SparkConf conf)
Returns the default Spark timeout to use for Akka ask operations.
|
static <T> T |
askWithReply(Object message,
akka.actor.ActorRef actor,
scala.concurrent.duration.FiniteDuration timeout)
Send a message to the given actor and get its result within a default timeout, or
throw a SparkException if this fails.
|
static <T> T |
askWithReply(Object message,
akka.actor.ActorRef actor,
int maxAttempts,
int retryInterval,
scala.concurrent.duration.FiniteDuration timeout)
Send a message to the given actor and get its result within a default timeout, or
throw a SparkException if this fails even after the specified number of retries.
|
static scala.Tuple2<akka.actor.ActorSystem,Object> |
createActorSystem(String name,
String host,
int port,
SparkConf conf,
SecurityManager securityManager)
Creates an ActorSystem ready for remoting, with various Spark features.
|
static scala.concurrent.duration.FiniteDuration |
lookupTimeout(SparkConf conf)
Returns the default Spark timeout to use for Akka remote actor lookup.
|
static akka.actor.ActorRef |
makeDriverRef(String name,
SparkConf conf,
akka.actor.ActorSystem actorSystem) |
static akka.actor.ActorRef |
makeExecutorRef(String name,
SparkConf conf,
String host,
int port,
akka.actor.ActorSystem actorSystem) |
static int |
maxFrameSizeBytes(SparkConf conf)
Returns the configured max frame size for Akka messages in bytes.
|
static int |
numRetries(SparkConf conf)
Returns the configured number of times to retry connecting
|
static int |
reservedSizeBytes()
Space reserved for extra data in an Akka message besides serialized task or task result.
|
static int |
retryWaitMs(SparkConf conf)
Returns the configured number of milliseconds to wait on each retry
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static scala.Tuple2<akka.actor.ActorSystem,Object> createActorSystem(String name, String host, int port, SparkConf conf, SecurityManager securityManager)
Note: the name
parameter is important, as even if a client sends a message to right
host + port, if the system name is incorrect, Akka will drop the message.
If indestructible is set to true, the Actor System will continue running in the event
of a fatal exception. This is used by Executor
.
public static scala.concurrent.duration.FiniteDuration askTimeout(SparkConf conf)
public static scala.concurrent.duration.FiniteDuration lookupTimeout(SparkConf conf)
public static int maxFrameSizeBytes(SparkConf conf)
public static int reservedSizeBytes()
public static int numRetries(SparkConf conf)
public static int retryWaitMs(SparkConf conf)
public static <T> T askWithReply(Object message, akka.actor.ActorRef actor, scala.concurrent.duration.FiniteDuration timeout)
public static <T> T askWithReply(Object message, akka.actor.ActorRef actor, int maxAttempts, int retryInterval, scala.concurrent.duration.FiniteDuration timeout)
public static akka.actor.ActorRef makeDriverRef(String name, SparkConf conf, akka.actor.ActorSystem actorSystem)
public static akka.actor.ActorRef makeExecutorRef(String name, SparkConf conf, String host, int port, akka.actor.ActorSystem actorSystem)