Skip to content

Commit 26e433e

Browse files
JackeyLee007李鹏程
andauthored
[Bug] [connector-hive] Eanble login with kerberos for hive (#6893)
--------- Co-authored-by: 李鹏程 <li.pc@topsports.com.cn>
1 parent 045b438 commit 26e433e

File tree

1 file changed

+3
-1
lines changed
  • seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils

1 file changed

+3
-1
lines changed

seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreProxy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ private HiveMetaStoreProxy(ReadonlyConfig readonlyConfig) {
5656
hiveConf.addResource(new File(hiveSitePath).toURI().toURL());
5757
}
5858
if (HiveMetaStoreProxyUtils.enableKerberos(readonlyConfig)) {
59+
Configuration hadoopConfig = new Configuration();
60+
hadoopConfig.set("hadoop.security.authentication", "kerberos");
5961
this.hiveMetaStoreClient =
6062
HadoopLoginFactory.loginWithKerberos(
61-
new Configuration(),
63+
hadoopConfig,
6264
readonlyConfig.get(BaseSourceConfigOptions.KRB5_PATH),
6365
readonlyConfig.get(BaseSourceConfigOptions.KERBEROS_PRINCIPAL),
6466
readonlyConfig.get(BaseSourceConfigOptions.KERBEROS_KEYTAB_PATH),

0 commit comments

Comments
 (0)