私はcassandra SEとMariaDBの相互運用性を実装しようとしています。 cqlsh
では、複合キーを使ってテーブルを作成することができます。私がmariadbで同じことをしようとすると、エラーERROR 1070 (42000): Too many key parts specified; max 1 parts allowed
が出ます。指定されたキーパーツが多すぎます。 max 1 parts canandraエンジンとmariadb
cqlsh:mariadbtest> create table test (test1 int, test2 bigint, test3 varchar, primary key (test1, test2)) with compact STORAGE;
Mariadb
で:
MariaDB [test]> set global cassandra_default_thrift_host='localhost';
MariaDB [test]> create table random (test1 int(5), test2 bigint(5), test3 varchar(20), PRIMARY KEY (test1, test2)) engine=cassandra keyspace='historian' thrift_host='localhost' column_family='test';
ERROR 1070 (42000): Too many key parts specified; max 1 parts allowed
私は私の主キーとして単一のカラムを使用する場合、それはエラーなしで正常に動作します は、ここで私がcqlsh
で使用される私のコードです。複合キーの問題を解決する方法を教えてください。 ご協力いただければ幸いです。
複合パーティションキーを試しましたが、同じエラーが発生しています。はい、私はテーブルのためにそれが必要です。あなたは私に、cassandra SEとMySQLで複合キーを使用する方法の例を教えてください。 – user2782405