Comments - Cassandra Storage Engine Use Example

10 years, 11 months ago Robert Wagner

If you run:

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

and then try to connect a SQL table, you will get:

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
 
7 years, 9 months ago Nick Ivanov

Because MariaDB uses deprecated thrift driver You have to add a WITH COMPACT STORAGE option to the create columnfamily query:

create columnfamily cf2 (pk varchar, data1 varchar, data2 bigint, PRIMARY KEY (pk ,data1)) WITH COMPACT STORAGE;
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.