首先是可执行java代码
package lekko.hive;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.log4j.Logger;
public class HiveDemo {
//老版本org.apache.hadoop.hive.jdbc.HiveDriver ,新版本.org.apache.hive.jdbc.HiveDriver,
private static String driverName = "org.apache.hive.jdbc.HiveDriver";
//这里是hive2的配置
private static String url = "jdbc:hive2://master:10000/default";
private static String user = "usr";
private static String password = "password";
private static String sql = "select * from studentinfo";
private static ResultSet res;
private static final Logger log = Logger.getLogger(HiveDemo.class);
public static void main(String[] args) throws Exception {
/* 用来测试链接
Class.forName(driverName);
Connection conn = DriverManager.getConnection(url, user, password);
// org.apache.hive.jdbc.HiveConnection@ebe538
System.out.println( conn );*/
Class.forName(driverName);
Connection conn = DriverManager.getConnection(url, user, password);
System.out.println("connect established");
Statement stmt = null;
try {
conn = getConn();
stmt = conn.createStatement();
/* // 第一步:存在就先删除
String tableName = dropTable(stmt);
// 第二步:不存在就创建
createTable(stmt, tableName);*/
/* // 第三步:查看创建的表
System.out.println("showTables start ...");
showTables(stmt, tableName);
System.out.println("showTables end ...");
// 执行describe table操作
System.out.println("describe table start ...");
describeTables(stmt, tableName);
System.out.println("describe table end ...");*/
/* // 执行load data into table操作
System.out.println("load data into table start ...");
loadData(stmt, tableName);
System.out.println("load data into table end ...");*/
String tableName = "studentinfo";
// 执行 select * query 操作
System.out.println("select * query start ...");
selectData(stmt, tableName);
System.out.println("select * query end ...");
String tableCopyName = "studentinfocopy";
// 第一步:存在就先删除
System.out.println("dropTable start ...");
dropTable(stmt,tableCopyName);
System.out.println("dropTable end ...");
// 第二步:不存在就创建
/* System.out.println("createTable start ...");
createTable(stmt, tableCopyName);
System.out.println("createTable end ...");*/
String localDir="/home/hive/tmp/loadData";
loadDataFromTablesToLocalFile(stmt,localDir,"select * from studentinfo");
// 执行 insert into 操作
/* System.out.println("insert into start ...");
insertIntoData(stmt,tableCopyName,"select * from studentinfo", 1);
System.out.println("insert into end ...");*/
// 执行 regular hive query 统计操作
System.out.println("regular hive query start ...");
countData(stmt, tableName);
System.out.println("regular hive query end ...");
} catch (ClassNotFoundException e) {
e.printStackTrace();
log.error(driverName + " not found!", e);
System.exit(1);
} catch (SQLException e) {
e.printStackTrace();
log.error("Connection error!", e);
System.exit(1);
} finally {
try {
if (stmt != null) {
stmt.close();
stmt = null;
}
if (conn != null) {
conn.close();
conn = null;
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
private static void countData(Statement stmt, String tableName)
throws SQLException {
sql = "select count(1) from " + tableName;
System.out.println("Running:" + sql);
res = stmt.executeQuery(sql);
System.out.println("执行“regular hive query”运行结果:");
while (res.next()) {
System.out.println("count ------>" + res.getString(1));
}
}
/**
* select query
*
* @param stmt
* @param tableName
* @throws SQLException
*/
private static void selectData(Statement stmt, String tableName)
throws SQLException {
sql = "select * from " + tableName;
System.out.println("Running:" + sql);
res = stmt.executeQuery(sql);
System.out.println("执行 select * query 运行结果:");
while (res.next()) {
System.out.println(res.getInt(1) + "\t" + res.getString(2));
}
}
/**
*
* @param stmt
* @param tableName
* @param selectSql insert完后的select语句
* @param insertIntoType 1为insert into 其他为insert overwrite
* @throws SQLException
*/
private static void insertIntoData(Statement stmt, String tableName, String selectSql, int insertIntoType)
throws SQLException {
String insertIntoSql="";
if (insertIntoType == 1) {
insertIntoSql = "insert into table " + tableName+" ";
} else {
insertIntoSql = "insert overwrite table " + tableName+" ";
}
String conbineSql=insertIntoSql+selectSql;
System.out.println("Running:" + conbineSql);
res = stmt.executeQuery(conbineSql);
System.out.println("执行 select * query 运行结果:");
while (res.next()) {
System.out.println(res.getInt(1) + "\t" + res.getString(2));
}
}
/**
* load data from existed file
* @param stmt
* @param localDirectory
* @param selectQuery
* @throws SQLException
*/
private static void loadDataFromTablesToLocalFile(Statement stmt,String localDirectory,String selectQuery)
throws SQLException {
//输出到外面文件夹
sql = "insert overwrite local directory '" +localDirectory+"' row format delimited fields terminated by'\t' " + selectQuery;
System.out.println("Running:" + sql);
stmt.execute(sql);
System.out.println("Running:" + sql +" Completed");
}
/**
* load data from existed file
* @param stmt
* @param tableName
* @throws SQLException
*/
private static void loadData(Statement stmt, String tableName)
throws SQLException {
//目录 ,我的是hive安装的机子的虚拟机的home目录下
String filepath = "user.txt";
sql = "load data local inpath '" + filepath + "' into table "
+ tableName;
System.out.println("Running:" + sql);
stmt.execute(sql);
System.out.println("Running:" + sql +"Completed");
}
/**
* describe table
* @param stmt
* @param tableName
* @throws SQLException
*/
private static void describeTables(Statement stmt, String tableName)
throws SQLException {
sql = "describe " + tableName;
System.out.println("Running:" + sql);
res = stmt.executeQuery(sql);
System.out.println("执行 describe table 运行结果:");
while (res.next()) {
System.out.println(res.getString(1) + "\t" + res.getString(2));
}
}
/**
* show tables
* @param stmt
* @param tableName
* @throws SQLException
*/
private static void showTables(Statement stmt, String tableName)
throws SQLException {
sql = "show tables '" + tableName + "'";
System.out.println("Running:" + sql);
res = stmt.executeQuery(sql);
System.out.println("执行 show tables 运行结果:");
if (res.next()) {
System.out.println(res.getString(1));
}
}
private static void createTable(Statement stmt, String tableName)
throws SQLException {
sql = "create table "
+ tableName
+ " (key int, value string) row format delimited fields terminated by '\t'";
stmt.execute(sql);
}
private static String dropTable(Statement stmt,String tableName) throws SQLException {
// 创建的表名
sql = "drop table " + tableName;
stmt.execute(sql);
System.out.println("Running:" + sql +"Completed");
return tableName;
}
private static Connection getConn() throws ClassNotFoundException,
SQLException {
Class.forName(driverName);
Connection conn = DriverManager.getConnection(url, user, password);
return conn;
}
}
然后是运行后结果
"C:\Program Files\Java\jdk1.8.0_74\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=D:\IDEA\IntelliJ IDEA 15.0.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_74\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_74\jre\lib\rt.jar;D:\hadoopSpark\target\classes;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;C:\Users\Administrator\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-core_2.11\2.0.2\spark-core_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\avro\avro-mapred\1.7.7\avro-mapred-1.7.7-hadoop2.jar;C:\Users\Administrator\.m2\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7.jar;C:\Users\Administrator\.m2\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7-tests.jar;C:\Users\Administrator\.m2\repository\com\twitter\chill_2.11\0.8.0\chill_2.11-0.8.0.jar;C:\Users\Administrator\.m2\repository\com\esotericsoftware\kryo-shaded\3.0.3\kryo-shaded-3.0.3.jar;C:\Users\Administrator\.m2\repository\com\esotericsoftware\minlog\1.3.0\minlog-1.3.0.jar;C:\Users\Administrator\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\Administrator\.m2\repository\com\twitter\chill-java\0.8.0\chill-java-0.8.0.jar;C:\Users\Administrator\.m2\repository\org\apache\xbean\xbean-asm5-shaded\4.4\xbean-asm5-shaded-4.4.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-client\2.2.0\hadoop-client-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-hdfs\2.2.0\hadoop-hdfs-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-app\2.2.0\hadoop-mapreduce-client-app-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-common\2.2.0\hadoop-mapreduce-client-common-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-client\2.2.0\hadoop-yarn-client-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-server-common\2.2.0\hadoop-yarn-server-common-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-shuffle\2.2.0\hadoop-mapreduce-client-shuffle-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-api\2.2.0\hadoop-yarn-api-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-core\2.2.0\hadoop-mapreduce-client-core-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-common\2.2.0\hadoop-yarn-common-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-jobclient\2.2.0\hadoop-mapreduce-client-jobclient-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-network-common_2.11\2.0.2\spark-network-common_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.6.5\jackson-annotations-2.6.5.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-network-shuffle_2.11\2.0.2\spark-network-shuffle_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-unsafe_2.11\2.0.2\spark-unsafe_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\net\java\dev\jets3t\jets3t\0.7.1\jets3t-0.7.1.jar;C:\Users\Administrator\.m2\repository\org\apache\curator\curator-recipes\2.4.0\curator-recipes-2.4.0.jar;C:\Users\Administrator\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-math3\3.4.1\commons-math3-3.4.1.jar;C:\Users\Administrator\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.16\slf4j-api-1.7.16.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jul-to-slf4j\1.7.16\jul-to-slf4j-1.7.16.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.16\jcl-over-slf4j-1.7.16.jar;C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-log4j12\1.7.16\slf4j-log4j12-1.7.16.jar;C:\Users\Administrator\.m2\repository\com\ning\compress-lzf\1.0.3\compress-lzf-1.0.3.jar;C:\Users\Administrator\.m2\repository\org\xerial\snappy\snappy-java\1.1.2.6\snappy-java-1.1.2.6.jar;C:\Users\Administrator\.m2\repository\net\jpountz\lz4\lz4\1.3.0\lz4-1.3.0.jar;C:\Users\Administrator\.m2\repository\org\roaringbitmap\RoaringBitmap\0.5.11\RoaringBitmap-0.5.11.jar;C:\Users\Administrator\.m2\repository\commons-net\commons-net\2.2\commons-net-2.2.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\scala-library\2.11.8\scala-library-2.11.8.jar;C:\Users\Administrator\.m2\repository\org\json4s\json4s-jackson_2.11\3.2.11\json4s-jackson_2.11-3.2.11.jar;C:\Users\Administrator\.m2\repository\org\json4s\json4s-core_2.11\3.2.11\json4s-core_2.11-3.2.11.jar;C:\Users\Administrator\.m2\repository\org\json4s\json4s-ast_2.11\3.2.11\json4s-ast_2.11-3.2.11.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\scalap\2.11.0\scalap-2.11.0.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\scala-compiler\2.11.0\scala-compiler-2.11.0.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\core\jersey-client\2.22.2\jersey-client-2.22.2.jar;C:\Users\Administrator\.m2\repository\javax\ws\rs\javax.ws.rs-api\2.0.1\javax.ws.rs-api-2.0.1.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\hk2-api\2.4.0-b34\hk2-api-2.4.0-b34.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\hk2-utils\2.4.0-b34\hk2-utils-2.4.0-b34.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\external\aopalliance-repackaged\2.4.0-b34\aopalliance-repackaged-2.4.0-b34.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\external\javax.inject\2.4.0-b34\javax.inject-2.4.0-b34.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\hk2-locator\2.4.0-b34\hk2-locator-2.4.0-b34.jar;C:\Users\Administrator\.m2\repository\org\javassist\javassist\3.18.1-GA\javassist-3.18.1-GA.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\core\jersey-common\2.22.2\jersey-common-2.22.2.jar;C:\Users\Administrator\.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\bundles\repackaged\jersey-guava\2.22.2\jersey-guava-2.22.2.jar;C:\Users\Administrator\.m2\repository\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\core\jersey-server\2.22.2\jersey-server-2.22.2.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\media\jersey-media-jaxb\2.22.2\jersey-media-jaxb-2.22.2.jar;C:\Users\Administrator\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet\2.22.2\jersey-container-servlet-2.22.2.jar;C:\Users\Administrator\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.22.2\jersey-container-servlet-core-2.22.2.jar;C:\Users\Administrator\.m2\repository\org\apache\mesos\mesos\0.21.1\mesos-0.21.1-shaded-protobuf.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-all\4.0.29.Final\netty-all-4.0.29.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty\3.8.0.Final\netty-3.8.0.Final.jar;C:\Users\Administrator\.m2\repository\com\clearspring\analytics\stream\2.7.0\stream-2.7.0.jar;C:\Users\Administrator\.m2\repository\io\dropwizard\metrics\metrics-core\3.1.2\metrics-core-3.1.2.jar;C:\Users\Administrator\.m2\repository\io\dropwizard\metrics\metrics-jvm\3.1.2\metrics-jvm-3.1.2.jar;C:\Users\Administrator\.m2\repository\io\dropwizard\metrics\metrics-json\3.1.2\metrics-json-3.1.2.jar;C:\Users\Administrator\.m2\repository\io\dropwizard\metrics\metrics-graphite\3.1.2\metrics-graphite-3.1.2.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.6.5\jackson-databind-2.6.5.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.6.5\jackson-core-2.6.5.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\module\jackson-module-scala_2.11\2.6.5\jackson-module-scala_2.11-2.6.5.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\module\jackson-module-paranamer\2.6.5\jackson-module-paranamer-2.6.5.jar;C:\Users\Administrator\.m2\repository\org\apache\ivy\ivy\2.4.0\ivy-2.4.0.jar;C:\Users\Administrator\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Users\Administrator\.m2\repository\net\razorvine\pyrolite\4.13\pyrolite-4.13.jar;C:\Users\Administrator\.m2\repository\net\sf\py4j\py4j\0.10.3\py4j-0.10.3.jar;C:\Users\Administrator\.m2\repository\org\spark-project\spark\unused\1.0.0\unused-1.0.0.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-sql_2.11\2.0.2\spark-sql_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\com\univocity\univocity-parsers\2.1.1\univocity-parsers-2.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-sketch_2.11\2.0.2\spark-sketch_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-column\1.7.0\parquet-column-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-common\1.7.0\parquet-common-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-encoding\1.7.0\parquet-encoding-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-generator\1.7.0\parquet-generator-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-hadoop\1.7.0\parquet-hadoop-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-format\2.3.0-incubating\parquet-format-2.3.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-jackson\1.7.0\parquet-jackson-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-streaming_2.11\2.0.2\spark-streaming_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-mllib_2.11\2.0.2\spark-mllib_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\scalanlp\breeze_2.11\0.11.2\breeze_2.11-0.11.2.jar;C:\Users\Administrator\.m2\repository\org\scalanlp\breeze-macros_2.11\0.11.2\breeze-macros_2.11-0.11.2.jar;C:\Users\Administrator\.m2\repository\net\sf\opencsv\opencsv\2.3\opencsv-2.3.jar;C:\Users\Administrator\.m2\repository\com\github\rwl\jtransforms\2.4.0\jtransforms-2.4.0.jar;C:\Users\Administrator\.m2\repository\org\spire-math\spire_2.11\0.7.4\spire_2.11-0.7.4.jar;C:\Users\Administrator\.m2\repository\org\spire-math\spire-macros_2.11\0.7.4\spire-macros_2.11-0.7.4.jar;C:\Users\Administrator\.m2\repository\org\jpmml\pmml-model\1.2.15\pmml-model-1.2.15.jar;C:\Users\Administrator\.m2\repository\org\jpmml\pmml-schema\1.2.15\pmml-schema-1.2.15.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-hive_2.11\2.0.2\spark-hive_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\com\twitter\parquet-hadoop-bundle\1.6.0\parquet-hadoop-bundle-1.6.0.jar;C:\Users\Administrator\.m2\repository\org\spark-project\hive\hive-exec\1.2.1.spark2\hive-exec-1.2.1.spark2.jar;C:\Users\Administrator\.m2\repository\javolution\javolution\5.5.1\javolution-5.5.1.jar;C:\Users\Administrator\.m2\repository\log4j\apache-log4j-extras\1.2.17\apache-log4j-extras-1.2.17.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\Administrator\.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\Administrator\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Administrator\.m2\repository\org\antlr\ST4\4.0.4\ST4-4.0.4.jar;C:\Users\Administrator\.m2\repository\com\googlecode\javaewah\JavaEWAH\0.3.2\JavaEWAH-0.3.2.jar;C:\Users\Administrator\.m2\repository\org\iq80\snappy\snappy\0.2\snappy-0.2.jar;C:\Users\Administrator\.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Users\Administrator\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\Administrator\.m2\repository\org\spark-project\hive\hive-metastore\1.2.1.spark2\hive-metastore-1.2.1.spark2.jar;C:\Users\Administrator\.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\apache\derby\derby\10.10.2.0\derby-10.10.2.0.jar;C:\Users\Administrator\.m2\repository\org\datanucleus\datanucleus-api-jdo\3.2.6\datanucleus-api-jdo-3.2.6.jar;C:\Users\Administrator\.m2\repository\org\datanucleus\datanucleus-rdbms\3.2.9\datanucleus-rdbms-3.2.9.jar;C:\Users\Administrator\.m2\repository\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar;C:\Users\Administrator\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\Users\Administrator\.m2\repository\javax\jdo\jdo-api\3.0.1\jdo-api-3.0.1.jar;C:\Users\Administrator\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\avro\avro\1.7.7\avro-1.7.7.jar;C:\Users\Administrator\.m2\repository\com\thoughtworks\paranamer\paranamer\2.3\paranamer-2.3.jar;C:\Users\Administrator\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\Administrator\.m2\repository\org\apache\calcite\calcite-avatica\1.2.0-incubating\calcite-avatica-1.2.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\calcite\calcite-core\1.2.0-incubating\calcite-core-1.2.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\calcite\calcite-linq4j\1.2.0-incubating\calcite-linq4j-1.2.0-incubating.jar;C:\Users\Administrator\.m2\repository\net\hydromatic\eigenbase-properties\1.1.5\eigenbase-properties-1.1.5.jar;C:\Users\Administrator\.m2\repository\org\codehaus\janino\commons-compiler\2.7.6\commons-compiler-2.7.6.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;C:\Users\Administrator\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\Administrator\.m2\repository\joda-time\joda-time\2.9.3\joda-time-2.9.3.jar;C:\Users\Administrator\.m2\repository\org\jodd\jodd-core\3.5.2\jodd-core-3.5.2.jar;C:\Users\Administrator\.m2\repository\org\datanucleus\datanucleus-core\3.2.10\datanucleus-core-3.2.10.jar;C:\Users\Administrator\.m2\repository\org\apache\thrift\libthrift\0.9.2\libthrift-0.9.2.jar;C:\Users\Administrator\.m2\repository\org\apache\thrift\libfb303\0.9.2\libfb303-0.9.2.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-tags_2.11\2.0.2\spark-tags_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\scalatest\scalatest_2.11\2.2.6\scalatest_2.11-2.2.6.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\modules\scala-xml_2.11\1.0.2\scala-xml_2.11-1.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-catalyst_2.11\2.0.2\spark-catalyst_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\scala-reflect\2.11.8\scala-reflect-2.11.8.jar;C:\Users\Administrator\.m2\repository\org\codehaus\janino\janino\2.7.8\janino-2.7.8.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr4-runtime\4.5.3\antlr4-runtime-4.5.3.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-graphx_2.11\2.0.2\spark-graphx_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\com\github\fommil\netlib\core\1.1.2\core-1.1.2.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\f2j\arpack_combined_all\0.1\arpack_combined_all-0.1.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-mllib-local_2.11\2.0.2\spark-mllib-local_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-streaming-kafka_2.11\1.6.3\spark-streaming-kafka_2.11-1.6.3.jar;C:\Users\Administrator\.m2\repository\org\apache\kafka\kafka_2.11\0.8.2.1\kafka_2.11-0.8.2.1.jar;C:\Users\Administrator\.m2\repository\com\yammer\metrics\metrics-core\2.2.0\metrics-core-2.2.0.jar;C:\Users\Administrator\.m2\repository\org\scala-lang\modules\scala-parser-combinators_2.11\1.0.2\scala-parser-combinators_2.11-1.0.2.jar;C:\Users\Administrator\.m2\repository\com\101tec\zkclient\0.3\zkclient-0.3.jar;C:\Users\Administrator\.m2\repository\org\apache\kafka\kafka-clients\0.8.2.1\kafka-clients-0.8.2.1.jar;C:\Users\Administrator\.m2\repository\org\apache\spark\spark-launcher_2.11\2.0.2\spark-launcher_2.11-2.0.2.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-jdbc\2.1.0\hive-jdbc-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-common\2.1.0\hive-common-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-storage-api\2.1.0\hive-storage-api-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-orc\2.1.0\hive-orc-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\eclipse\jetty\aggregate\jetty-all\7.6.0.v20120127\jetty-all-7.6.0.v20120127.jar;C:\Users\Administrator\.m2\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar;C:\Users\Administrator\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar;C:\Users\Administrator\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\geronimo\specs\geronimo-jaspic_1.0_spec\1.0\geronimo-jaspic_1.0_spec-1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\geronimo\specs\geronimo-annotation_1.0_spec\1.1.1\geronimo-annotation_1.0_spec-1.1.1.jar;C:\Users\Administrator\.m2\repository\asm\asm-commons\3.1\asm-commons-3.1.jar;C:\Users\Administrator\.m2\repository\asm\asm-tree\3.1\asm-tree-3.1.jar;C:\Users\Administrator\.m2\repository\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;C:\Users\Administrator\.m2\repository\org\apache\logging\log4j\log4j-1.2-api\2.4.1\log4j-1.2-api-2.4.1.jar;C:\Users\Administrator\.m2\repository\org\apache\logging\log4j\log4j-api\2.4.1\log4j-api-2.4.1.jar;C:\Users\Administrator\.m2\repository\org\apache\logging\log4j\log4j-core\2.4.1\log4j-core-2.4.1.jar;C:\Users\Administrator\.m2\repository\org\apache\logging\log4j\log4j-web\2.4.1\log4j-web-2.4.1.jar;C:\Users\Administrator\.m2\repository\org\apache\logging\log4j\log4j-slf4j-impl\2.4.1\log4j-slf4j-impl-2.4.1.jar;C:\Users\Administrator\.m2\repository\org\apache\ant\ant\1.9.1\ant-1.9.1.jar;C:\Users\Administrator\.m2\repository\org\apache\ant\ant-launcher\1.9.1\ant-launcher-1.9.1.jar;C:\Users\Administrator\.m2\repository\com\github\joshelser\dropwizard-metrics-hadoop-metrics2-reporter\0.1.0\dropwizard-metrics-hadoop-metrics2-reporter-0.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-service\2.1.0\hive-service-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-llap-server\2.1.0\hive-llap-server-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-llap-common\2.1.0\hive-llap-common-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-llap-client\2.1.0\hive-llap-client-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-llap-tez\2.1.0\hive-llap-tez-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\slider\slider-core\0.90.2-incubating\slider-core-0.90.2-incubating.jar;C:\Users\Administrator\.m2\repository\com\beust\jcommander\1.30\jcommander-1.30.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-registry\2.7.1\hadoop-yarn-registry-2.7.1.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;C:\Users\Administrator\.m2\repository\com\google\inject\extensions\guice-servlet\3.0\guice-servlet-3.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-hadoop2-compat\1.1.1\hbase-hadoop2-compat-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-server\1.1.1\hbase-server-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-procedure\1.1.1\hbase-procedure-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-common\1.1.1\hbase-common-1.1.1-tests.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-prefix-tree\1.1.1\hbase-prefix-tree-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\jetty-sslengine\6.1.26\jetty-sslengine-6.1.26.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\jsp-2.1\6.1.14\jsp-2.1-6.1.14.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\jsp-api-2.1\6.1.14\jsp-api-2.1-6.1.14.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\servlet-api-2.5\6.1.14\servlet-api-2.5-6.1.14.jar;C:\Users\Administrator\.m2\repository\com\lmax\disruptor\3.3.0\disruptor-3.3.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-common\1.1.1\hbase-common-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-hadoop-compat\1.1.1\hbase-hadoop-compat-1.1.1.jar;C:\Users\Administrator\.m2\repository\net\sf\jpam\jpam\1.1\jpam-1.1.jar;C:\Users\Administrator\.m2\repository\tomcat\jasper-compiler\5.5.23\jasper-compiler-5.5.23.jar;C:\Users\Administrator\.m2\repository\javax\servlet\jsp-api\2.0\jsp-api-2.0.jar;C:\Users\Administrator\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar;C:\Users\Administrator\.m2\repository\tomcat\jasper-runtime\5.5.23\jasper-runtime-5.5.23.jar;C:\Users\Administrator\.m2\repository\commons-el\commons-el\1.0\commons-el-1.0.jar;C:\Users\Administrator\.m2\repository\org\jamon\jamon-runtime\2.3.1\jamon-runtime-2.3.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-serde\2.1.0\hive-serde-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\parquet\parquet-hadoop-bundle\1.8.1\parquet-hadoop-bundle-1.8.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-metastore\2.1.0\hive-metastore-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-client\1.1.1\hbase-client-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-annotations\1.1.1\hbase-annotations-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\hbase\hbase-protocol\1.1.1\hbase-protocol-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\jruby\jcodings\jcodings\1.0.8\jcodings-1.0.8.jar;C:\Users\Administrator\.m2\repository\org\jruby\joni\joni\2.1.2\joni-2.1.2.jar;C:\Users\Administrator\.m2\repository\com\github\stephenc\findbugs\findbugs-annotations\1.3.9-1\findbugs-annotations-1.3.9-1.jar;C:\Users\Administrator\.m2\repository\org\datanucleus\javax.jdo\3.2.0-m3\javax.jdo-3.2.0-m3.jar;C:\Users\Administrator\.m2\repository\javax\transaction\transaction-api\1.1\transaction-api-1.1.jar;C:\Users\Administrator\.m2\repository\co\cask\tephra\tephra-api\0.6.0\tephra-api-0.6.0.jar;C:\Users\Administrator\.m2\repository\co\cask\tephra\tephra-core\0.6.0\tephra-core-0.6.0.jar;C:\Users\Administrator\.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\Administrator\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\Administrator\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\Administrator\.m2\repository\com\google\inject\extensions\guice-assistedinject\3.0\guice-assistedinject-3.0.jar;C:\Users\Administrator\.m2\repository\it\unimi\dsi\fastutil\6.5.6\fastutil-6.5.6.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-common\0.6.0-incubating\twill-common-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-core\0.6.0-incubating\twill-core-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-api\0.6.0-incubating\twill-api-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-discovery-api\0.6.0-incubating\twill-discovery-api-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-discovery-core\0.6.0-incubating\twill-discovery-core-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\twill\twill-zookeeper\0.6.0-incubating\twill-zookeeper-0.6.0-incubating.jar;C:\Users\Administrator\.m2\repository\co\cask\tephra\tephra-hbase-compat-1.0\0.6.0\tephra-hbase-compat-1.0-0.6.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-shims\2.1.0\hive-shims-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\shims\hive-shims-common\2.1.0\hive-shims-common-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\shims\hive-shims-0.23\2.1.0\hive-shims-0.23-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-server-resourcemanager\2.6.0\hadoop-yarn-server-resourcemanager-2.6.0.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\contribs\jersey-guice\1.9\jersey-guice-1.9.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-server-applicationhistoryservice\2.6.0\hadoop-yarn-server-applicationhistoryservice-2.6.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-yarn-server-web-proxy\2.6.0\hadoop-yarn-server-web-proxy-2.6.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\shims\hive-shims-scheduler\2.1.0\hive-shims-scheduler-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hive\hive-service-rpc\2.1.0\hive-service-rpc-2.1.0.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpcore\4.4\httpcore-4.4.jar;C:\Users\Administrator\.m2\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;C:\Users\Administrator\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;C:\Users\Administrator\.m2\repository\org\apache\curator\curator-framework\2.6.0\curator-framework-2.6.0.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-common\2.7.3\hadoop-common-2.7.3.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-annotations\2.7.3\hadoop-annotations-2.7.3.jar;C:\Program Files\Java\jdk1.8.0_74\lib\tools.jar;C:\Users\Administrator\.m2\repository\com\google\guava\guava\11.0.2\guava-11.0.2.jar;C:\Users\Administrator\.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\Administrator\.m2\repository\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;C:\Users\Administrator\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\Administrator\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\jetty\6.1.26\jetty-6.1.26.jar;C:\Users\Administrator\.m2\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;C:\Users\Administrator\.m2\repository\javax\servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-json\1.9\jersey-json-1.9.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;C:\Users\Administrator\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;C:\Users\Administrator\.m2\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;C:\Users\Administrator\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.8.3\jackson-jaxrs-1.8.3.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-xc\1.8.3\jackson-xc-1.8.3.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-server\1.9\jersey-server-1.9.jar;C:\Users\Administrator\.m2\repository\asm\asm\3.1\asm-3.1.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\Administrator\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Administrator\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;C:\Users\Administrator\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;C:\Users\Administrator\.m2\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;C:\Users\Administrator\.m2\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\Administrator\.m2\repository\org\apache\hadoop\hadoop-auth\2.7.3\hadoop-auth-2.7.3.jar;C:\Users\Administrator\.m2\repository\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;C:\Users\Administrator\.m2\repository\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;C:\Users\Administrator\.m2\repository\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;C:\Users\Administrator\.m2\repository\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;C:\Users\Administrator\.m2\repository\com\jcraft\jsch\0.1.42\jsch-0.1.42.jar;C:\Users\Administrator\.m2\repository\org\apache\curator\curator-client\2.7.1\curator-client-2.7.1.jar;C:\Users\Administrator\.m2\repository\org\apache\htrace\htrace-core\3.1.0-incubating\htrace-core-3.1.0-incubating.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-compress\1.4.1\commons-compress-1.4.1.jar;C:\Users\Administrator\.m2\repository\org\tukaani\xz\1.0\xz-1.0.jar;D:\IDEA\IntelliJ IDEA 15.0.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain lekko.hive.HiveDemo
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Administrator/.m2/repository/org/slf4j/slf4j-log4j12/1.7.16/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Administrator/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.4.1/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.apache.hive.jdbc.Utils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
connect established
select * query start ...
Running:select * from studentinfo
执行 select * query 运行结果:
0 null
0 null
0 null
0 null
1 a
2 b
3 c
100 d
1 a
2 b
3 c
100 d
select * query end ...
dropTable start ...
Running:drop table studentinfocopyCompleted
dropTable end ...
Running:insert overwrite local directory '/home/hive/tmp/loadData' row format delimited fields terminated by' ' select * from studentinfo
Running:insert overwrite local directory '/home/hive/tmp/loadData' row format delimited fields terminated by' ' select * from studentinfo Completed
regular hive query start ...
Running:select count(1) from studentinfo
执行“regular hive query”运行结果:
count ------>12
regular hive query end ...
Process finished with exit code 0
如果只做查询的话,记得将文档数据载入到hive中,这里表名是studentinfo。