pinpoint-apm/pinpoint · error · IllegalArgumentException
Unknown compression option :
Error message
Unknown compression option :
What it means
HbaseSchemaCommandManager.getCompressionAlgorithm resolves a compression name string to an HBase Compression.Algorithm by case-insensitive name match. If no algorithm matches, it throws IllegalArgumentException listing the unrecognized option.
Solutions
- Correct the compression value in the change set/table configuration to a supported name: NONE, GZ, SNAPPY, LZ4, LZO, ZSTD, BZIP2.
- Confirm the algorithm is available in your HBase runtime (e.g. SNAPPY/LZO need native codecs installed).
- Check for stray whitespace or case issues; matching is case-insensitive but does not trim.
Example fix
// before
tableChange.getTableConfiguration().setCompression("gzip");
// after
tableChange.getTableConfiguration().setCompression("GZ"); Defensive patterns
Strategy: validation
Validate before calling
private static final Set<String> VALID = Set.of("NONE","GZ","SNAPPY","LZ4","LZO","ZSTD","BZIP2");
void validateCompression(String compression) {
if (compression == null || !VALID.contains(compression.trim().toUpperCase(Locale.ROOT))) {
throw new IllegalArgumentException("Unknown compression: " + compression);
}
} Try / catch
try {
Compression.Algorithm alg = Compression.getCompressionAlgorithmByName(compression);
} catch (IllegalArgumentException e) {
logger.error("Bad compression option '{}', defaulting to NONE", compression);
} Prevention
- Use canonical HBase names: NONE, GZ, SNAPPY, LZ4, LZO, ZSTD, BZIP2.
- Trim whitespace from config values before matching.
- Verify native codecs (Snappy/LZO) are installed on the HBase cluster before using them.
When it happens
Trigger: Supplying a table configuration compression value (e.g. from a change set's TableConfiguration) that is not one of HBase's algorithms: NONE, SNAPPY, LZ4, GZ, LZO, ZSTD, BZIP2, etc.
Common situations: Typo in a change set config (e.g. 'snappy ' with whitespace, 'gzip' instead of 'GZ'), using LZO where the HBase installation has no native LZO codec, or a compression name valid on a newer HBase than the one on the classpath.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Already closed
- Cannot add an existing column family :
- Cannot create an existing table :
- Cannot modify a non-existent table :
- ColumnFamily name must not be empty
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/6a0de3f57e0b2564.
Report an issue: GitHub.
Appendix: source
Thrown at hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/core/command/HbaseSchemaCommandManager.java:71
public HbaseSchemaCommandManager(String namespace, String compression, List<TableDescriptor> currentHtds) {
this.namespace = StringUtils.defaultIfEmpty(namespace, NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR);
this.compressionAlgorithm = getCompressionAlgorithm(compression);
for (TableDescriptor htd : filterTablesByNamespace(currentHtds)) {
tableCommandMap.put(htd.getTableName(), new ModifyTableCommand(htd, this.compressionAlgorithm));
}
}
private Compression.Algorithm getCompressionAlgorithm(String compression) {
if (StringUtils.isEmpty(compression)) {
return Compression.Algorithm.NONE;
}
for (Compression.Algorithm compressionAlgorithm : Compression.Algorithm.values()) {
if (compressionAlgorithm.getName().equalsIgnoreCase(compression)) {
return compressionAlgorithm;
}
}
throw new IllegalArgumentException("Unknown compression option : " + compression);
}
private List<TableDescriptor> filterTablesByNamespace(List<TableDescriptor> htds) {
if (CollectionUtils.isEmpty(htds)) {
return Collections.emptyList();
}
List<TableDescriptor> filteredHtds = new ArrayList<>();
for (TableDescriptor htd : htds) {
TableName tableName = htd.getTableName();
String namespace = tableName.getNamespaceAsString();
if (this.namespace.equalsIgnoreCase(namespace)) {
filteredHtds.add(htd);
}
}
return filteredHtds;
}
public String getNamespace() {View on GitHub (pinned to 744c3d3075)