1

我开始使用我的火花外壳

>>./bin/sparkR --packages com.databricks:spark-csv_2.10:1.2.0

现在我正在尝试在 sparkR shell 中读取 csv

d <- read.df(sqlContext,
    "data/mllib/sample_tree_data.csv","com.databricks.spark.csv", header="true")

但每次我得到一个错误

错误:returnStatus == 0 不是 TRUE

启动 sparkR shell 时的日志如下:

R version 3.0.3 (2014-03-06) -- "Warm Puppy"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Launching java with spark-submit command /opt/spark/bin/spark-submit   "--packages" "com.databricks:spark-csv_2.10:1.2.0" "sparkr-shell" /tmp/RtmpXZM96Y/backend_porte2670057297 
Ivy Default Cache set to: /home/ravimanik/.ivy2/cache
The jars for the packages stored in: /home/ravimanik/.ivy2/jars
:: loading settings :: url = jar:file:/opt/alti-spark-1.4.1.hadoop24.hive13/assembly/target/scala-2.10/spark-assembly-1.4.1-hadoop2.4.1.jar!/org/apache/ivy/core/settings/ivysettings.xml
com.databricks#spark-csv_2.10 added as a dependency
:: resolving dependencies :: org.apache.spark#spark-submit-parent;1.0
    confs: [default]
    found com.databricks#spark-csv_2.10;1.2.0 in central
    found org.apache.commons#commons-csv;1.1 in central
    found com.univocity#univocity-parsers;1.5.1 in central
:: resolution report :: resolve 297ms :: artifacts dl 30ms
    :: modules in use:
    com.databricks#spark-csv_2.10;1.2.0 from central in [default]
    com.univocity#univocity-parsers;1.5.1 from central in [default]
    org.apache.commons#commons-csv;1.1 from central in [default]
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   3   |   0   |   0   |   0   ||   3   |   0   |
    ---------------------------------------------------------------------
:: retrieving :: org.apache.spark#spark-submit-parent
    confs: [default]
    0 artifacts copied, 3 already retrieved (0kB/21ms)

 Welcome to SparkR!
 Spark context is available as sc, SQL context is available as sqlContext
4

1 回答 1

0

我遇到了完全相同的问题。它在我重新启动 R-session 后工作。

于 2016-01-28T03:13:44.363 回答