Standalone Worker
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.
Name | Description |
---|---|
Working directory of the executors that the Initialized when Used when Used when |
receive
Method
1 2 3 4 5 |
receive: PartialFunction[Any, Unit] |
Note
|
receive is part of RpcEndpoint Contract to process messages.
|
receive
…FIXME
handleRegisterResponse
Internal Method
1 2 3 4 5 |
handleRegisterResponse(msg: RegisterWorkerResponse): Unit |
handleRegisterResponse
…FIXME
Note
|
handleRegisterResponse is used when…FIXME
|
Launching Worker Standalone Application — main
Method
1 2 3 4 5 |
main(argStrings: Array[String]): Unit |
main
…FIXME
Starting RPC Environment And Registering Worker RPC Endpoint — startRpcEnvAndEndpoint
Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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
|
|
Creating Worker Instance
Worker
takes the following when created:
Worker
initializes the internal registries and counters.
createWorkDir
Internal Method
1 2 3 4 5 |
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
Method
1 2 3 4 5 |
onStart(): Unit |
Note
|
onStart is part of RpcEndpoint Contract to activate an endpoint and start accepting messages.
|
onStart
…FIXME