I have Hive 0.13 installation and have created custom databases. I have spark 1.1.0 single node cluster built using mvn -hive option.
I want to access tables in this database in spark application using hivecontext. But hivecontext is always reading the local metastore created in spark directory. I have copied the hive-site.xml in spark/conf directory.
Do I need to do any other configuration?
相关问题
- How to maintain order of key-value in DataFrame sa
- Spark on Yarn Container Failure
- In Spark Streaming how to process old data and del
- Filter from Cassandra table by RDD values
- Spark 2.1 cannot write Vector field on CSV
相关文章
- 在hive sql里怎么把"2020-10-26T08:41:19.000Z"这个字符串转换成年月日
- Java写文件至HDFS失败
- Livy Server: return a dataframe as JSON?
- mapreduce count example
- SQL query Frequency Distribution matrix for produc
- Cloudera 5.6: Parquet does not support date. See H
- How to filter rows for a specific aggregate with s
- How to name file when saveAsTextFile in spark?
Step 1: Setup SPARK with latest version....
By executing this you will download some jar files and bydefault it will be added no need to add....
Step 2:
Copy
hive-site.xml
from your Hive cluster to your$SPARK_HOME/conf/dir
and edit the XML file and add these properties to that file which is listed below:Step 3: Download MYSQL JDBC connector and add that to SPARK CLASSPATH. Run this command bin/compute-classpath.sh
and add the below line for the following script.
How to retrieve the data from HIVE to SPARK....
Step 1:
Start all deamons by the following command....
Step 2:
Start hive thrift server 2 by the following command....
Step 3:
Start spark server by the following command....
And finally check whether these are started or not by checking with the following command....
Step 4:
Start the master by the following command....
To stop the master use the below command.....
Step 5:
Open a new terminal....
Start the beeline by the following path....
After it asks for input... Pass the input which is listed below....
After that set the SPARK by the following commands....
Note:set these configurations on a conf file so no need to run always....
After it asks for input.... Pass the Query which you want to retrieve the data.... and open a browser and check in the URL by the following command localhost:8080 You can see the Running Jobs and Completed Jobs in the URL....