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/05/09 20:10:23 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/master 72eff127a -> 8ac625744
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/8ac62574
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/8ac62574
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/8ac62574
Branch: refs/heads/master
Commit: 8ac625744109fde23e105fde3e02f5da894da8d4
Parents: 72eff12
Author: Vaibhav Gumashta <vg...@hortonworks.com>
Authored: Wed May 9 12:23:10 2018 -0700
Committer: Vaibhav Gumashta <vg...@hortonworks.com>
Committed: Wed May 9 12:23:10 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/8ac62574/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 a469cd4..7aad265 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -110,6 +110,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/8ac62574/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