Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4543

Cassandra Storage Engine - Cannot connect to tables with multiple Keys

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.2
    • Fix Version/s: N/A
    • Labels:
    • Environment:
      Linux 10.0.2, [cqlsh 2.3.0 | Cassandra 1.2.4 | CQL spec 3.0.0 | Thrift protocol 19.35.0]

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              psergey Sergei Petrunia added a comment -

              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.

              Show
              psergey Sergei Petrunia added a comment - 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.
              Hide
              psergey Sergei Petrunia added a comment -

              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.
              Show
              psergey Sergei Petrunia added a comment - 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.
              Hide
              psergey Sergei Petrunia added a comment -

              Updated documentation to note the limitations.

              Show
              psergey Sergei Petrunia added a comment - Updated documentation to note the limitations.
              Hide
              jwang james wang added a comment - - edited

              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

              Show
              jwang james wang added a comment - - edited 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
              Hide
              psergey Sergei Petrunia added a comment -

              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.

              Show
              psergey Sergei Petrunia added a comment - 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.
              Hide
              lsucher Lukas Sucher added a comment -

              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

              Show
              lsucher Lukas Sucher added a comment - 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

                People

                • Assignee:
                  psergey Sergei Petrunia
                  Reporter:
                  rwagner Robert Wagner
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: