this.connection = createConnection(context);
/** * As of Apache NiFi 1.5.0, due to changes made to * {@link SecurityUtil#loginKerberos(Configuration, String, String)}, which is used by this * class to authenticate a principal with Kerberos, HBase controller services no longer * attempt relogins explicitly. For more information, please read the documentation for * {@link SecurityUtil#loginKerberos(Configuration, String, String)}. * <p/> * In previous versions of NiFi, a {@link org.apache.nifi.hadoop.KerberosTicketRenewer} was started * when the HBase 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/HBase code on a thread that references the same * {@link UserGroupInformation} instance. One of these threads could leave the * {@link javax.security.auth.Subject} in {@link UserGroupInformation} to be cleared or in an unexpected state * while the other thread is attempting to use the {@link javax.security.auth.Subject}, resulting in failed * authentication attempts that would leave the HBase controller service in an unrecoverable state. * * @see SecurityUtil#loginKerberos(Configuration, String, String) */ @OnEnabled public void onEnabled(final ConfigurationContext context) throws InitializationException, IOException, InterruptedException { this.connection = createConnection(context); // connection check if (this.connection != null) { final Admin admin = this.connection.getAdmin(); if (admin != null) { admin.listTableNames(); masterAddress = admin.getClusterStatus().getMaster().getHostAndPort(); } } }