apache/hadoop · error · IllegalArgumentException
The bucket size in the rolling window is not integer: window
Error message
The bucket size in the rolling window is not integer: windowLenMs= {} numBuckets= {} What it means
Error "The bucket size in the rolling window is not integer: windowLenMs= {} numBuckets= {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/top/window/RollingWindow.java:80
*/
Bucket[] buckets;
final int windowLenMs;
final int bucketSize;
/**
* @param windowLenMs The period that is covered by the window. This period must
* be more than the buffering delays.
* @param numBuckets number of buckets in the window
*/
RollingWindow(int windowLenMs, int numBuckets) {
buckets = new Bucket[numBuckets];
for (int i = 0; i < numBuckets; i++) {
buckets[i] = new Bucket();
}
this.windowLenMs = windowLenMs;
this.bucketSize = windowLenMs / numBuckets;
if (this.windowLenMs % numBuckets != 0) {
throw new IllegalArgumentException(
"The bucket size in the rolling window is not integer: windowLenMs= "
+ windowLenMs + " numBuckets= " + numBuckets);
}
}
/**
* When an event occurs at the specified time, this method reflects that in
* the rolling window.
* <p>
*
* @param time the time at which the event occurred
* @param delta the delta that will be added to the window
*/
public void incAt(long time, long delta) {
int bi = computeBucketIndex(time);
Bucket bucket = buckets[bi];
// If the last time the bucket was updated is out of the scope of the
// rolling window, reset the bucket.View on GitHub (pinned to 2add963021)
Solutions
- Choose a rolling window length that divides evenly into the configured number of buckets (windowLenMs % numBuckets == 0).
When it happens
Trigger: The top rolling window is configured with a window length not divisible by the bucket count.
Common situations: Setting dfs.namenode.top.window.num.buckets and window length to incompatible values.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/84a872d8157d628f.
Report an issue: GitHub.