-
SparkContext初始化操作
- private val creationSite: CallSite = Utils.getCallSite()
- private[spark] val listenerBus = new LiveListenerBus(this)
- addedFiles/addedJars:用于存储每个静态文件/ jar的URL以及文件的本地时间戳
- val sparkUser = Utils.getCurrentUserName()
- try{
- _conf
- _jars/_files/_eventLogDir/_eventLogCodec
- _jobProgressListener = new JobProgressListener(_conf)
- _env = createSparkEnv(_conf, isLocal, listenerBus)->SparkEnv.set(_env)
- _statusTracker = new SparkStatusTracker(this)
- _progressBar/_ui/_hadoopConfiguration/_executorMemory/executorEnvs
- _heartbeatReceiver = env.rpcEnv.setupEndpoint(HeartbeatReceiver.ENDPOINT_NAME, new HeartbeatReceiver(this))
- val (sched, ts) = SparkContext.createTaskScheduler(this, master, deployMode)
- _schedulerBackend /_taskScheduler /_dagScheduler
- _heartbeatReceiver.ask[Boolean](TaskSchedulerIsSet)
- _taskScheduler.start()
- _env.blockManager.initialize(_applicationId)
- _env.metricsSystem.start()
- _executorAllocationManager.foreach(_.start())
- setupAndStartListenerBus()
- postEnvironmentUpdate()
- postApplicationStart()
- _taskScheduler.postStartHook()
- _env.metricsSystem.registerSource
- _shutdownHookRef = ShutdownHookManager.addShutdownHook()
}catch{
……
}
-
RDDOperationScope解读
0. withScope 简述:https://www.jianshu.com/p/8a3958337aea
1. 源码解读:https://blog.csdn.net/qq_21383435/article/details/79666170
2. 其他说明:http://www.mamicode.com/info-detail-1066067.html
-
coalesce()方法和repartition()方法
https://blog.csdn.net/lzq20115395/article/details/80602071