Standalone Worker (aka standalone slave) is a logical node in a Spark Standalone cluster.
Worker
is a ThreadSafeRpcEndpoint that uses Worker for the RPC endpoint name when registered.
You can have one or many standalone workers in a standalone cluster. They can be started and stopped using management scripts.
Worker
is created when…FIXME
When started, Worker
…FIXME
Name | Description |
---|---|
Working directory of the executors that the Initialized when Used when Used when |
receive: PartialFunction[Any, Unit]
Note
|
receive is part of RpcEndpoint Contract to process messages.
|
receive
…FIXME
handleRegisterResponse(msg: RegisterWorkerResponse): Unit
handleRegisterResponse
…FIXME
Note
|
handleRegisterResponse is used when…FIXME
|
main(argStrings: Array[String]): Unit
main
…FIXME
startRpcEnvAndEndpoint(
host: String,
port: Int,
webUiPort: Int,
cores: Int,
memory: Int,
masterUrls: Array[String],
workDir: String,
workerNumber: Option[Int] = None,
conf: SparkConf = new SparkConf): RpcEnv
startRpcEnvAndEndpoint
…FIXME
startRpcEnvAndEndpoint
creates a RpcEnv for the input host
and port
.
startRpcEnvAndEndpoint
creates a Worker RPC endpoint (for the RPC environment and the input webUiPort
, cores
, memory
, masterUrls
, workDir
and conf
).
startRpcEnvAndEndpoint
requests the RpcEnv
to register the Worker RPC endpoint under the name Worker.
Note
|
|
createWorkDir(): Unit
createWorkDir
sets workDir to be either workDirPath if defined or sparkHome with work
subdirectory.
In the end, createWorkDir
creates workDir directory (including any necessary but nonexistent parent directories).
createWorkDir
reports…FIXME
Note
|
createWorkDir is used exclusively when Worker RPC Endpoint is requested to start on a RPC environment.
|
onStart(): Unit
Note
|
onStart is part of RpcEndpoint Contract to activate an endpoint and start accepting messages.
|
onStart
…FIXME