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

CQLSSTableWriter does not add the Keyspace or Tablename as a part of the file name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Not A Problem
    • None
    • Legacy/Tools
    • None
    • Windows 7 64bit

    • Normal

    Description

      When using the CQLSSTableWriter to create sstable files from a CSV the files that it outputs does not have the keyspace or table name as a part of the file name. When I tried to load the files using sstableloader I received the following stack trace.

      $ sstableloader -d localhost datawh/line_items
      Established connection to initial hosts
      Opening sstables and calculating sections to stream
      For input string: “TOC.txt”
      java.lang.NumberFormatException: For input string: “TOC.txt”
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:492)
      at java.lang.Integer.parseInt(Integer.java:527)
      at org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.java:276)
      at org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.java:235)
      at org.apache.cassandra.io.sstable.Component.fromFilename(Component.java:120)
      at org.apache.cassandra.io.sstable.SSTable.tryComponentFromFilename(SSTable.java:160)
      at org.apache.cassandra.io.sstable.SSTableLoader$1.accept(SSTableLoader.java:84)
      at java.io.File.list(File.java:1155)
      at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:78)
      at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:162)
      at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:106)
      

      The files looked like this: la-1-big-Data.db
      They should look like this: datawh-line_items-la-1-Data.db

      Once I changed the filenames the sstableloader worked as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmulligan03 Matthew Mulligan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: