Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 260475d0f -> 0fdbcc389


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/0fdbcc38
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0fdbcc38
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0fdbcc38

Branch: refs/heads/cassandra-3.11
Commit: 0fdbcc389d83ea5dce40b3ba952c4144ceced795
Parents: 260475d
Author: Jon Haddad <[email protected]>
Authored: Fri Sep 8 12:38:21 2017 -0700
Committer: Jon Haddad <[email protected]>
Committed: Fri Sep 8 13:41:03 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/0fdbcc38/doc/source/cql/ddl.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/ddl.rst b/doc/source/cql/ddl.rst
index 9c1946e..be87a7d 100644
--- a/doc/source/cql/ddl.rst
+++ b/doc/source/cql/ddl.rst
@@ -513,7 +513,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
@@ -525,6 +525,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
@@ -544,6 +555,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