Cassandra-CLI
CREATE COLUMN FAMILY te_ACLEntry WITH comparator=UTF8Type AND column_metadata = [
{column_name:te_ACLEntryId, validation_class:LongType}
{column_name:te_ACLID, validation_class:LongType, index_type: KEYS}
{column_name:te_ACLRight, validation_class:LongType}
{column_name:te_CreationTime, validation_class:LongType}
{column_name:te_EndTime, validation_class:LongType}
{column_name:te_MaxUsage, validation_class:LongType}
{column_name:te_PrincipalID, validation_class:LongType, index_type: KEYS}
{column_name:te_StartTime, validation_class:LongType}
{column_name:te_SystemID, validation_class:LongType, index_type: KEYS}
{column_name:te_UserRight, validation_class:LongType}
{column_name:te_signature, validation_class:UTF8Type}
];
MariaDB:
CREATE TABLE te_ACLEntry (te_ACLEntryId bigint primary key, te_ACLID bigint, te_ACLRight bigint, te_CreationTime bigint, te_EndTime bigint, te_MaxUsage bigint, te_PrincipalID bigint, te_StartTime bigint, te_SystemID bigint, te_UserRight bigint, te_signature varchar(100) ) engine=cassandra keyspace='eruces_keys' column_family='te_ACLEntry';
Note - tried several different ways to create a link.
[default@eruces_keys] show schema;
WARNING: CQL3 tables are intentionally omitted from 'show schema' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
create keyspace eruces_keys
with placement_strategy = 'SimpleStrategy'
and strategy_options =
{replication_factor : 3}
and durable_writes = true;
use eruces_keys;
create column family te_ACLEntry
with column_type = 'Standard'
and comparator = 'UTF8Type'
and default_validation_class = 'BytesType'
and key_validation_class = 'BytesType'
and read_repair_chance = 0.1
and dclocal_read_repair_chance = 0.0
and populate_io_cache_on_flush = false
and gc_grace = 864000
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and caching = 'KEYS_ONLY'
and column_metadata = [
{column_name : 'te_EndTime',
validation_class : LongType}
,
{column_name : 'te_PrincipalID',
validation_class : LongType,
index_name : 'te_ACLEntry_te_PrincipalID_idx',
index_type : 0}
,
{column_name : 'te_CreationTime',
validation_class : LongType}
,
{column_name : 'te_ACLID',
validation_class : LongType,
index_name : 'te_ACLEntry_te_ACLID_idx',
index_type : 0}
,
{column_name : 'te_ACLRight',
validation_class : LongType}
,
{column_name : 'te_StartTime',
validation_class : LongType}
,
{column_name : 'te_ACLEntryId',
validation_class : LongType}
,
{column_name : 'te_UserRight',
validation_class : LongType}
,
{column_name : 'te_MaxUsage',
validation_class : LongType}
,
{column_name : 'te_SystemID',
validation_class : LongType,
index_name : 'te_ACLEntry_te_SystemID_idx',
index_type : 0}
,
{column_name : 'te_signature',
validation_class : UTF8Type}
]
and compression_options =
{'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'}
;
Please provide both Cassandra column family structure and MariaDB CREATE TABLE.
Thanks.