Reputation: 13426
I am Bulk Loading the data into cassandra using SSTables.I am following https://github.com/SPBTV/csv-to-sstable this.
I created the SSTables by
$ java -jar csv-to-sstable.jar quote /home/arque/table_big.cql /home/arque/Documents/data.csv /home/arque
I am getting an error while I am trying to run following command:
$ sstableloader -d 192.168.0.7 /home/arque/quote/table_big
Error:
Error: Established connection to initial hosts
Opening sstables and calculating sections to stream
Failed to list files in /home/arque/quote/table_big
java.lang.AssertionError
java.lang.RuntimeException: Failed to list files in /home/arque/quote /table_big
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:77)
Upvotes: 0
Views: 562
Reputation: 2134
The error is in the csv-to-sstable tool. Look at this file: https://github.com/SPBTV/csv-to-sstable/blob/master/src/main/java/com/spbtv/cassandra/bulkload/Bulkload.java
You say you only have an issue when Primary key is composite key. That's because the tool expects primary key to be defined on same lane as column. Line 66:
// Primary key defined on the same line as the corresponding column
Pattern pattern = Pattern.compile(".*?(\\w+)\\s+\\w+\\s+PRIMARY KEY.*");
If you change this to suite your needs it should work.
Upvotes: 0