类org.apache.hadoop.mapreduce.v2.hs.JHSDelegationTokenSecretManager源码实例Demo

下面列出了怎么用org.apache.hadoop.mapreduce.v2.hs.JHSDelegationTokenSecretManager的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: XLearning   文件: JobHistoryServer.java
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);
}
 
 同包方法