Why is metadata being modified from original metadata in the cassandra server

23 views
Skip to first unread message

Anushri Mishra

unread,
Dec 17, 2014, 2:16:48 PM12/17/14
to python-dr...@lists.datastax.com
Hi,

I am using cluster.metadata.keyspaces['testservercookies'].tables['data'].as_cql_query() to get the metadata for a table from a remote cassandra server and then recreate it on local cassandra server using this.My question is that why is it some default conditions not present in the original metadata query and how to avoid it.

So for example:

Original schema query on remote server :

CREATE TABLE data (

  key text,

  column1 text,

  value blob,

  PRIMARY KEY (key, column1)

) WITH COMPACT STORAGE AND

  bloom_filter_fp_chance=0.000744 AND

  caching='ALL' AND

  comment='' AND

  dclocal_read_repair_chance=0.000000 AND

  gc_grace_seconds=864000 AND

  index_interval=128 AND

  read_repair_chance=0.010000 AND

  replicate_on_write='true' AND

  populate_io_cache_on_flush='false' AND

  default_time_to_live=0 AND

  speculative_retry='99.0PERCENTILE' AND

  memtable_flush_period_in_ms=0 AND

  compaction={'sstable_size_in_mb': '256', 'class': 'LeveledCompactionStrategy'} AND

  compression={'chunk_length_kb': '64', 'crc_check_chance': '0.5', 'sstable_compression': 'LZ4Compressor'};

The one which cassandra-driver(for python) returns :

CREATE TABLE testservercookies.data (key text, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC) AND bloom_filter_fp_chance = 0.000744 AND caching = 'ALL' AND comment = '' AND compaction = {'sstable_size_in_mb': '256', 'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'max_threshold': '32'} AND compression = {'chunk_length_kb': '64', 'crc_check_chance': '0.5', 'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND index_interval = 128 AND memtable_flush_period_in_ms = 0 AND populate_io_cache_on_flush = false AND read_repair_chance = 0.01 AND replicate_on_write = true AND speculative_retry = '99.0PERCENTILE'

The above conditions in blue are added which are not present in original query.Can you help?

Thanks,

Anushri 




Adam Holmberg

unread,
Dec 17, 2014, 4:16:05 PM12/17/14
to python-dr...@lists.datastax.com
Are you saying you create the table with the first statement, and the resultant metadata is the second string?

This might be explained by default values, but I'm not sure why min/max threshold would apply for LeveledCompactionStrategy.

What version(s) of Cassandra are you using?

How (in what context) are you generating each of these strings?

Adam


To unsubscribe from this group and stop receiving emails from it, send an email to python-driver-u...@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages