首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在BigInsights hadoop群集中使用spark-submit提交SparkR作业(R脚本)失败

在BigInsights hadoop群集中使用spark-submit提交SparkR作业(R脚本)失败
EN

Stack Overflow用户
提问于 2016-08-08 02:08:29
回答 1查看 395关注 0票数 1

我已经使用5个节点的hadoop集群(包括带有SparkR的Apache Spark )创建了IBM服务。我尝试使用SparkR连接cloudant数据库,获取一些数据并进行一些处理。

在BigInsights hadoop群集中使用spark-submit提交SparkR作业(R脚本)失败。我已经创建了SparkR脚本并运行了以下代码,

代码语言:javascript
复制
-bash-4.1$ spark-submit --master local[2] test_sparkr.R
16/08/07 17:43:40 WARN SparkConf: The configuration key 'spark.yarn.applicationMaster.waitTries' has been deprecated as of Spark 1.3 and and may be removed in the future. Please use the new key 'spark.yarn.am.waitTime' instead.
Error: could not find function "sparkR.init"
Execution halted
-bash-4.1$

test_sparkr.R文件的内容为:

代码语言:javascript
复制
# Creating SparkConext and connecting to Cloudant DB
sc <- sparkR.init(sparkEnv = list("cloudant.host"="<<cloudant-host-name>>","<<><<cloudant-user-name>>>","cloudant.password"="<<cloudant-password>>", "jsonstore.rdd.schemaSampleSize"="-1"))

# Database to be connected to extract the data
database <- "testdata"
# Creating Spark SQL Context
sqlContext <- sparkRSQL.init(sc)
# Creating DataFrame for the "testdata" Cloudant DB
testDataDF <- read.df(sqlContext, database, header='true', source = "com.cloudant.spark",inferSchema='true')

如何在IBM BigInsights中安装spark-cloudant连接器并解决该问题。做有需要的事吧。如果能帮上忙,我们将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2016-08-08 19:10:51

我相信spark-cloudant连接器还不适用于R。

希望我能在答案是正确的时候更新它!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38817065

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档