我有一个巨大的数据帧(500万行),每一行都是一篮子项目,我正在尝试获取频繁的项目集和关联规则。但它给了我StackOverflowErrors,我尝试设置检查点目录,但它没有解决问题。知道怎么解决这个问题吗?提前感谢
fpGrowth = FPGrowth(itemsCol="ARFeatures", minSupport=0.8, minConfidence=0.9)
model = fpGrowth.fit(completeDf)
java.lang.StackOverflowError位于java.lang.reflect.IInvocationTargetException。(InvocationTargetException.java:72)位于sun.reflect.GeneratedMethodAccessor14.invoke(未知源)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:498)位于java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)位于java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)位于java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)位于java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)位于java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)位于java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)位于java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)位于java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)位于java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)位于scala.collection.mutable.HashMap$$anonfun$writeObject$1.apply(HashMap.scala:138)位于scala.collection.mutable.HashMap$$anonfun$writeObject$1.apply(HashMap.scala:136)位于scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:230)位于scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)位于scala.collection.mutable.HashTable$class.serializeTo(HashTable.scala:125)位于scala.collection.mutable.HashMap.serializeTo(HashMap.scala:40)位于scala.collection.mutable.HashMap.writeObject(HashMap.scala:136)位于sun.reflect.GeneratedMethodAccessor14.invoke(未知源)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:498)位于java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)位于java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)位于java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)位于java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)位于java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)位于java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)位于java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)位于java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)位于java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)位于scala.collection.mutable.HashMap$$anonfun$writeObject$1.apply(HashMap.scala:138)
增加驱动程序堆栈大小。这取决于您如何执行应用程序,您需要正确地传递驱动程序JVM选项。
对于spark提交,您可以将其添加为cmd行arg:
--conf "spark.driver.extraJavaOptions=-Xss10m"
查看这些以了解更多详细信息:
- https://issues.apache.org/jira/browse/SPARK-18531
- 如何将-D参数或环境变量传递给Spark作业