我已經安裝了Spark-1.4.1(具有R 3.1.3版本)。目前正在測試SparkR以運行統計模型。我能夠運行一些示例代碼,例如,如何在64位模式下運行sparkR
Sys.setenv(SAPRK_HOME = "C:\\hdp\\spark-1.4.1-bin-hadoop2.6")
.libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))
#load the Sparkr library
library(SparkR)
# Create a spark context and a SQL context
sc <- sparkR.init(master = "local")
sqlContext <- sparkRSQL.init(sc)
#create a sparkR DataFrame
DF <- createDataFrame(sqlContext, faithful)
sparkR.stop()
所以接下來,我到SparkR
安裝rJava
包。但它沒有安裝。給出以下錯誤。
> install.packages("rJava")
Installing package into 'C:/hdp/spark-1.4.1-bin-hadoop2.6/R/lib'
(as 'lib' is unspecified)
trying URL 'http://ftp.iitm.ac.in/cran/bin/windows/contrib/3.1/rJava_0.9-7.zip'
Content type 'text/html; charset="utf-8"' length 898 bytes
opened URL
downloaded 898 bytes
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open compressed file 'rJava/DESCRIPTION', probable reason 'No such file or directory'
而且當,我跑在它開始作爲32位應用程序殼SparkR
命令。我突出顯示了版本信息如下。
所以,請幫我解決這個問題。
我無法重現您的32位應用程序。你嘗試過使用香草R會話並加載SparkR嗎? – csgillespie
我沒有使用香草R會話。我會嘗試通過香草R會議。 –