Repository: cassandra
Updated Branches:
  refs/heads/trunk 34dec4c79 -> faa27d0fc


Added examples for compression and compaction

patch by Jon Haddad; reviewed by Aleksey Yeschenko for CASSANDRA-13822


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/faa27d0f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/faa27d0f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/faa27d0f

Branch: refs/heads/trunk
Commit: faa27d0fc6966ad1b54a57cd814dc62b8ef3c502
Parents: 34dec4c
Author: Jon Haddad <[email protected]>
Authored: Fri Sep 8 12:38:21 2017 -0700
Committer: Jon Haddad <[email protected]>
Committed: Fri Sep 8 13:39:22 2017 -0700

----------------------------------------------------------------------
 doc/source/cql/ddl.rst | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/faa27d0f/doc/source/cql/ddl.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/ddl.rst b/doc/source/cql/ddl.rst
index 756b18e..c17d8c9 100644
--- a/doc/source/cql/ddl.rst
+++ b/doc/source/cql/ddl.rst
@@ -512,7 +512,7 @@ available:
                                            compression. Custom compressor can 
be provided by specifying the full class
                                            name as a “string 
constant”:#constants.
  ``enabled``               true            Enable/disable sstable compression.
- ``chunk_length_in_kb``    64KB            On disk SSTables are compressed by 
block (to allow random reads). This
+ ``chunk_length_in_kb``    64              On disk SSTables are compressed by 
block (to allow random reads). This
                                            defines the size (in KB) of said 
block. Bigger values may improve the
                                            compression rate, but increases the 
minimum size of data to be read from disk
                                            for a read
@@ -524,6 +524,17 @@ available:
                                            instance to check them every other 
read   |
 ========================= =============== 
=============================================================================
 
+
+For instance, to create a table with LZ4Compressor and a chunk_lenth_in_kb of 
4KB::
+
+   CREATE TABLE simple (
+      id int,
+      key text,
+      value text,
+      PRIMARY KEY (key, value)
+   ) with compression = {'class': 'LZ4Compressor', 'chunk_length_in_kb': 4};
+
+
 .. _cql-caching-options:
 
 Caching options
@@ -543,6 +554,17 @@ sub-options are available:
                                     to disable row caching.
 ======================== ========= 
====================================================================================
 
+
+For instance, to create a table with both a key cache and 10 rows per 
partition::
+
+    CREATE TABLE simple (
+    id int,
+    key text,
+    value text,
+    PRIMARY KEY (key, value)
+    ) WITH caching = {'keys': 'ALL', 'rows_per_partition': 10};
+
+
 Other considerations:
 #####################
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to