1

5 ノードの Hadoop クラスター (SparkR を使用した Apache Spark を含む) を使用して IBM BigInsights サービスを作成しました。SparkR を使用して cloudant db に接続し、データを取得して処理を実行しようとしています。

BigInsights Hadoop クラスターで、spark-submit を使用した SparkR ジョブ (R スクリプト) の送信が失敗します。SparkR スクリプトを作成し、次のコードを実行しました。

-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 ファイルの内容は次のとおりです。

# 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')

spark-cloudant コネクターを IBM BigInsights にインストールして問題を解決する方法。親切に必要なことをしてください。助けていただければ幸いです。

4

1 に答える 1

0

spark-cloudant コネクタはまだ R 用ではないと思います。

できれば、この回答を更新できることを願っています。

于 2016-08-08T11:10:50.720 に答える