【问题标题】:Spark and SparklyR error "grows beyond 64 KB"Spark 和 SparklyR 错误“超过 64 KB”
【发布时间】:2017-08-30 10:07:17
【问题描述】:

使用 SparklyR 和 Spark 2.0.2 调用逻辑回归后,我在 Spark 上收到以下错误。

ml_logistic_regression(Data, ml_formula)

我读入 Spark 的数据集比较大(2.2GB)。这是错误消息:

Error: org.apache.spark.SparkException: Job aborted due to stage failure: Task 
13 in stage 64.0 failed 1 times, most recent failure: 
Lost task 13.0 in stage 64.0 (TID 1132, localhost):    
java.util.concurrent.ExecutionException: 
java.lang.Exception: 
failed to compile: org.codehaus.janino.JaninoRuntimeException: 
Code of method "(Lorg/apache/spark/sql/catalyst/InternalRow;)Z" 
of class "org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificPredicate" 
grows beyond 64 KB

其他人也遇到过类似问题:https://github.com/rstudio/sparklyr/issues/298 但我找不到解决方案。有什么想法吗?

【问题讨论】:

标签: apache-spark sparklyr


【解决方案1】:

当您对数据进行子集化并尝试运行模型时会发生什么?您可能需要更改配置设置以处理数据大小:

library(dplyr)
library(sparklyr)
#configure the spark session and connect
config <- spark_config()
config$`sparklyr.shell.driver-memory` <- "XXG" #change depending on the size of the data
config$`sparklyr.shell.executor-memory` <- "XXG"

sc <-  spark_connect(master='yarn-client', spark_home='/XXXX/XXXX/XXXX',config = config)

spark_config() 中还有其他设置,您也可以更改这些设置以处理性能问题。这只是一对夫妇的例子。

【讨论】:

    猜你喜欢
    • 2018-11-26
    • 1970-01-01
    • 2020-11-15
    • 2017-02-23
    • 2017-04-27
    • 2015-05-12
    • 2018-10-05
    • 1970-01-01
    • 2015-03-11
    相关资源
    最近更新 更多