我正在尝试记录在一个Yarn集群中运行的每个Spark应用程序的属性(如spark.shuffle.compress、spark.reducer.maxMbInFlight、spark.executor.instances等属性)。
然而,我不知道这些信息是否被记录在任何地方。我知道我们可以通过" yarn“命令访问纱线日志,但是我所说的属性并没有存储在那里。
有什么办法可以接触到这种信息吗?这个想法是跟踪集群中运行的所有应用程序及其属性,以确定哪些应用程序在执行时间上影响最大。
发布于 2015-12-10 07:48:49
你可以自己记录下来...使用sc.getConf.toDebugString、sqlContext.getConf("")或sqlContext.getAllConfs。
scala> sqlContext.getConf("spark.sql.shuffle.partitions")
res129: String = 200
scala> sqlContext.getAllConfs
res130: scala.collection.immutable.Map[String,String] = Map(hive.server2.thrift.http.cookie.is.httponly -> true, dfs.namenode.resource.check.interval ....
scala> sc.getConf.toDebugString
res132: String =
spark.app.id=local-1449607289874
spark.app.name=Spark shell
spark.driver.host=10.5.10.153编辑:但是,我在sqlContext.getAllConfs中的1200+属性中找不到您指定的属性:(否则文档会说:
http://:4040上的应用程序web UI在“
”选项卡中列出了Spark属性。这是一个很有用的检查位置,可以确保您的属性已正确设置。请注意,只有通过spark-defaults.conf、SparkConf或命令行明确指定的值才会出现。对于所有其他配置属性,您可以假定使用默认值。
https://stackoverflow.com/questions/34184852
复制相似问题