You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pv...@apache.org on 2018/11/27 17:18:46 UTC
hive git commit: HIVE-20971: TestJdbcWithDBTokenStore[*] should both
use MiniHiveKdc.getMiniHS2WithKerbWithRemoteHMSWithKerb (Peter Vary,
reviewed by Vihang Karajgaonkar)
Repository: hive
Updated Branches:
refs/heads/master dffa3a165 -> 56926afc0
HIVE-20971: TestJdbcWithDBTokenStore[*] should both use MiniHiveKdc.getMiniHS2WithKerbWithRemoteHMSWithKerb (Peter Vary, reviewed by Vihang Karajgaonkar)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/56926afc
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/56926afc
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/56926afc
Branch: refs/heads/master
Commit: 56926afc04356e9670d8c6d9e6eb5fbb4e699a16
Parents: dffa3a1
Author: Peter Vary <pv...@cloudera.com>
Authored: Tue Nov 27 18:17:56 2018 +0100
Committer: Peter Vary <pv...@cloudera.com>
Committed: Tue Nov 27 18:17:56 2018 +0100
----------------------------------------------------------------------
.../apache/hive/minikdc/TestJdbcWithDBTokenStore.java | 14 ++++++--------
.../hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java | 9 +++++++--
2 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/56926afc/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
----------------------------------------------------------------------
diff --git a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
index 272c745..7b8ae3b 100644
--- a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
+++ b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStore.java
@@ -51,13 +51,11 @@ public class TestJdbcWithDBTokenStore extends TestJdbcWithMiniKdc{
MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.WAREHOUSE));
System.setProperty(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname,
MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.CONNECT_URL_KEY));
- // Before this patch, the Embedded MetaStore was used here not the one started by the MiniHS2
- // The below 3 lines would change the tests to use the Remote MetaStore, but it will cause a
- // failure. By removing the thrift MetaStore uris, the tests are passing again.
- // I think this is an valid problem here, but not really sure about the
- // tests original intention, so keep everything as it was originally.
-// System.setProperty(HiveConf.ConfVars.METASTOREURIS.varname,
-// MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.THRIFT_URIS));
-// Thread.sleep(2000);
+ System.setProperty(ConfVars.METASTORE_USE_THRIFT_SASL.varname,
+ String.valueOf(MetastoreConf.getBoolVar(hiveConf, MetastoreConf.ConfVars.USE_THRIFT_SASL)));
+ System.setProperty(HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname,
+ MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.KERBEROS_PRINCIPAL));
+ System.setProperty(ConfVars.METASTORE_KERBEROS_KEYTAB_FILE.varname,
+ MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.KERBEROS_KEYTAB_FILE));
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/56926afc/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java
----------------------------------------------------------------------
diff --git a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java
index 5b7fb7e..973714f 100644
--- a/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java
+++ b/itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestJdbcWithDBTokenStoreNoDoAs.java
@@ -41,7 +41,7 @@ public class TestJdbcWithDBTokenStoreNoDoAs extends TestJdbcWithMiniKdc{
HiveConf hiveConf = new HiveConf();
hiveConf.setVar(ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS, "org.apache.hadoop.hive.thrift.DBTokenStore");
hiveConf.setBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS, false);
- miniHS2 = MiniHiveKdc.getMiniHS2WithKerbWithRemoteHMS(miniHiveKdc, hiveConf);
+ miniHS2 = MiniHiveKdc.getMiniHS2WithKerbWithRemoteHMSWithKerb(miniHiveKdc, hiveConf);
miniHS2.start(confOverlay);
String metastorePrincipal = miniHS2.getConfProperty(ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname);
String hs2Principal = miniHS2.getConfProperty(ConfVars.HIVE_SERVER2_KERBEROS_PRINCIPAL.varname);
@@ -53,6 +53,11 @@ public class TestJdbcWithDBTokenStoreNoDoAs extends TestJdbcWithMiniKdc{
MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.CONNECT_URL_KEY));
System.setProperty(HiveConf.ConfVars.METASTOREURIS.varname,
MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.THRIFT_URIS));
- Thread.sleep(2000);
+ System.setProperty(ConfVars.METASTORE_USE_THRIFT_SASL.varname,
+ String.valueOf(MetastoreConf.getBoolVar(hiveConf, MetastoreConf.ConfVars.USE_THRIFT_SASL)));
+ System.setProperty(HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname,
+ MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.KERBEROS_PRINCIPAL));
+ System.setProperty(ConfVars.METASTORE_KERBEROS_KEYTAB_FILE.varname,
+ MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.KERBEROS_KEYTAB_FILE));
}
}
\ No newline at end of file