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

Cassandra connector support for 2.x (idealy 2.2.x)

Details

    Description

      Hi,

      Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

      I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

      I get the following error

      ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions

      with the DDL shown below

      set global cassandra_default_thrift_host='localhost'
       
      create table sessions (  
         id varchar(50) PRIMARY KEY 
      ) engine=cassandra keyspace='sessions' column_family='sessions';

      cqlsh> use sessions ;
      cqlsh:sessions> DESCRIBE KEYSPACE;
       
      CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'}  AND durable_writes = true;
       
      CREATE TABLE sessions.sessions (
          id text PRIMARY KEY,
          client_ip text,
          controller text,
          controller_action text,
          created timestamp,
          data text,
          expires timestamp,
          http_host text,
          modified timestamp,
          request_agent text,
          request_agent_bot boolean,
          request_path text,
          site_id int,
          user_id int
      ) WITH bloom_filter_fp_chance = 0.01
          AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
          AND comment = 'sessions table for bownty apps'
          AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
          AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
          AND dclocal_read_repair_chance = 0.1
          AND default_time_to_live = 0
          AND gc_grace_seconds = 864000
          AND max_index_interval = 2048
          AND memtable_flush_period_in_ms = 0
          AND min_index_interval = 128
          AND read_repair_chance = 0.0
          AND speculative_retry = '99.0PERCENTILE';

      I see the following from thrift

      -> cassandra-cli
      Connected to: "Test Cluster" on 127.0.0.1/9160
      Welcome to Cassandra CLI version 2.1.3
       
      The CLI is deprecated and will be removed in Cassandra 3.0.  Consider migrating to cqlsh.
      CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3
       
      Type 'help;' or '?' for help.
      Type 'quit;' or 'exit;' to quit.
       
      [default@unknown] use sessions;
      Authenticated to keyspace: sessions
      [default@sessions] show schema;
       
      WARNING: CQL3 tables are intentionally omitted from 'show schema' output.
      See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
       

      Attachments

        Issue Links

          Activity

            Jippi Christian Winther created issue -
            Jippi Christian Winther made changes -
            Field Original Value New Value
            Description Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}
            Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}
            Jippi Christian Winther made changes -
            Description Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}
            Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            set global cassandra_default_thrift_host='localhost'

            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}
            Jippi Christian Winther made changes -
            Description Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            set global cassandra_default_thrift_host='localhost'

            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}
            Hi,

            Currently it doesn't seem like mariadb 10.0.x can connect to a cassandra 2.2.x cluster and recognize the column family

            I assume the issue is that cassandra 2.x uses CQL for most things, rather than thrift legacy these days.

            I get the following error

            {code}
            ERROR 1429 (HY000): Unable to connect to foreign data source: Column family sessions not found in keyspace sessions
            {code}

            with the DDL shown below

            {code}
            set global cassandra_default_thrift_host='localhost'

            create table sessions (
               id varchar(50) PRIMARY KEY
            ) engine=cassandra keyspace='sessions' column_family='sessions';
            {code}

            {code}
            cqlsh> use sessions ;
            cqlsh:sessions> DESCRIBE KEYSPACE;

            CREATE KEYSPACE sessions WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;

            CREATE TABLE sessions.sessions (
                id text PRIMARY KEY,
                client_ip text,
                controller text,
                controller_action text,
                created timestamp,
                data text,
                expires timestamp,
                http_host text,
                modified timestamp,
                request_agent text,
                request_agent_bot boolean,
                request_path text,
                site_id int,
                user_id int
            ) WITH bloom_filter_fp_chance = 0.01
                AND caching = '{"keys":"NONE", "rows_per_partition":"NONE"}'
                AND comment = 'sessions table for bownty apps'
                AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'}
                AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
                AND dclocal_read_repair_chance = 0.1
                AND default_time_to_live = 0
                AND gc_grace_seconds = 864000
                AND max_index_interval = 2048
                AND memtable_flush_period_in_ms = 0
                AND min_index_interval = 128
                AND read_repair_chance = 0.0
                AND speculative_retry = '99.0PERCENTILE';
            {code}

            I see the following from thrift

            {code}
            -> cassandra-cli
            Connected to: "Test Cluster" on 127.0.0.1/9160
            Welcome to Cassandra CLI version 2.1.3

            The CLI is deprecated and will be removed in Cassandra 3.0. Consider migrating to cqlsh.
            CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3

            Type 'help;' or '?' for help.
            Type 'quit;' or 'exit;' to quit.

            [default@unknown] use sessions;
            Authenticated to keyspace: sessions
            [default@sessions] show schema;

            WARNING: CQL3 tables are intentionally omitted from 'show schema' output.
            See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

            {code}
            colin Colin Charles added a comment -

            Hi! This is true, we can't support anything above version 1.2 due to the deprecation of the Thrift layer. There is now a stable/GA C++ connector that DataStax provides, and we are wondering if there is a commercial reason to continue development of this going forward. At the moment we've not seen many community contributions around this. Please provide feedback on if this is something that is important to you.

            colin Colin Charles added a comment - Hi! This is true, we can't support anything above version 1.2 due to the deprecation of the Thrift layer. There is now a stable/GA C++ connector that DataStax provides, and we are wondering if there is a commercial reason to continue development of this going forward. At the moment we've not seen many community contributions around this. Please provide feedback on if this is something that is important to you.
            elenst Elena Stepanova made changes -
            Labels need_feedback

            hi

            for us it would be amazing to include certain cassandra tables in join and selects. Today we duplicate a few TB (and growing really really fast) of data in mysql and cassandra - with the mysql storage being incredible expensive vs cassandra

            being able to use them together in our application would significantly reduce development complexity and our hosting costs

            we basically use the data to exclude selections on our website based on the activity data we mirror between C* and M* - a very simple and fast lookup, but being able to do a NOT IN and hit cassandra from M* would be amazing for us

            Jippi Christian Winther added a comment - hi for us it would be amazing to include certain cassandra tables in join and selects. Today we duplicate a few TB (and growing really really fast) of data in mysql and cassandra - with the mysql storage being incredible expensive vs cassandra being able to use them together in our application would significantly reduce development complexity and our hosting costs we basically use the data to exclude selections on our website based on the activity data we mirror between C* and M* - a very simple and fast lookup, but being able to do a NOT IN and hit cassandra from M* would be amazing for us
            elenst Elena Stepanova made changes -
            Assignee Colin Charles [ colin ]
            elenst Elena Stepanova made changes -
            Labels need_feedback
            serg Sergei Golubchik added a comment - DataStax C++ Driver: https://github.com/datastax/cpp-driver
            serg Sergei Golubchik made changes -
            Labels gsoc16

            Charles Muurmu has created a tree for the task here: https://github.com/charlesmuurmu/server/tree/MDEV-8947

            psergei Sergei Petrunia added a comment - Charles Muurmu has created a tree for the task here: https://github.com/charlesmuurmu/server/tree/MDEV-8947
            charlesm Charles Muurmu made changes -
            psergei Sergei Petrunia made changes -
            Assignee Colin Charles [ colin ] Sergei Petrunia [ psergey ]
            psergei Sergei Petrunia added a comment - Link to CQL grammar: https://cassandra.apache.org/doc/cql3/CQL-2.2.html

            Assigned to me (should actually be assigned to charlesm, but Jira doesn't allow to do that.

            psergei Sergei Petrunia added a comment - Assigned to me (should actually be assigned to charlesm , but Jira doesn't allow to do that.

            Hit https://jira.mariadb.org/browse/MDEV-10162 while trying to compile on OS X.

            psergei Sergei Petrunia added a comment - Hit https://jira.mariadb.org/browse/MDEV-10162 while trying to compile on OS X.

            Changing status to Wont-Fix as there is no work planned on Cassandra-SE currently

            psergei Sergei Petrunia added a comment - Changing status to Wont-Fix as there is no work planned on Cassandra-SE currently
            psergei Sergei Petrunia made changes -
            Fix Version/s N/A [ 14700 ]
            Resolution Won't Fix [ 2 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Labels gsoc16 gsoc16 gsoc17
            serg Sergei Golubchik made changes -
            Affects Version/s 10.0.21 [ 19406 ]
            Issue Type Bug [ 1 ] Task [ 3 ]
            psergei Sergei Petrunia made changes -
            Labels gsoc16 gsoc17 gsoc16

            Considering this task as idea for GSoC 2017. Created a new entry for it, MDEV-12296.

            psergei Sergei Petrunia added a comment - Considering this task as idea for GSoC 2017. Created a new entry for it, MDEV-12296 .
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 72122 ] MariaDB v4 [ 132698 ]

            People

              psergei Sergei Petrunia
              Jippi Christian Winther
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.