/** * Returns the minimum update interval for the delegation tokens. * @return The update interval in milliseconds. */ public long getUpdateInterval() { if (updateInterval == null) { // we want to lazily call this (as opposed to in the constructor), because sometimes we use an instance of // TokenSecureStoreRenewer without scheduling updates. For instance, when launching a program or from // ImpersonationHandler. updateInterval = calculateUpdateInterval(); } return updateInterval; }
/** * Returns the minimum update interval for the delegation tokens. * @return The update interval in milliseconds. */ public long getUpdateInterval() { if (updateInterval == null) { // we want to lazily call this (as opposed to in the constructor), because sometimes we use an instance of // TokenSecureStoreRenewer without scheduling updates. For instance, when launching a program or from // ImpersonationHandler. updateInterval = calculateUpdateInterval(); } return updateInterval; }
private long calculateUpdateInterval() { return calculateUpdateInterval(yarnConf, secureExplore); }
private long calculateUpdateInterval() { return calculateUpdateInterval(yarnConf, secureExplore); }
/** * Calculates the secure token update interval based on the given configurations. * * @param cConf the CDAP configuration * @param hConf the YARN configuration * @return time in millisecond that the secure token should be updated */ public static long calculateUpdateInterval(CConfiguration cConf, Configuration hConf) { boolean secureExplore = cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED) && UserGroupInformation.isSecurityEnabled(); return calculateUpdateInterval(hConf, secureExplore); }
/** * Calculates the secure token update interval based on the given configurations. * * @param cConf the CDAP configuration * @param hConf the YARN configuration * @return time in millisecond that the secure token should be updated */ public static long calculateUpdateInterval(CConfiguration cConf, Configuration hConf) { boolean secureExplore = cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED) && UserGroupInformation.isSecurityEnabled(); return calculateUpdateInterval(hConf, secureExplore); }
long interval = (long) ((TokenSecureStoreRenewer.calculateUpdateInterval(cConf, hConf) + 5000) / 0.8); launchConfig.addExtraSystemArgument(SparkRuntimeContextConfig.CREDENTIALS_UPDATE_INTERVAL_MS, Long.toString(interval));
long interval = (long) ((TokenSecureStoreRenewer.calculateUpdateInterval(cConf, hConf) + 5000) / 0.8); launchConfig.addExtraSystemArgument(SparkRuntimeContextConfig.CREDENTIALS_UPDATE_INTERVAL_MS, Long.toString(interval));
long interval = (long) ((TokenSecureStoreRenewer.calculateUpdateInterval(cConf, hConf) + 5000) / 0.8); launchConfig.addExtraSystemArgument(SparkRuntimeContextConfig.CREDENTIALS_UPDATE_INTERVAL_MS, Long.toString(interval));