得到错误而初始化sparkR:JVM是不是10秒后准备 [英] Getting Error while initializing sparkR : JVM is not ready after 10 seconds
问题描述
我目前正在测试使用sparkR一个应用程序。这是我的平台和放大器;申请资料:
I'm currently testing one application using sparkR. This are the my platform & application details:
平台:Windows Server 2008的版本SparkR,R版本3.1.2
(2014年10月31日)星火优化版本:1.4.1版
Platform: Windows server 2008 SparkR version : R version 3.1.2 (2014-10-31) Spark Verion : version 1.4.1
我干了什么?
第一步:加载封装成R环境
库(SparkR) - 工作
library(SparkR) -- Working
第二步:设置系统环境变量
Sys.setenv(SPARK_HOME =C:\\ HDP \\火花1.4.1彬hadoop2.6) -
工作.libPaths(C(file.path(Sys.getenv(SPARK_HOME),R,
LIB),. libPaths()))
Sys.setenv(SPARK_HOME = "C:\hdp\spark-1.4.1-bin-hadoop2.6") -- Working .libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"),.libPaths()))
第三步:创建一个火花环境和SQL上下文
&SC LT; - sparkR.init(主=本地,sparkHome =
C:\\ HDP \\火花1.4.1彬hadoop2.6的appName =TestSparR)
sc <- sparkR.init(master = "local",sparkHome = "C:\hdp\spark-1.4.1-bin-hadoop2.6",appName = "TestSparR")
获取错误在该行即 JVM是不是10秒后准备
请帮我解决这个问题。
谢谢你。
Please, help me resolve this issue. Thanks.
推荐答案
我有同样的问题,我可以告诉你,我试了很多很多东西。
I had the same problem, and I can tell you I tried many many things.
但最后以下为我工作,(顺便说一下,R和RStudio)重新启动计算机后,
But finally the following worked for me, after restarting my computer (and R and RStudio by the way):
SPARK_HOME <- "C:\\Apache\\spark-1.5.2-bin-hadoop2.6\\"
Sys.setenv('SPARKR_SUBMIT_ARGS'='"--packages" "com.databricks:spark-csv_2.10:1.2.0" "sparkr-shell"')
library(SparkR, lib.loc = "C:\\Apache\\spark-1.5.2-bin-hadoop2.6\\R\\lib")
library(SparkR)
library(rJava)
sc <- sparkR.init(master = "local", sparkHome = SPARK_HOME)
这也许可以帮助:重新启动系统后,这个被列入我的环境变量PATH:
Maybe this can help: after restarting the system this was included in my environment variables PATH:
C:\\ ProgramData \\ ORACLE \\的Java \\ javapath
这篇关于得到错误而初始化sparkR:JVM是不是10秒后准备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!