apache/hadoop · error · YarnRuntimeException
Invalid blacklistDisablePercent: {}. Should be an integer be
Error message
Invalid blacklistDisablePercent: {}. Should be an integer between 0 and 100 or -1 to disabled What it means
RMContainerRequestor.serviceInit validates yarn.app.mapreduce.am.job.node-blacklisting.ignore-threshold-node-percent (default 33) and throws YarnRuntimeException when the value is outside [-1, 100]. -1 disables the threshold, 0..100 sets the percentage of blacklisted nodes at which blacklisting is ignored; anything else is meaningless and fails AM initialization immediately.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerRequestor.java:190
return sb.toString();
}
}
@Override
protected void serviceInit(Configuration conf) throws Exception {
super.serviceInit(conf);
nodeBlacklistingEnabled =
conf.getBoolean(MRJobConfig.MR_AM_JOB_NODE_BLACKLISTING_ENABLE, true);
LOG.info("nodeBlacklistingEnabled:" + nodeBlacklistingEnabled);
maxTaskFailuresPerNode =
conf.getInt(MRJobConfig.MAX_TASK_FAILURES_PER_TRACKER, 3);
blacklistDisablePercent =
conf.getInt(
MRJobConfig.MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERECENT,
MRJobConfig.DEFAULT_MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERCENT);
LOG.info("maxTaskFailuresPerNode is " + maxTaskFailuresPerNode);
if (blacklistDisablePercent < -1 || blacklistDisablePercent > 100) {
throw new YarnRuntimeException("Invalid blacklistDisablePercent: "
+ blacklistDisablePercent
+ ". Should be an integer between 0 and 100 or -1 to disabled");
}
LOG.info("blacklistDisablePercent is " + blacklistDisablePercent);
}
protected AllocateResponse makeRemoteRequest() throws YarnException,
IOException {
applyRequestLimits();
ResourceBlacklistRequest blacklistRequest =
ResourceBlacklistRequest.newInstance(new ArrayList<String>(blacklistAdditions),
new ArrayList<String>(blacklistRemovals));
AllocateRequest allocateRequest =
AllocateRequest.newInstance(lastResponseID,
super.getApplicationProgress(), new ArrayList<ResourceRequest>(ask),
new ArrayList<ContainerId>(release), blacklistRequest);
AllocateResponse allocateResponse = scheduler.allocate(allocateRequest);
lastResponseID = allocateResponse.getResponseId();View on GitHub (pinned to 2add963021)
Solutions
- Set the property to -1, 0, or a value in [0,100] — e.g. 33 (default) or -1 to disable the ignore threshold
- If generated programmatically, clamp the computed integer before conf.set
- Check the AM launch log: the exception text echoes the offending value read from config
Example fix
<!-- before --> <property><name>yarn.app.mapreduce.am.job.node-blacklisting.ignore-threshold-node-percent</name><value>150</value></property> <!-- after --> <property><name>yarn.app.mapreduce.am.job.node-blacklisting.ignore-threshold-node-percent</name><value>33</value></property>
Defensive patterns
Strategy: validation
Validate before calling
// clamp/validate before the AM ever sees it
int pct = conf.getInt(
"yarn.app.mapreduce.am.job.node-blacklisting.ignore-threshold-node-percent", 33);
if (pct < -1 || pct > 100) {
throw new IllegalArgumentException("blacklistDisablePercent must be -1 or 0..100, got " + pct);
} Prevention
- Treat this property as an integer percent (or -1), never a fraction or a node count
- Add config linting for AM-tuning keys in CI for generated job configs
When it happens
Trigger: Job/cluster config sets the percent key to e.g. 150 or -2; a conf.set call with a computed value that can go negative; typo like '33%' (NumberFormatException surfaces earlier) or an off-by-one in generated configs.
Common situations: Tuning node-blacklisting behavior from templates that mix up 'percent' and 'count'; automation writing 0-1 fractions (0.33) or >100 values; overriding MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERECENT per job without bounds checking.
Related errors
- Improper queue name : {nameValue}
- Only 1 or 2 algorithm version is supported
- value cannot be blank
- ${value} is not in expected format.Expected format is <numbe
- Bad configuration of hadoop.security.key.provider.path at ${
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c46256d8ccc3fe86.
Report an issue: GitHub.