{"record":{"id":"6a0de3f57e0b2564","repo":"pinpoint-apm/pinpoint","slug":"unknown-compression-option","errorCode":null,"errorMessage":"Unknown compression option : ","messagePattern":"Unknown compression option : ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/core/command/HbaseSchemaCommandManager.java","lineNumber":71,"sourceCode":"\n    public HbaseSchemaCommandManager(String namespace, String compression, List<TableDescriptor> currentHtds) {\n        this.namespace = StringUtils.defaultIfEmpty(namespace, NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR);\n        this.compressionAlgorithm = getCompressionAlgorithm(compression);\n        for (TableDescriptor htd : filterTablesByNamespace(currentHtds)) {\n            tableCommandMap.put(htd.getTableName(), new ModifyTableCommand(htd, this.compressionAlgorithm));\n        }\n    }\n\n    private Compression.Algorithm getCompressionAlgorithm(String compression) {\n        if (StringUtils.isEmpty(compression)) {\n            return Compression.Algorithm.NONE;\n        }\n        for (Compression.Algorithm compressionAlgorithm : Compression.Algorithm.values()) {\n            if (compressionAlgorithm.getName().equalsIgnoreCase(compression)) {\n                return compressionAlgorithm;\n            }\n        }\n        throw new IllegalArgumentException(\"Unknown compression option : \" + compression);\n    }\n\n    private List<TableDescriptor> filterTablesByNamespace(List<TableDescriptor> htds) {\n        if (CollectionUtils.isEmpty(htds)) {\n            return Collections.emptyList();\n        }\n        List<TableDescriptor> filteredHtds = new ArrayList<>();\n        for (TableDescriptor htd : htds) {\n            TableName tableName = htd.getTableName();\n            String namespace = tableName.getNamespaceAsString();\n            if (this.namespace.equalsIgnoreCase(namespace)) {\n                filteredHtds.add(htd);\n            }\n        }\n        return filteredHtds;\n    }\n\n    public String getNamespace() {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/core/command/HbaseSchemaCommandManager.java#L53-L89","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\ntableChange.getTableConfiguration().setCompression(\"gzip\");\n// after\ntableChange.getTableConfiguration().setCompression(\"GZ\");","handlingStrategy":"validation","validationCode":"private static final Set<String> VALID = Set.of(\"NONE\",\"GZ\",\"SNAPPY\",\"LZ4\",\"LZO\",\"ZSTD\",\"BZIP2\");\nvoid validateCompression(String compression) {\n    if (compression == null || !VALID.contains(compression.trim().toUpperCase(Locale.ROOT))) {\n        throw new IllegalArgumentException(\"Unknown compression: \" + compression);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    Compression.Algorithm alg = Compression.getCompressionAlgorithmByName(compression);\n} catch (IllegalArgumentException e) {\n    logger.error(\"Bad compression option '{}', defaulting to NONE\", compression);\n}","preventionTips":["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."],"tags":["hbase","compression","invalid-enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}