@InterfaceAudience.Private
  public static ScheduledChore getAuthRenewalChore(final UserGroupInformation user,
    Configuration conf) {
    if (!user.hasKerberosCredentials() || !isAuthRenewalChoreEnabled(conf)) {
      return null;
    }

    Stoppable stoppable = createDummyStoppable();
    // if you're in debug mode this is useful to avoid getting spammed by the getTGT()
    // you can increase this, keeping in mind that the default refresh window is 0.8
    // e.g. 5min tgt * 0.8 = 4min refresh so interval is better be way less than 1min
    final int CHECK_TGT_INTERVAL = 30 * 1000; // 30sec
    return new ScheduledChore("RefreshCredentials", stoppable, CHECK_TGT_INTERVAL) {
      @Override
      protected void chore() {
        try {
          user.checkTGTAndReloginFromKeytab();
        } catch (IOException e) {
          LOG.error("Got exception while trying to refresh credentials: " + e.getMessage(), e);
        }
      }
    };
  }
Checks if security is enabled and if so, launches chore for refreshing kerberos ticket.
@return a ScheduledChore for renewals.
hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java