Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5392#discussion_r28756662
--- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
---
@@ -37,32 +35,35 @@ import org.apache.spark.deploy.DeployMessages._
import org.apache.spark.deploy.master.{DriverState, Master}
import org.apache.spark.deploy.worker.ui.WorkerWebUI
import org.apache.spark.metrics.MetricsSystem
-import org.apache.spark.util.{ActorLogReceive, AkkaUtils, SignalLogger,
Utils}
+import org.apache.spark.rpc._
+import org.apache.spark.util.{SignalLogger, Utils}
-/**
- * @param masterAkkaUrls Each url should be a valid akka url.
- */
private[worker] class Worker(
- host: String,
- port: Int,
+ override val rpcEnv: RpcEnv,
webUiPort: Int,
cores: Int,
memory: Int,
- masterAkkaUrls: Array[String],
- actorSystemName: String,
- actorName: String,
+ masterRpcAddresses: Array[RpcAddress],
+ systemName: String,
+ endpointName: String,
workDirPath: String = null,
val conf: SparkConf,
val securityMgr: SecurityManager)
- extends Actor with ActorLogReceive with Logging {
- import context.dispatcher
+ extends ThreadSafeRpcEndpoint with Logging {
+
+ private val host = rpcEnv.address.host
+ private val port = rpcEnv.address.port
Utils.checkHost(host, "Expected hostname")
assert (port > 0)
- // For worker and executor IDs
- private def createDateFormat = new SimpleDateFormat("yyyyMMddHHmmss")
+ private val forwordMessageScheduler =
--- End diff --
would be great to document the following 2 too.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]