【发布时间】:2018-12-19 16:16:42
【问题描述】:
当通过 sparklyr 启动 spark 集群时,我注意到所有执行程序可能需要 10-60 秒才能上线。
现在我使用Sys.sleep(60) 让他们有时间上线,但有时需要更长的时间,有时更短。我想要一种编程方式来调整这个时间差异,类似于关于 Python 的this question。所以我想我想通过sparklyr 传递getExecutorMemoryStatus,但我不知道该怎么做。
要查看我看到的内容,请运行以下代码以启动 yarn-client spark 连接,并检查 Yarn UI。在Event Timeline中我们可以看到每个executor上线的时间。
spark_config <- spark_config()
spark_config$spark.executor.memory <- "11G"
spark_config$`sparklyr.shell.driver-memory` <- "11G"
spark_config$spark.dynamicAllocation.enabled <- FALSE
spark_config$`spark.yarn.executor.memoryOverhead` <- "1G"
spark_config$spark.executor.instances <- 32
sc <- spark_connect(master = "yarn-client", config = spark_config)
【问题讨论】:
标签: r apache-spark sparklyr