apache/hadoop · error · IllegalArgumentException
integer range badly formed: {}
Error message
integer range badly formed: {} What it means
Error "integer range badly formed: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java:2185
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
List<Range> ranges = new ArrayList<Range>();
public IntegerRanges() {
}
public IntegerRanges(String newValue) {
StringTokenizer itr = new StringTokenizer(newValue, ",");
while (itr.hasMoreTokens()) {
String rng = itr.nextToken().trim();
String[] parts = rng.split("-", 3);
if (parts.length < 1 || parts.length > 2) {
throw new IllegalArgumentException("integer range badly formed: " +
rng);
}
Range r = new Range();
r.start = convertToInt(parts[0], 0);
if (parts.length == 2) {
r.end = convertToInt(parts[1], Integer.MAX_VALUE);
} else {
r.end = r.start;
}
if (r.start > r.end) {
throw new IllegalArgumentException("IntegerRange from " + r.start +
" to " + r.end + " is invalid");
}
ranges.add(r);
}
}
/**View on GitHub (pinned to 2add963021)
Solutions
- Format the integer range as comma-separated numbers or a-b ranges, e.g. '1,3,5-8'.
Example fix
Set the property to '1024,2048-4096'.
When it happens
Trigger: Raised at runtime when the documented precondition or configuration requirement for this operation is violated.
Common situations: Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/4f810a0c4ba14a1f.
Report an issue: GitHub.