{"record":{"id":"7876485260efabbf","repo":"apache/cassandra","slug":"unknown-keyspace-table-s-s","errorCode":null,"errorMessage":"Unknown keyspace/table %s.%s","messagePattern":"Unknown keyspace/table (.+?)\\.(.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/SSTableOfflineRelevel.java","lineNumber":98,"sourceCode":"     */\n    public static void main(String[] args) throws IOException\n    {\n        PrintStream out = System.out;\n        if (args.length < 2)\n        {\n            out.println(\"This command should be run with Cassandra stopped!\");\n            out.println(\"Usage: sstableofflinerelevel [--dry-run] <keyspace> <columnfamily>\");\n            System.exit(1);\n        }\n\n        Util.initDatabaseDescriptor();\n        ClusterMetadataService.initializeForTools(false);\n        boolean dryRun = args[0].equals(\"--dry-run\");\n        String keyspace = args[args.length - 2];\n        String columnfamily = args[args.length - 1];\n\n        if (Schema.instance.getTableMetadata(keyspace, columnfamily) == null)\n            throw new IllegalArgumentException(String.format(\"Unknown keyspace/table %s.%s\",\n                    keyspace,\n                    columnfamily));\n\n        // remove any leftovers in the transaction log\n        Keyspace ks = Keyspace.openWithoutSSTables(keyspace);\n        ColumnFamilyStore cfs = ks.getColumnFamilyStore(columnfamily);\n        if (!LifecycleTransaction.removeUnfinishedLeftovers(cfs))\n        {\n            throw new RuntimeException(String.format(\"Cannot remove temporary or obsoleted files for %s.%s \" +\n                                                     \"due to a problem with transaction log files.\",\n                                                     keyspace, columnfamily));\n        }\n\n        Directories.SSTableLister lister = cfs.getDirectories().sstableLister(Directories.OnTxnErr.THROW).skipTemporary(true);\n        SetMultimap<File, SSTableReader> sstableMultimap = HashMultimap.create();\n        for (Map.Entry<Descriptor, Set<Component>> sstable : lister.list().entrySet())\n        {\n            if (sstable.getKey() != null)","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/SSTableOfflineRelevel.java#L80-L116","documentation":"SSTableOfflineRelevel validates its keyspace/table arguments against the loaded Schema before doing offline releveling. If Schema.instance.getTableMetadata returns null, the pair does not exist on this node and an IllegalArgumentException naming the keyspace and table is thrown.","triggerScenarios":"Running `sstableofflinerelevel [--dry-run] <keyspace> <table>` with a misspelled keyspace or table, or on a node that does not hold that schema (schema not present in the copied data directory).","commonSituations":"Typo'd keyspace/table names; running the tool against a data dir snapshot taken before the table was created; case-sensitivity mistakes (unquoted identifiers are lowercased in CQL); dropping the table earlier but leftover SSTables remain.","solutions":["Verify the exact keyspace and table names (lowercase unless quoted at creation) and re-run","Confirm the table exists in the schema of the data directory being processed (check schema tables or system.log)","Use tabular listing of the data directory to find the actual keyspace/table directories"],"exampleFix":"// before\nsstableofflinerelevel Keyspace1 Users\n// after (CQL identifiers are lowercase by default)\nsstableofflinerelevel keyspace1 users","handlingStrategy":"validation","validationCode":"// verify identifiers exist before invoking\ncqlsh -e \"DESCRIBE KEYSPACE keyspace1\" || exit 1\ncqlsh -e \"DESCRIBE TABLE keyspace1.users\" || exit 1","typeGuard":null,"tryCatchPattern":"try { SSTableOfflineRelevel.main(args); }\ncatch (IllegalArgumentException e) { System.err.println(\"Bad table: \" + e.getMessage()); }","preventionTips":["Use exact (lowercase) identifiers as stored in schema","Confirm the table existed when the data directory snapshot was taken","List the data directory to cross-check keyspace/table folder names"],"tags":["offline-tools","cli","schema","resource-not-found","cassandra"],"backgroundTag":"resource-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}