Spark启动程序:Master

临时笔记

  def main(argStrings: Array[String]) {
    // 读取以spark.开头的配置属性
    val conf = new SparkConf
    // 检查环境变量:SPARK_MASTER_HOST、SPARK_MASTER_PORT、SPARK_MASTER_WEBUI_PORT
    
// 再检查配置属性:master.ui.port
    
// 检查其他master配置,如命令行属性
    val args = new MasterArguments(argStrings, conf)
    // 配置akka,创建spark master actor
    val (actorSystem, _, _) = startSystemAndActor(args.host, args.port, args.webUiPort, conf)
    actorSystem.awaitTermination()
  }

原文地址:https://www.cnblogs.com/hujunfei/p/3640324.html