我刚刚下载了对接器映像,以建立一个包含两个工作节点的星火集群。集群已经启动并正在运行,但是我想将scala文件提交到这个集群中。我无法在此启动spark-shell。
当我使用另一个码头映像时,我可以使用spark-shell启动它。请有人解释一下,如果我需要在映像中分别安装scala,还是有不同的启动方式?
更新
下面是错误bash: spark:命令command
bash: spark-shell: command not found
root@a7b0682ff17d:/opt/spark# ls /home/shangupta/Scripts/
ProfileData.json
我正在试着读一张spark-shell的雪花表。为了做到这一点,我做了以下工作。 pyspark --jars spark-snowflake_2.11-2.8.0-spark_2.4.jar,jackson-dataformat-xml-2.10.3.jar
Using Python version 2.7.5 (default, Feb 20 2018 09:19:12)
SparkSession available as 'spark'.
>>> from pyspark import SparkConf, SparkContext
>>&
我正在尝试使用scala从Hive导出数据。但我会跟着错误走。
Caused by: java.lang.ClassNotFoundException:com.databricks.spark.csv.DefaultSource
我的scala脚本如下所示。
import org.apache.spark.sql.hive.HiveContext
val sqlContext = new HiveContext(sc)
val df = sqlContext.sql("SELECT * FROM sparksdata")
df.write.format("com.dat
编辑:见结尾处的编辑
首先,我在Amazon上使用Spark1.5.2,在postgres数据库中使用Amazon。第二,我是一个完全的新手在这个世界的火花,哈多和MapReduce。
本质上,我的问题和这个家伙一样:
因此,加载了dataframe,但是当我尝试计算它时(执行df.show(),其中df是dataframe)会给出错误:
java.sql.SQLException: No suitable driver found for jdbc:postgresql://mypostgres.cvglvlp29krt.eu-west-1.rds.amazonaws.com:5432/my
我一直在尝试使用spark-shell。我所有的数据都在sql中。
I used to include external jars using the --jars flag like /bin/spark-shell --jars /path/to/mysql-connector-java-5.1.23-bin.jar --master spark://sparkmaster.com:7077
I have included it in class path by changing the bin/compute-classpath.sh file
I was runnin
在和之后,在shell下,我尝试了以下代码片段:
sc.stop
val conf = new SparkConf(true)
.set("spark.cassandra.connection.host", "172.21.0.131")
.set("spark.cassandra.auth.username", "adminxx")
.set("spark.cassandra.auth.password", "adminxx")
val sc = new Spa