sparkSession常见参数设置

def getSparkSession(sparkConf:SparkConf):SparkSession = {
    val sparkSession: SparkSession = SparkSession.builder()
      .config(sparkConf)
      //调度模式
      .config("spark.scheduler.mode", "FAIR")
      .config("spark.executor.memoryOverhead", "512")//堆外内存
      .config("enableSendEmailOnTaskFail", "true")
   //   .enableHiveSupport() //开启支持hive
      .getOrCreate()
    sparkSession.sparkContext.setLocalProperty("spark.scheduler.pool", "n1")
    sparkSession
  }

你可能感兴趣的:(spark)