Skip to content

Commit

Permalink
[Bug] [connector-hive] Eanble login with kerberos for hive (apache#6893)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: 李鹏程 <[email protected]>
  • Loading branch information
2 people authored and chaorongzhi committed Aug 21, 2024
1 parent de10d81 commit 065d8b5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ private HiveMetaStoreProxy(ReadonlyConfig readonlyConfig) {
hiveConf.addResource(new File(hiveSitePath).toURI().toURL());
}
if (HiveMetaStoreProxyUtils.enableKerberos(readonlyConfig)) {
Configuration hadoopConfig = new Configuration();
hadoopConfig.set("hadoop.security.authentication", "kerberos");
this.hiveMetaStoreClient =
HadoopLoginFactory.loginWithKerberos(
new Configuration(),
hadoopConfig,
readonlyConfig.get(BaseSourceConfigOptions.KRB5_PATH),
readonlyConfig.get(BaseSourceConfigOptions.KERBEROS_PRINCIPAL),
readonlyConfig.get(BaseSourceConfigOptions.KERBEROS_KEYTAB_PATH),
Expand Down

0 comments on commit 065d8b5

Please sign in to comment.