apache/hadoop · error · IllegalArgumentException
Top limit input should be a positive numeric value
Error message
Top limit input should be a positive numeric value
What it means
Error "Top limit input should be a positive numeric value" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java:529
outputLine = String.format(
"No top limit specified, using default top value %d.",
getDefaultTop());
LOG.info(outputLine);
result.appendln(outputLine);
nodes = getDefaultTop();
} else {
try {
nodes = Integer.parseInt(topVal);
} catch (NumberFormatException nfe) {
outputLine = String.format(
"Top limit input is not numeric, using default top value %d.",
getDefaultTop());
LOG.info(outputLine);
result.appendln(outputLine);
nodes = getDefaultTop();
}
if (nodes <= 0) {
throw new IllegalArgumentException(
"Top limit input should be a positive numeric value");
}
}
return Math.min(nodes, cluster.getNodes().size());
}
/**
* Reads the Physical path of the disks we are balancing. This is needed to
* make the disk balancer human friendly and not used in balancing.
*
* @param node - Disk Balancer Node.
*/
protected void populatePathNames(
DiskBalancerDataNode node) throws IOException {
// if the cluster is a local file system, there is no need to
// invoke rpc call to dataNode.
if (getClusterURI().getScheme().startsWith("file")) {View on GitHub (pinned to 2add963021)
Solutions
- Pass a positive integer for the top limit option.
- Remove the option to use the default top value.
When it happens
Trigger: DiskBalancer top command when the -top limit argument is not a positive number.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/2c85608010a93520.
Report an issue: GitHub.