[MDEV-4543] Cassandra Storage Engine - Cannot connect to tables with multiple Keys Created: 2013-05-17  Updated: 2015-08-19  Resolved: 2014-04-16

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Cassandra
Affects Version/s: 10.0.2
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Robert Wagner Assignee: Sergei Petrunia
Resolution: Won't Fix Votes: 1
Labels: cassandra
Environment:

Linux 10.0.2, [cqlsh 2.3.0 | Cassandra 1.2.4 | CQL spec 3.0.0 | Thrift protocol 19.35.0]


Issue Links:
Duplicate
duplicates MDEV-6604 Cassandra Storage Engine dealing with... Closed

 Description   

cqlsh> USE mariadbtest2;
cqlsh:mariadbtest2> create columnfamily cf2 ( pk varchar, data1 varchar, data2 bigint, PRIMARY KEY (pk ,data1));

MariaDB [test2]> create table t2 (pk varchar(36) primary key, data1 varchar(60), data2 bigint) engine=cassandra thrift_host='IP_ADDRESS' keyspace='mariadbtest2' column_family='cf2';
ERROR 1429 (HY000): Unable to connect to foreign data source: Column family cf2 not found in keyspace mariadbtest2

Works fine with only one primary key.



 Comments   
Comment by Sergei Petrunia [ 2013-05-18 ]

The observed failure is an intersection of several problems.

Problem#1: Cassandra 1.2.
In Cassandra 1.2, they have slightly changed the data model, as described here http://www.datastax.com/dev/blog/thrift-to-cql3.

This broke, for example, Pig: https://issues.apache.org/jira/browse/CASSANDRA-5234. It broke Cassandra SE, also.

Problem#2: composite primary key. Even with Cassandra 1.1, it was not supported (the error was: ERROR 1070 (42000): Too many key parts specified; max 1 parts allowed). This is because we couldn't figure out how to access it through Thrift API. I've just looked through documentation and found no note of that, it should be fixed.

Comment by Sergei Petrunia [ 2013-05-18 ]

As for fixing problem#1 and problem#2:

  • I am not sure if problem#2 is fixable on its own.
  • It seems, Cassandra 1.2 provides a way to solve problem #1: Cassandra SE should switch from using Thrift to using CQL binary protocol (which was introduced in Cassandra 1.2). That will solve problem #2, allow to support reads through secondary indexes, etc.
Comment by Sergei Petrunia [ 2013-05-18 ]

Updated documentation to note the limitations.

Comment by james wang [ 2014-08-18 ]

Hi Sergei,

Is this issue fixed please? I am using Cassandra 2.0.8 ([cqlsh 4.1.1 | Cassandra 2.0.8 | CQL spec 3.1.1 | Thrift protocol 19.39.0]) and having the same issue with composite key:
ERROR 1070 (42000): Too many key parts specified; max 1 parts allowed

Please shed some light. We tried Mariadb 10.0.11/12/13 and 10.1.0

Thanks a lot in advance
James

Comment by Sergei Petrunia [ 2014-10-01 ]

Hi James,

sorry somehow missed this message before. No, the issue is not fixed. At the moment, there are even no plans to fix it. In order to really fix this, one needs to update Cassandra-SE to work with newer versions of Cassandra (see the first comment to this issue). This not a 100% re-write of the engine, but it's close. It's a significant amount of work. At the moment 1) nobody from the community volunteers to do it and 2) MariaDB staff do not see enough interest to justify doing this work ourselves. Until either #1 or #2 changes, nothing will happen.

Comment by Lukas Sucher [ 2015-08-19 ]

Hello,

I would be very interested in this feature.
This would be the perfect feature to use mariadb as interface between a mysql plugin and a cassandra Database.
In my specific use case: Netflow Accounting with pmacct -> MariaDB -> Cassandra

Thanks a lot
Lukas

Generated at Thu Feb 08 06:57:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.