apache/hadoop · error · IllegalArgumentException
Invalid parameter range: {name} = {value} > {max}
Error message
Invalid parameter range: {name} = {value} > {max} What it means
The upper-bound half of IntegerParam.checkRange (IntegerParam.java:33-39): a non-null integer parameter value above the subclass maximum throws this IllegalArgumentException (HTTP 400). Note: no built-in WebHDFS IntegerParam subclass in this repository declares a max (BufferSizeParam and SnapshotDiffIndexParam both pass null), so seeing this message in a stock cluster means a custom IntegerParam subclass, a fork, or a repackaged hadoop-hdfs-client is enforcing an upper limit.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/resources/IntegerParam.java:37
/** Integer parameter. */
abstract class IntegerParam extends Param<Integer, IntegerParam.Domain> {
IntegerParam(final Domain domain, final Integer value,
final Integer min, final Integer max) {
super(domain, value);
checkRange(min, max);
}
private void checkRange(final Integer min, final Integer max) {
if (value == null) {
return;
}
if (min != null && value < min) {
throw new IllegalArgumentException("Invalid parameter range: " + getName()
+ " = " + domain.toString(value) + " < " + domain.toString(min));
}
if (max != null && value > max) {
throw new IllegalArgumentException("Invalid parameter range: " + getName()
+ " = " + domain.toString(value) + " > " + domain.toString(max));
}
}
@Override
public String toString() {
return getName() + "=" + domain.toString(getValue());
}
/** @return the parameter value as a string */
@Override
public String getValueString() {
return domain.toString(getValue());
}
/** The domain of the parameter. */
static final class Domain extends Param.Domain<Integer> {
/** The radix of the number. */View on GitHub (pinned to 2add963021)
Solutions
- Read the error text: it names the parameter and prints the offending value and the max, e.g. 'buffersize = 999999999 > ...'.
- Lower the value to at or below the printed maximum, or omit the parameter to use the server default.
- If this is your own IntegerParam subclass, re-check the max you pass to super(domain, value, min, max) and clamp before constructing.
Example fix
// before (custom subclass) new TtlParam(86_400_000 * 30); // exceeds max=2147483647? no; exceeds custom max // after new TtlParam(Math.min(userTtl, TtlParam.MAX));
Defensive patterns
Strategy: validation
Validate before calling
// for custom IntegerParam subclasses
static int clampToMax(int value, Integer max) {
return max != null && value > max ? max : value;
} Type guard
static boolean withinMax(Integer value, Integer max) { return value == null || max == null || value <= max; } Prevention
- When defining custom IntegerParam subclasses, document the (min, max) pair next to the parameter name.
- Parse the error message for the printed max and enforce it client-side in the same constant.
When it happens
Trigger: Constructing any custom IntegerParam subclass with a max (e.g. new MyParam(value) where MyLimitParam caps at N) and passing value > N; running against a vendor build that added an upper bound to buffersize or snapshotdiffindex.
Common situations: In-house extensions of the WebHDFS parameter framework (e.g. a throttling parameter with an upper bound); vendor distributions with extra parameter validation; tests that directly instantiate IntegerParam subclasses with (domain, value, min, max) tuples.
Related errors
- Invalid parameter range: {name} = {value} < {min}
- Failed to parse "{str}" as a radix-{radix} integer.
- Invalid parameter range: {name} = {value} < {min}
- Invalid parameter range: {name} = {value} > {max}
- Invalid parameter range: {name} = {value} < {min}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/cf87dd91bb22ee5d.
Report an issue: GitHub.