apache/cassandra · error · UnsupportedOperationException

Unknown kind in sstable

Error message

Unknown kind  in sstable 

What it means

While computing per-partition statistics, PartitionStats iterates the Unfiltered rows of each sstable partition. An Unfiltered must be either a Row or a RangeTombstoneMarker; any other kind is impossible by contract, so an UnsupportedOperationException is thrown naming the kind and sstable descriptor — this indicates a corrupt or misread sstable.

Source

Thrown at src/java/org/apache/cassandra/tools/SSTablePartitions.java:684

                    }
                    else
                    {
                        ComplexColumnData complexData = (ComplexColumnData) cd;
                        if (!complexData.complexDeletion().isLive())
                            complexTombstoneCount++;

                        for (Cell<?> cell : complexData)
                            addCell((int) currentTime, liveInfo, cell);
                    }
                }
            }
            else if (unfiltered instanceof RangeTombstoneMarker)
            {
                rangeTombstoneCount++;
            }
            else
            {
                throw new UnsupportedOperationException("Unknown kind " + unfiltered.kind() + " in sstable " + desc.descriptor);
            }
        }

        private void addCell(int currentTime, LivenessInfo liveInfo, Cell<?> cell)
        {
            cellCount++;
            if (cell.isTombstone())
                cellTombstoneCount++;
            if (cell.isExpiring() && (liveInfo.isEmpty() || cell.ttl() != liveInfo.ttl()) && !cell.isLive(currentTime))
                cellTtlExpired++;
        }

        void printPartitionInfo(TableMetadata metadata, boolean partitionsOnly)
        {
            String key = metadata.partitionKeyType.getString(this.key);
            if (partitionsOnly)
                System.out.printf("  Partition: '%s' (%s) %s, size: %s%n",
                                  key,

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Run `nodetool scrub` (or offline sstablescrub) on the table to repair/rebuild the corrupted sstable
  2. Verify the sstable files with sstableverify; replace the corrupted file from a replica or backup
  3. Confirm the tool version matches the sstable format version of the data files
  4. Check disk health (SMART) if corruption recurs
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check sstable integrity where available
// sstableverify keyspace1 users  (run before stats tools)

Try / catch

try { new SSTablePartitions(desc, ...).stats(); }
catch (UnsupportedOperationException e) {
    LOG.error("likely corrupt sstable " + e.getMessage() + " - run scrub/verify", e);
}

Prevention

When it happens

Trigger: Running the sstable partition-stats tool over a corrupted sstable where deserialization yields an Unfiltered whose kind is neither ROW nor RANGE_TOMBSTONE_MARKER (e.g. static-row confusion or bit-flipped kind byte).

Common situations: Bit-rot or hardware corruption in data files; truncated sstable read without checksum catching it; version mismatch reading files written by an incompatible Cassandra version.

Related errors


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