public class HiveConfigurator extends Object
| Constructor and Description |
|---|
HiveConfigurator() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.security.UserGroupInformation |
authenticate(org.apache.hadoop.conf.Configuration hiveConfig,
KerberosUser kerberosUser)
|
org.apache.hadoop.security.UserGroupInformation |
authenticate(org.apache.hadoop.conf.Configuration hiveConfig,
String principal,
String keyTab)
Deprecated.
|
org.apache.hadoop.security.UserGroupInformation |
authenticate(org.apache.hadoop.conf.Configuration hiveConfig,
String principal,
String keyTab,
long ticketRenewalPeriod)
Deprecated.
|
org.apache.hadoop.hive.conf.HiveConf |
getConfigurationFromFiles(String configFiles) |
void |
preload(org.apache.hadoop.conf.Configuration configuration) |
Collection<ValidationResult> |
validate(String configFiles,
String principal,
String keyTab,
String password,
AtomicReference<ValidationResources> validationResourceHolder,
ComponentLog log) |
public Collection<ValidationResult> validate(String configFiles, String principal, String keyTab, String password, AtomicReference<ValidationResources> validationResourceHolder, ComponentLog log)
public org.apache.hadoop.hive.conf.HiveConf getConfigurationFromFiles(String configFiles)
public void preload(org.apache.hadoop.conf.Configuration configuration)
public org.apache.hadoop.security.UserGroupInformation authenticate(org.apache.hadoop.conf.Configuration hiveConfig,
KerberosUser kerberosUser)
throws AuthenticationFailedException
hiveConfig - The Configuration to apply to the acquired UserGroupInformationkerberosUser - The KerberosUser to authenticateAuthenticationFailedException - if authentication failsSecurityUtil.getUgiForKerberosUser(Configuration, KerberosUser)@Deprecated public org.apache.hadoop.security.UserGroupInformation authenticate(org.apache.hadoop.conf.Configuration hiveConfig, String principal, String keyTab) throws AuthenticationFailedException
SecurityUtil.getUgiForKerberosUser(Configuration, KerberosUser)SecurityUtil.loginKerberos(Configuration, String, String), which is used by this
class to authenticate a principal with Kerberos, Hive controller services no longer
attempt relogins explicitly. For more information, please read the documentation for
SecurityUtil.loginKerberos(Configuration, String, String).
In previous versions of NiFi, a KerberosTicketRenewer was started by
authenticate(Configuration, String, String, long) when the Hive
controller service was enabled. The use of a separate thread to explicitly relogin could cause race conditions
with the implicit relogin attempts made by hadoop/Hive code on a thread that references the same
UserGroupInformation instance. One of these threads could leave the
Subject in UserGroupInformation to be cleared or in an unexpected state
while the other thread is attempting to use the Subject, resulting in failed
authentication attempts that would leave the Hive controller service in an unrecoverable state.@Deprecated public org.apache.hadoop.security.UserGroupInformation authenticate(org.apache.hadoop.conf.Configuration hiveConfig, String principal, String keyTab, long ticketRenewalPeriod) throws AuthenticationFailedException
authenticate(Configuration, String, String). It will no longer start a
KerberosTicketRenewer to perform explicit relogins.AuthenticationFailedExceptionauthenticate(Configuration, String, String)Copyright © 2023 Apache NiFi Project. All rights reserved.