apache/hadoop · error · RuntimeException
Compression ratio should be in the range [0.07,0.68]. Config
Error message
Compression ratio should be in the range [0.07,0.68]. Configured compression ratio is {}. What it means
Error "Compression ratio should be in the range [0.07,0.68]. Configured compression ratio is {}." thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/CompressionEmulationUtil.java:258
map.put(.65F,1355);
map.put(.66F,1510);
map.put(.67F,1805);
map.put(.68F,2170);
}
/**
* Returns the size of the word in {@link RandomTextDataGenerator}'s
* dictionary that can generate text with the desired compression ratio.
*
* @throws RuntimeException If ratio is less than {@value #MIN_RATIO} or
* greater than {@value #MAX_RATIO}.
*/
int getWordSizeForRatio(float ratio) {
ratio = standardizeCompressionRatio(ratio);
if (ratio >= MIN_RATIO && ratio <= MAX_RATIO) {
return map.get(ratio);
} else {
throw new RuntimeException("Compression ratio should be in the range ["
+ MIN_RATIO + "," + MAX_RATIO + "]. Configured compression ratio is "
+ ratio + ".");
}
}
}
/**
* Setup the data generator's configuration to generate compressible random
* text data with the desired compression ratio.
* Note that the compression ratio, if configured, will set the
* {@link RandomTextDataGenerator}'s list-size and word-size based on
* empirical values using the compression ratio set in the configuration.
*
* Hence to achieve the desired compression ratio,
* {@link RandomTextDataGenerator}'s list-size will be set to the default
* value i.e {@value RandomTextDataGenerator#DEFAULT_LIST_SIZE}.
*/
static void setupDataGeneratorConfig(Configuration conf) {View on GitHub (pinned to 2add963021)
Solutions
- Set mapreduce.gridmix.compression-emulation.ratio (compression ratio) to a value within [0.07, 0.68].
When it happens
Trigger: gridmix.compression-emulation.ratio is configured outside the supported range [0.07, 0.68], so Gridmix cannot emulate compression for the generated data.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/833f37ef62946d37.
Report an issue: GitHub.