/** * Extract the value for option * {@code yarn.resourcemanager.am.retry-count-window-ms} * and set it on the ApplicationSubmissionContext. Use the default value * if option is not set. * * @param submissionContext * @param map */ public void extractAmRetryCount(ApplicationSubmissionContext submissionContext, Map<String, String> map) { if (map != null) { MapOperations options = new MapOperations("", map); long amRetryCountWindow = options.getOptionLong(ResourceKeys .YARN_RESOURCEMANAGER_AM_RETRY_COUNT_WINDOW_MS, ResourceKeys.DEFAULT_AM_RETRY_COUNT_WINDOW_MS); log.info("Setting {} to {}", ResourceKeys.YARN_RESOURCEMANAGER_AM_RETRY_COUNT_WINDOW_MS, amRetryCountWindow); submissionContext.setAttemptFailuresValidityInterval(amRetryCountWindow); } }
/** * Extract the value for option * {@code yarn.resourcemanager.am.retry-count-window-ms} * and set it on the ApplicationSubmissionContext. Use the default value * if option is not set. * * @param submissionContext * @param map */ public void extractAmRetryCount(ApplicationSubmissionContext submissionContext, Map<String, String> map) { if (map != null) { MapOperations options = new MapOperations("", map); long amRetryCountWindow = options.getOptionLong(ResourceKeys .YARN_RESOURCEMANAGER_AM_RETRY_COUNT_WINDOW_MS, ResourceKeys.DEFAULT_AM_RETRY_COUNT_WINDOW_MS); log.info("Setting {} to {}", ResourceKeys.YARN_RESOURCEMANAGER_AM_RETRY_COUNT_WINDOW_MS, amRetryCountWindow); submissionContext.setAttemptFailuresValidityInterval(amRetryCountWindow); } }