org.apache.hadoop.mapreduce.v2.hs.JHSDelegationTokenSecretManager Java Examples

The following examples show how to use org.apache.hadoop.mapreduce.v2.hs.JHSDelegationTokenSecretManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JobHistoryServer.java    From XLearning with Apache License 2.0 5 votes vote down vote up
protected JHSDelegationTokenSecretManager createJHSSecretManager(
    Configuration conf, HistoryServerStateStoreService store) {
  long secretKeyInterval =
      conf.getLong(XLearningConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_KEY,
          XLearningConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT);
  long tokenMaxLifetime =
      conf.getLong(XLearningConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_KEY,
          XLearningConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT);
  long tokenRenewInterval =
      conf.getLong(XLearningConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
          XLearningConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);

  return new JHSDelegationTokenSecretManager(secretKeyInterval,
      tokenMaxLifetime, tokenRenewInterval, 3600000, store);
}