Spark Q&A : Only one SparkContext may be running in this JVM
来源:互联网 发布:珠峰node不加密百度云 编辑:程序博客网 时间:2024/05/30 20:07
Q : Spark报错
17/07/06 15:45:21 ERROR ApplicationMaster: User class threw exception: org.apache.spark.SparkException: Only one SparkContext may be running in this JVM (see SPARK-2243). To ignore this error, set spark.driver.allowMultipleContexts = true. The currently running SparkContext was created at:org.apache.spark.SparkContext.<init>(SparkContext.scala:82)XXXXX.XXXXXXXXXX$.main(XXXXX.scala:35)XXXXX.XXXXXXXXXX.main(XXXXX.scala)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:606)org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:542)
A : 该报错是因为创建了多个sparkContext, 一般是因为在创建StreamingContext的时候使用了SparkContext而非SparkConf,如下:
val sc = new SparkContext(new SparkConf())val ssc = new StreamingContext(sc,Minutes(5))
阅读全文
0 0
- Spark Q&A : Only one SparkContext may be running in this JVM
- Only one SparkContext may be running in this JVM
- 解决spark-shell执行官方sparkstreaming 报 only one sparkcontext maybe running in this jvm的错误
- A master URL must be set in your configuration at org.apache.spark.SparkContext.<init>(SparkContext.
- ResultSet may only be accessed in a forward direction
- ResultSet may only be accessed in a forward direction
- ResultSet may only be accessed in a forward direction 问题解决
- ResultSet may only be accessed in a forward direction
- ResultSet may only be accessed in a forward direction
- 解决 ResultSet may only be accessed in a forward direction 错误
- java.sql.SQLException: ResultSet may only be accessed in a forward direction.报错
- ResultSet may only be accessed in a forward direction Hibernate4异常解决方案
- Only one Looper may be created per thread
- Only one Looper may be created per thread
- Use MFC in a Static Library,This may be due to a corruption of the heap....
- Phone may be running a version of iOS that is not supported by this version of Xcode.
- a predicate may reference only one outer-joined table
- " 'this' may not be used in this context"
- haproxy代理sqlserver
- Spring 积累
- spring事务(附件pdf)
- Ubuntu 11.10 下安装 JDK 6.27
- hihoCoder #1135 : Magic Box
- Spark Q&A : Only one SparkContext may be running in this JVM
- MySQL为字段添加默认时间(插入时间)
- 08 jdk5的静态导入
- 进程与线程的一个简单解释
- Windows使用计划任务自动Git同步代码
- 欢迎使用CSDN-markdown编辑器
- 总结 android MVP和MVC设计模式和面向接口编程
- 09jdk5可变参数与OverLoad;10java5的增加for循环
- 11 jdk5基本数据类型的自动拆箱与装箱