Apache Spark 介绍


This section including step by step procedures for installing Apache Spark.

Step.1 Prerequisites

$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

Hadoop is optional, refer to http://ksoong.org/hadoop-intro/ Installation.

Step.2 Install

$ tar -xvf $ tar -xvf spark-1.4.0-bin-hadoop2.4.tgz
$ cd spark-1.4.0-bin-hadoop2.4

Step.3 Running the Thrift JDBC/ODBC server

$ ./sbin/start-thriftserver.sh

More details refer to Spark Docs



$ ./bin/beeline
beeline> !connect jdbc:hive2://localhost:10000/default


Connection conn = DriverManager.getConnection("jdbc:hive2://", "hive", "");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("show databases");

If HiveJdbcClient within Maven project, add the following dependency: