rm12345
rm12345

Reputation: 1229

Cassandra SSTableLoader field is not a column in this metadata

I have recently upgraded to cassandra version 3.3. I have a program that reads a CSV file and generates SSTable files using the CQLSSTableWriter. After generating these SSTable files, I use the SSTableLoader program to stream the files to the cassandra cluster. The program i've written uses the following maven dependencies:

<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>3.3</version>

I've been using Datastax's distribution of cassandra for version 3.3, and bulkloading the SSTables from my machine to the cassandra cluster has worked successfully. However recently i've moved to using another distribution of cassandra called 'Stratio Cassandra' which supports Lucene indexes.

After stratio cassandra was set up on the machine, I tried bulkloading the SSTables to the stratio cassandra cluster (using the sstableloader.bat program from Datastax directory (e.g. C:\Program Files\DataStax-DDC\apache-cassandra\bin)). However I receive the following messages:

flags is not a column defined in this metadata
java.lang.IllegalArgumentException: flags is not a column defined in this metadata
    at com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:272)
    at com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:278)
    at com.datastax.driver.core.ArrayBackedRow.getIndexOf(ArrayBackedRow.java:83)
    at com.datastax.driver.core.AbstractGettableData.getSet(AbstractGettableData.java:217)
    at org.apache.cassandra.utils.NativeSSTableLoaderClient.createTableMetadata(NativeSSTableLoaderClient.java:172)
    at org.apache.cassandra.utils.NativeSSTableLoaderClient.fetchViews(NativeSSTableLoaderClient.java:157)
    at org.apache.cassandra.utils.NativeSSTableLoaderClient.init(NativeSSTableLoaderClient.java:93)
    at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:159)
    at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:103)

My tables and my Java code do not have any reference to a column called 'flags', therefore i do not know why it is producing this error.

Another approach I have taken is to use the sstableloader.bat program from the stratio-cassandra distribution. However I get another error message:

Could not retrieve endpoint ranges: 
InvalidRequestException(why:unconfigured table schema_columnfamilies)
java.lang.RuntimeException: Could not retrieve endpoint ranges: 
    at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:338)
    at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:156)
    at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:106)
Caused by: InvalidRequestException(why:unconfigured table schema_columnfamilies)
    at org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result$execute_cql3_query_resultStandardScheme.read(Cassandra.java:50297)
    at org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result$execute_cql3_query_resultStandardScheme.read(Cassandra.java:50274)
    at org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:50189)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
    at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1734)
    at org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1719)
    at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:317)
    ... 2 more

So in summary, I can bulk load data successfully into Datastax distribution of Cassandra 3.3, however I cannot apply the same process of bulk loading the SSTables to another distribution of cassandra - namely: Stratio.

I've not come across this issue before, and there is limited articles relative to this matter.

I would be grateful if anyone can please point me provide me with any solutions to try or to point me to the right direction on how i could successfully load SSTables to Stratio cassandra.

Many thanks,

Upvotes: 1

Views: 960

Answers (1)

yukim
yukim

Reputation: 641

I don't know about stratio, but there is a bug in CASSANDRA(CASSANDRA-11275) that is fixed recently. If you have materialized view in your schema, then the error happens.

The fix will be released in 3.5 which will be released next month.

Also, the second exception indicates that stratio's Cassandra version is not compatible with Apache Cassandra 3.0+.

There is why:unconfigured table schema_columnfamilies in exception, that is not used in Cassandra 3.0+ anymore. (It is replaced by system_schema.tables.)

Upvotes: 1

Related Questions