1. Install Hadoop cluster
Reference: http://www.cnblogs.com/wcwen1990/p/6739151.html
2. Installing hive
Reference: http://www.cnblogs.com/wcwen1990/p/6757240.html
3. Installation configuration Spark
Compiling spark:http://www.cnblogs.com/wcwen1990/p/7688027.html
Deployment reference: Http://www.cnblogs.com/wcwen1990/p/6889521.html
4. Spark-sql Integrated Hive
Copy the Hdfs-site.xml, hive-site.xml configuration file to the Spark conf/directory:
$ cp/opt/cdh-5.3.6/hive-0.13.1-cdh5.3.6/conf/hive-site.xml.
$ cp/opt/cdh-5.3.6/hadoop-2.5.0-cdh5.3.6/etc/hadoop/hdfs-site.xml.
5. Start Spark-sql
$ bin/spark-sql--master local[2]
After launch, the hive database can be accessed interactively by the shell client hql.
6. Test:
Spark-sql (default) > show databases;
... ...
Result
Chavin
Default
... ...
Spark-sql (default) > select * from Chavin.dept;
... ...
Deptno Dname Loc
Ten ACCOUNTING NEW YORK
DALLAS
SALES CHICAGO
OPERATIONS BOSTON
Time taken:0.378 seconds, fetched 4 row (s)
... ...
Spark-sql (Spark SQL CLI) client integrated hive