You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vg...@apache.org on 2018/06/07 18:09:59 UTC
hive git commit: HIVE-19389: Schematool: For Hive's Information
Schema, use embedded HS2 as default (Vaibhav Gumashta reviewed by Daniel Dai)
Repository: hive
Updated Branches:
refs/heads/branch-3 566a48db4 -> 7899face4
HIVE-19389: Schematool: For Hive's Information Schema, use embedded HS2 as default (Vaibhav Gumashta reviewed by Daniel Dai)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/7899face
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/7899face
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/7899face
Branch: refs/heads/branch-3
Commit: 7899face415f66cff0c44eab1ac908aa255ff501
Parents: 566a48d
Author: Vaibhav Gumashta <vg...@hortonworks.com>
Authored: Wed May 9 12:23:10 2018 -0700
Committer: Vaibhav Gumashta <vg...@hortonworks.com>
Committed: Thu Jun 7 11:09:52 2018 -0700
----------------------------------------------------------------------
beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java | 7 +++++++
.../apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java | 3 +++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/7899face/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
index 314dff8..262eaa2 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -108,6 +108,13 @@ public class HiveSchemaTool {
this.needsQuotedIdentifier = parser.needsQuotedIdentifier();
this.quoteCharacter = parser.getQuoteCharacter();
this.metaStoreSchemaInfo = MetaStoreSchemaInfoFactory.get(hiveConf, hiveHome, dbType);
+ // If the dbType is "hive", this is setting up the information schema in Hive.
+ // We will set the default jdbc url and driver.
+ // It is overriden by command line options if passed (-url and -driver
+ if (dbType.equalsIgnoreCase(HiveSchemaHelper.DB_HIVE)) {
+ url = HiveSchemaHelper.EMBEDDED_HS2_URL;
+ driver = HiveSchemaHelper.HIVE_JDBC_DRIVER;
+ }
}
public HiveConf getHiveConf() {
http://git-wip-us.apache.org/repos/asf/hive/blob/7899face/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java
index 785978b..70746e8 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/tools/HiveSchemaHelper.java
@@ -44,6 +44,9 @@ public class HiveSchemaHelper {
public static final String DB_MYSQL = "mysql";
public static final String DB_POSTGRACE = "postgres";
public static final String DB_ORACLE = "oracle";
+ public static final String EMBEDDED_HS2_URL = "jdbc:hive2://";
+ public static final String HIVE_JDBC_DRIVER = "org.apache.hive.jdbc.HiveDriver";
+
/***
* Get JDBC connection to metastore db