标签:username nec exist cti 主主 bsp span home des
vim $SPARK_HOME/conf/hive-site.xml
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://chinac244:3306/sparkmetadata?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>Username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>chinac</value>
<description>password to use against metastore database</description>
</property>
scp $SPARK_HOME/conf/hive-site.xml chinac82:$SPARK_HOME/conf/hive-site.xml
scp $SPARK_HOME/conf/hive-site.xml chinac88:$SPARK_HOME/conf/hive-site.xml
5.重启spark集群
[root@chinac88 ~]# ${SPARK_HOME}/sbin/stop-all.sh
[root@chinac88 ~]# nohup ${SPARK_HOME}/sbin/start-all.sh &
[root@chinac27 conf]# spark-sql --master spark://chinac88:7077,chinac82:7077
//1.创建数据表
CREATE TABLE testspark(id INT,name STRING)ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘,‘ LINES TERMINATED BY ‘\n‘;
LOAD DATA LOCAL INPATH ‘/root/software/test‘ OVERWRITE INTO TABLE testspark;
SELECT * FROM testspark;
DROP TABLE testspark;
标签:username nec exist cti 主主 bsp span home des
原文地址:https://www.cnblogs.com/itboys/p/9215594.html