Skip to content

Commit

Permalink
eanble login with kerberos for hive
Browse files Browse the repository at this point in the history
  • Loading branch information
李鹏程 committed May 23, 2024
1 parent c3ac953 commit 166c226
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,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 166c226

Please sign in to comment.