Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-5766

The output of the describe command does not necessarily give you the right DDL to re-create the CF

    XMLWordPrintableJSON

Details

    • Normal

    Description

      If compression is not set for a CF, cqlsh omits the compression attribute. When you replay that very same DDL, you get a CF with Snappy compression. This may occur with other parameters. Perhaps describe should always show every parameter in full. The absence of a setting is a setting. (Think of the arrow in the FedEx logo).

      Create a CF with cassandra-stress. cassandra-stress defaults to NO compression.

      ~/dse/resources/cassandra/tools/bin/cassandra-stress -S 100 -c 1 --num-keys 1

      describe it
      CREATE TABLE "Standard1" (
      key blob PRIMARY KEY,
      "C0" blob
      ) WITH COMPACT STORAGE AND
      bloom_filter_fp_chance=0.010000 AND
      caching='KEYS_ONLY' AND
      comment='' AND
      dclocal_read_repair_chance=0.000000 AND
      gc_grace_seconds=864000 AND
      read_repair_chance=0.100000 AND
      replicate_on_write='true' AND
      populate_io_cache_on_flush='false' AND
      compaction=

      {'class': 'SizeTieredCompactionStrategy'}

      ;

      replay it - I changed the cf name to standard2

      describe the new CF:

      CREATE TABLE standard2 (
      key blob PRIMARY KEY,
      "C0" blob
      ) WITH COMPACT STORAGE AND
      bloom_filter_fp_chance=0.010000 AND
      caching='KEYS_ONLY' AND
      comment='' AND
      dclocal_read_repair_chance=0.000000 AND
      gc_grace_seconds=864000 AND
      read_repair_chance=0.100000 AND
      replicate_on_write='true' AND
      populate_io_cache_on_flush='false' AND
      compaction=

      {'class': 'SizeTieredCompactionStrategy'}

      AND
      compression=

      {'sstable_compression': 'SnappyCompressor'}

      ;

      Attachments

        1. 5766.txt
          0.8 kB
          Aleksey Yeschenko

        Activity

          People

            aleksey Aleksey Yeschenko
            slowenthal Steven Lowenthal
            Aleksey Yeschenko
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: