apache/cassandra · error · IllegalArgumentException

Table %s.%s does not exist or does not support dictionary co

Error message

Table %s.%s does not exist or does not support dictionary compression

What it means

During compression-dictionary operations (import/export/list), NodeProbe resolves a per-table CompressionDictionaryManager MBean via JMX. If that lookup fails with InstanceNotFoundException (cause of the wrapped exception), it means the target table has no such MBean — either the table does not exist or it does not use dictionary-capable compression — and an IllegalArgumentException with this formatted message is thrown.

Source

Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2845

    public TabularData listCompressionDictionaries(String keyspace, String table) throws IOException
    {
        return doWithCompressionDictionaryManagerMBean(CompressionDictionaryManagerMBean::listCompressionDictionaries, keyspace, table);
    }

    private <T> T doWithCompressionDictionaryManagerMBean(Function<CompressionDictionaryManagerMBean, T> func,
                                                          String keyspace, String table) throws IOException
    {
        try
        {
            return func.apply(getDictionaryManagerProxy(keyspace, table));
        }
        catch (Exception e)
        {
            if (e.getCause() instanceof InstanceNotFoundException)
            {
                String message = String.format("Table %s.%s does not exist or does not support dictionary compression",
                                               keyspace, table);
                throw new IllegalArgumentException(message);
            }
            else
            {
                throw new IOException(e.getMessage());
            }
        }
    }

    /**
     * Gets the compression dictionary training state for the specified table.
     * Returns an atomic snapshot of training status, progress, and failure details.
     *
     * @param keyspace the keyspace name
     * @param table the table name
     * @return the current training state
     * @throws IOException if there's an error accessing the MBean
     */
    public TrainingState getCompressionDictionaryTrainingState(String keyspace, String table) throws IOException

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Verify the table exists: run `nodetool tablestats` or cqlsh DESCRIBE TABLE keyspace.table.
  2. Confirm the table uses a dictionary-capable compression algorithm (zstd with dictionary support enabled).
  3. Check keyspace/table name casing and spelling (both are case-sensitive if quoted).
  4. Recreate/alter the table with dictionary compression support if needed.

Example fix

// before
nodetool importcompressiondict ks users   // table has no dictionary MBean
// after
ALTER TABLE ks.users WITH compression = {'class': 'org.apache.cassandra.io.compress.ZstdDictionaryCompressor'};
Defensive patterns

Strategy: validation

Validate before calling

// confirm the table exists and supports dictionary compression before invoking
TableMetadata tm = Schema.instance.getTableMetadata(keyspace, table);
if (tm == null) throw new IllegalArgumentException("Table " + keyspace + "." + table + " does not exist");
if (!(tm.params.compression.klass.getSimpleName().startsWith("ZstdDictionary")))
    throw new IllegalArgumentException("Table does not use dictionary-capable compression");

Try / catch

try { probe.importCompressionDictionary(ks, tbl, file); }
catch (IllegalArgumentException e) { log.warn("Table not dictionary-capable: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Running `nodetool <dict-command> <keyspace> <table>` where keyspace/table is misspelled, the table was dropped, or the table's compression settings don't support dictionaries (e.g. zstd dictionary compression not configured).

Common situations: Typo in keyspace/table name; operation against a non-zstd or non-dictionary table; table created before dictionary compression was enabled; case-sensitivity mistakes in keyspace/table names.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/e785c5d3e4877791. Report an issue: GitHub.