Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-19401

Nodetool import expects directory structure

    XMLWordPrintableJSON

Details

    Description

      According to the documentation the nodetool import should not rely on the folder structure of the imported sst files:

      Because the keyspace and table are specified on the command line for nodetool import, there is not the same requirement as with sstableloader, to have the SSTables in a specific directory path. When importing snapshots or incremental backups with nodetool import, the SSTables don’t need to be copied to another directory.

      However when importing old cassandra snapshots, we figured out, that sstables still need to be in a directory called like $KEYSPACE/$TABLENAME files, even when keyspace and table name are already present as parameters for the nodetool import call.

      Call we used:

      nodetool import --copy-data mykeyspace mytable /full_path_to/test1
      

      Log:

      INFO  [RMI TCP Connection(21)-127.0.0.1] 2024-02-15 10:41:06,565 SSTableImporter.java:72 - Loading new SSTables for mykeyspace/mytable: Options{srcPaths='[/full_path_to/test1]', resetLevel=true, clearRepaired=true, verifySSTables=true, verifyTokens=true, invalidateCaches=true, extendedVerify=false, copyData= true}
      INFO  [RMI TCP Connection(21)-127.0.0.1] 2024-02-15 10:41:06,566 SSTableImporter.java:173 - No new SSTables were found for mykeyspace/mytable
      

      However, when we move the sstables (.db-Files) to alternative/mykeyspace/mytable

      and import with

      nodetool import --copy-data mykeyspace mytable /fullpath/alternative/mykeyspace/mytable
      

      the import works

      INFO  [RMI TCP Connection(23)-127.0.0.1] 2024-02-15 10:43:36,093 SSTableImporter.java:177 - Loading new SSTables and building secondary indexes for mykeyspace/mytable: [BigTableReader(path='/mnt/ramdisk/cassandra4/data/mykeyspace/mytable-561a12d0cbe611eead78fbfd293cee40/me-2-big-Data.db'), BigTableReader(path='/mnt/ramdisk/cassandra4/data/mykeyspace/mytable-561a12d0cbe611eead78fbfd293cee40/me-1-big-Data.db')]
      INFO  [RMI TCP Connection(23)-127.0.0.1] 2024-02-15 10:43:36,093 SSTableImporter.java:190 - Done loading load new SSTables for mykeyspace/mytable
      

      We experienced this in Cassandra 4.1.3 on Java 11 (Linux)

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              nob13 Norbert Schultz
              Stefan Miklosovic
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h