gpt4 book ai didi

apache-spark - neo4j-mazerunner,如何在 docker-compose.yml 中增加内存大小

转载 作者:行者123 更新时间:2023-12-02 20:18:13 24 4
gpt4 key购买 nike

使用 kbastani/spark-neo4jdocker-compose在 MacBook pro (16gb mem) 上,我正在尝试分析 strong_connected_components 我的图表。

我有一个包含大约 60,000 个节点的图表 (n1:Node {id:1})-[r:NEXT {count:100}]->(n2:Node {id:2}) .

使用 neo4j 浏览器,我设法获得了 网页排名 处理回我的节点。

但是,当我尝试运行更复杂的算法时,如 strong_connected_components ,我收到以下错误:

mazerunner_1  | 16/11/29 14:58:01 ERROR Utils: Uncaught exception in thread SparkListenerBus
mazerunner_1 | java.lang.OutOfMemoryError: Java heap space
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5$$anonfun$apply$9.apply(JobProgressListener.scala:200)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5$$anonfun$apply$9.apply(JobProgressListener.scala:200)
mazerunner_1 | at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
mazerunner_1 | at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5.apply(JobProgressListener.scala:200)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5.apply(JobProgressListener.scala:198)
mazerunner_1 | at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
mazerunner_1 | at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener.onJobStart(JobProgressListener.scala:198)
mazerunner_1 | at org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:34)
mazerunner_1 | at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
mazerunner_1 | at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
mazerunner_1 | at org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:53)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:36)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:76)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
mazerunner_1 | at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1618)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:60)
mazerunner_1 | Exception in thread "SparkListenerBus" java.lang.OutOfMemoryError: Java heap space
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5$$anonfun$apply$9.apply(JobProgressListener.scala:200)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5$$anonfun$apply$9.apply(JobProgressListener.scala:200)
mazerunner_1 | at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
mazerunner_1 | at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5.apply(JobProgressListener.scala:200)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener$$anonfun$onJobStart$5.apply(JobProgressListener.scala:198)
mazerunner_1 | at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
mazerunner_1 | at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
mazerunner_1 | at org.apache.spark.ui.jobs.JobProgressListener.onJobStart(JobProgressListener.scala:198)
mazerunner_1 | at org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:34)
mazerunner_1 | at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
mazerunner_1 | at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
mazerunner_1 | at org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:53)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:36)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:76)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
mazerunner_1 | at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1618)
mazerunner_1 | at org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:60)

我试图像这样修改我的 docker-compose.yml 文件:
hdfs:
environment:
- "JAVA_OPTS=-Xmx5g"
image: sequenceiq/hadoop-docker:2.4.1
command: /etc/bootstrap.sh -d -bash
mazerunner:
environment:
- "JAVA_OPTS=-Xmx5g"
image: kbastani/neo4j-graph-analytics:latest
links:
- hdfs
graphdb:
environment:
- "JAVA_OPTS=-Xmx2g"
image: kbastani/docker-neo4j:latest
ports:
- "7474:7474"
- "1337:1337"
volumes:
- /opt/data
links:
- mazerunner
- hdfs

没有成功。如何配置 spark & hdfs 以使用最大可用内存?

最佳答案

我的解决方案是增加虚拟机的内存大小。在我的 Virtual Box UI 上,我调整了“基本内存”大小 slider 。 enter image description here

关于apache-spark - neo4j-mazerunner,如何在 docker-compose.yml 中增加内存大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40869263/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com