[MDEV-8947] Cassandra connector support for 2.x (idealy 2.2.x) Created: 2015-10-15  Updated: 2017-03-18  Resolved: 2017-02-01

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

Type: Task Priority: Minor
Reporter: Christian Winther Assignee: Sergei Petrunia
Resolution: Won't Fix Votes: 0
Labels: gsoc16

Issue Links:
PartOf
includes MDEV-10129 MS-1 GSoC 2016 Cassandra v2 project Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MDEV-10129 MS-1 GSoC 2016 Cassandra v2 project Technical task Closed Sergei Petrunia  

 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.
 



 Comments   
Comment by Colin Charles [ 2015-10-15 ]

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.

Comment by Christian Winther [ 2015-10-15 ]

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

Comment by Sergei Golubchik [ 2016-03-02 ]

DataStax C++ Driver: https://github.com/datastax/cpp-driver

Comment by Sergei Petrunia [ 2016-05-16 ]

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

Comment by Sergei Petrunia [ 2016-05-31 ]

Link to CQL grammar: https://cassandra.apache.org/doc/cql3/CQL-2.2.html

Comment by Sergei Petrunia [ 2016-05-31 ]

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

Comment by Sergei Petrunia [ 2016-06-01 ]

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

Comment by Sergei Petrunia [ 2017-02-01 ]

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

Comment by Sergei Petrunia [ 2017-03-18 ]

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

Generated at Thu Feb 08 07:30:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.