I will successfully solve this problem by providing commons-csv-1.2.jar along with the spark-csv package.
Spark-csv seems to use commons-csv, but is not a package with it.
Using the following SPARKR_SUBMIT_ARGS solved the problem (I use --jars, not - packages).
Sys.setenv('SPARKR_SUBMIT_ARGS'='"--jars" "/usr/lib/spark-1.5.1-bin-hadoop2.6/lib/spark-csv_2.11-1.2.0.jar,/usr/lib/spark-1.5.1-bin-hadoop2.6/lib/commons-csv-1.2.jar" "sparkr-shell"')
In fact, a rather obscure mistake
Error in writeJobj(con, object) : invalid jobj 1
More clearly using the R-shell directly from R Studio, and clearly indicate
java.lang.NoClassDefFoundError: org/apache/commons/csv/CSVFormat
The required commons-csv bit can be found here: https://commons.apache.org/proper/commons-csv/download_csv.cgi
source share