我使用Sparkling Water运行Tweedie GLM,处理不同大小的数据,即20 MB、400 MB、2GB和25 GB。代码在采样迭代10时运行正常。但我需要测试大规模采样的情况..
采样迭代次数为500
在这种情况下,代码对20 MB和400 MB的数据运行良好。但当数据超过2 GB时,开始出现问题
经过搜索,我找到了一种解决方案,即禁用更改监听器,但这对大数据无效。--conf "spark.scheduler.minRegisteredResourcesRatio=1" "spark.ext.h2o.topology.change.listener.enabled=false"
这是我的Spark提交配置
spark-submit \ --packages ai.h2o:sparkling-water-core_2.10:1.6.1, log4j:log4j:1.2.17\ --driver-memory 8g \ --executor-memory 10g \ --num-executors 10\ --executor-cores 5 \ --class TweedieGLM target/SparklingWaterGLM.jar \ $1\ $2\ --conf "spark.scheduler.minRegisteredResourcesRatio=1" "spark.ext.h2o.topology.change.listener.enabled=false"
这是我得到的错误信息
16/07/08 20:39:55 ERROR YarnScheduler: Lost executor 2 on cfclbv0152.us2.oraclecloud.com: Executor heartbeat timed out after 175455 ms 16/07/08 20:40:00 ERROR YarnScheduler: Lost executor 2 on cfclbv0152.us2.oraclecloud.com: remote Rpc client disassociated 16/07/08 20:40:00 ERROR LiveListenerBus: Listener anon1 threw an exception java.lang.IllegalArgumentException: Executor without H2O instance discovered, killing the cloud! at org.apache.spark.h2o.H2OContext$$anon$1.onExecutorAdded(H2OContext.scala:203) at org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:58) at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31) at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31) at org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:56) at org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:37) at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:79) at org.apache.spark.util.Utils$.tryOrStopSparkContext(Utils.scala:1136) at org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:63)
回答:
仔细阅读了在GitHub上发布的问题后https://github.com/h2oai/sparkling-water/issues/32,我尝试了几种方法,以下是我尝试过的
添加了--conf "spark.scheduler.minRegisteredResourcesRatio=1" "spark.ext.h2o.topology.change.listener.enabled=false" "spark.locality.wait=3000" "spark.ext.h2o.network.mask=10.196.64.0/24"
更改了:执行器数量从10改为3、6执行器内存从4改为12和12改为24gb驱动程序内存从4改为12和12改为24gb
我从中学到的是:GLM是一个需要大量内存的任务,因此我们必须提供足够的内存来执行任务。