Author: eevans
Date: Sat Mar 19 02:14:54 2011
New Revision: 1083130

URL: http://svn.apache.org/viewvc?rev=1083130&view=rev
Log:
update CQL docs to reflect utf8 comparator/validator default

Patch by eevans

Modified:
    cassandra/trunk/doc/cql/CQL.html
    cassandra/trunk/doc/cql/CQL.textile

Modified: cassandra/trunk/doc/cql/CQL.html
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.html?rev=1083130&r1=1083129&r2=1083130&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.html (original)
+++ cassandra/trunk/doc/cql/CQL.html Sat Mar 19 02:14:54 2011
@@ -26,13 +26,13 @@ DELETE [COLUMNS] FROM <COLUMN FAMILY&
 </code></pre><p>Following the column family identifier is an optional <a 
href="#consistency">consistency level specification</a>.</p><h3 
id="deleterows">Specifying Rows</h3><pre><code>UPDATE ... WHERE KEY = keyname1
 UPDATE ... WHERE KEY IN (keyname1, keyname2)
 </code></pre><p>The <code>WHERE</code> clause is used to determine which 
row(s) a <code>DELETE</code> applies to.  The first form allows the 
specification of a single keyname using the <code>KEY</code> keyword and the 
<code>=</code> operator.  The second form allows a list of keyname terms to be 
specified using the <code>IN</code> notation and a parenthesized list of 
comma-delimited keyname terms.</p><h2 
id="TRUNCATE">TRUNCATE</h2><p><em>Synopsis:</em></p><pre><code>TRUNCATE 
&lt;COLUMN FAMILY&gt;
-</code></pre><p>Accepts a single argument for the column family name, and 
permanently removes all data from said column family.</p><h2 
id="CREATEKEYSPACE">CREATE 
KEYSPACE</h2><p><em>Synopsis:</em></p><pre><code>CREATE KEYSPACE &lt;NAME&gt; 
WITH replication_factor = &lt;NUM&gt; AND strategy_class = "&lt;STRATEGY&gt;"
+</code></pre><p>Accepts a single argument for the column family name, and 
permanently removes all data from said column family.</p><h2 
id="CREATEKEYSPACE">CREATE 
KEYSPACE</h2><p><em>Synopsis:</em></p><pre><code>CREATE KEYSPACE &lt;NAME&gt; 
WITH replication_factor = &lt;NUM&gt; AND strategy_class = &lt;STRATEGY&gt;
     [AND strategy_options.&lt;OPTION&gt; = &lt;VALUE&gt; [AND 
strategy_options.&lt;OPTION&gt; = &lt;VALUE&gt;]];
-</code></pre><p>The <code>CREATE KEYSPACE</code> statement creates a new 
top-level namespace (aka &#8220;keyspace&#8221;). Valid names are any string 
constructed of alphanumeric characters and underscores, but must begin with a 
letter.  Properties such as replication strategy and count are specified during 
creation using the following accepted keyword 
arguments:</p><table><tr><th>keyword</th><th>required</th><th>description</th></tr><tr><td>replication_factor</td><td>yes</td><td>Numeric
 argument that specifies the number of replicas for this 
keyspace.</td></tr><tr><td>strategy_class</td><td>yes</td><td>Class name to use 
for managing replica placement.  Any of the shipped strategies can be used by 
specifying the class name relative to org.apache.cassandra.locator, others will 
need to be fully-qualified and located on the 
classpath.</td></tr><tr><td>strategy_options</td><td>no</td><td>Some strategies 
require additional arguments which can be supplied by appending the option na
 me to the <code>strategy_options</code> keyword, separated by a colon 
(<code>:</code>).  For example, a strategy option of &#8220;DC1&#8221; with a 
value of &#8220;1&#8221; would be specified as <code>strategy_options:DC1 = 
"1"</code>.</td></tr></table><h2 id="CREATECOLUMNFAMILY">CREATE 
COLUMNFAMILY</h2><p><em>Synopsis:</em></p><pre><code>CREATE COLUMNFAMILY 
&lt;COLUMN FAMILY&gt; [(name1 type, name2 type, ...)] [WITH keyword1 = arg1
+</code></pre><p>The <code>CREATE KEYSPACE</code> statement creates a new 
top-level namespace (aka &#8220;keyspace&#8221;). Valid names are any string 
constructed of alphanumeric characters and underscores, but must begin with a 
letter.  Properties such as replication strategy and count are specified during 
creation using the following accepted keyword 
arguments:</p><table><tr><th>keyword</th><th>required</th><th>description</th></tr><tr><td>replication_factor</td><td>yes</td><td>Numeric
 argument that specifies the number of replicas for this 
keyspace.</td></tr><tr><td>strategy_class</td><td>yes</td><td>Class name to use 
for managing replica placement.  Any of the shipped strategies can be used by 
specifying the class name relative to org.apache.cassandra.locator, others will 
need to be fully-qualified and located on the 
classpath.</td></tr><tr><td>strategy_options</td><td>no</td><td>Some strategies 
require additional arguments which can be supplied by appending the option na
 me to the <code>strategy_options</code> keyword, separated by a colon 
(<code>:</code>).  For example, a strategy option of &#8220;DC1&#8221; with a 
value of &#8220;1&#8221; would be specified as <code>strategy_options:DC1 = 
1</code>.</td></tr></table><h2 id="CREATECOLUMNFAMILY">CREATE 
COLUMNFAMILY</h2><p><em>Synopsis:</em></p><pre><code>CREATE COLUMNFAMILY 
&lt;COLUMN FAMILY&gt; [(name1 type, name2 type, ...)] [WITH keyword1 = arg1
     [AND keyword2 = arg2 [AND ...]]];
 </code></pre><p><code>CREATE COLUMNFAMILY</code> statements create new column 
family namespaces under the current keyspace. Valid column family names are 
strings of alphanumeric characters and underscores, which begin with a 
letter.</p><h3 id="columntypes">Specifying Column Type 
(optional)</h3><pre><code>CREATE COLUMNFAMILY &lt;COLUMN FAMILY&gt; (name1 
type, name2 type) ...;
 </code></pre><p>It is possible to assign columns a type during column family 
creation.  Columns configured with a type are validated accordingly when a 
write occurs. Column types are specified as a parenthesized, comma-separated 
list of column term and type pairs.  The list of recognized types 
are:</p><table><tr><th>type</th><th>description</th></tr><tr><td>bytes</td><td>Arbitrary
 bytes (no validation)</td></tr><tr><td>ascii</td><td>ASCII character 
string</td></tr><tr><td>utf8</td><td>UTF8 encoded 
string</td></tr><tr><td>timeuuid</td><td>Type 1 
UUID</td></tr><tr><td>uuid</td><td>Type 4 
UUID</td></tr><tr><td>int</td><td>4-byte 
integer</td></tr><tr><td>long</td><td>8-byte long</td></tr></table><p><em>Note: 
In addition to the recognized types listed above, it is also possible to supply 
a string containing the name of a class (a sub-class of 
<code>AbstractType</code>), either fully qualified, or relative to the 
<code>org.apache.cassandra.db.marshal</code> package.</em></p><h3 id
 ="ColumnFamilyOptionsoptional">Column Family Options 
(optional)</h3><pre><code>CREATE COLUMNFAMILY ... WITH keyword1 = arg1 AND 
keyword2 = arg2;
-</code></pre><p>A number of optional keyword arguments can be supplied to 
control the configuration of a new column 
family.</p><table><tr><th>keyword</th><th>default</th><th>description</th></tr><tr><td>comparator</td><td>bytes</td><td>Determines
 sorting and validation of column names. Valid values are identical to the 
types listed in <a href="#columntypes">Specifying Column Type</a> 
above.</td></tr><tr><td>comment</td><td>none</td><td>A free-form, 
human-readable 
comment.</td></tr><tr><td>row_cache_size</td><td>0</td><td>Number of rows whose 
entire contents to cache in 
memory.</td></tr><tr><td>key_cache_size</td><td>200000</td><td>Number of keys 
per SSTable whose locations are kept in memory in &#8220;mostly LRU&#8221; 
order.</td></tr><tr><td>read_repair_chance</td><td>1.0</td><td>The probability 
with which read repairs should be invoked on non-quorum 
reads.</td></tr><tr><td>gc_grace_seconds</td><td>864000</td><td>Time to wait 
before garbage collecting tombstones (deletion m
 arkers).</td></tr><tr><td>default_validation</td><td>bytes</td><td>Determines 
validation of column values. Valid values are identical to the types listed in 
<a href="#columntypes">Specifying Column Type</a> 
above.</td></tr><tr><td>min_compaction_threshold</td><td>4</td><td>Minimum 
number of SSTables needed to start a minor 
compaction.</td></tr><tr><td>max_compaction_threshold</td><td>32</td><td>Maximum
 number of SSTables allowed before a minor compaction is 
forced.</td></tr><tr><td>row_cache_save_period_in_seconds</td><td>0</td><td>Number
 of seconds between saving row 
caches.</td></tr><tr><td>key_cache_save_period_in_seconds</td><td>14400</td><td>Number
 of seconds between saving key 
caches.</td></tr><tr><td>memtable_flush_after_mins</td><td>60</td><td>Maximum 
time to leave a dirty table 
unflushed.</td></tr><tr><td>memtable_throughput_in_mb</td><td>dynamic</td><td>Maximum
 size of the memtable before it is 
flushed.</td></tr><tr><td>memtable_operations_in_millions</td><td>dynam
 ic</td><td>Number of operations in millions before the memtable is 
flushed.</td></tr><tr><td>replicate_on_write</td><td>false</td><td></td></tr></table><h2
 id="CREATEINDEX">CREATE INDEX</h2><p><em>Synopsis:</em></p><pre><code>CREATE 
INDEX [index_name] ON &lt;column_family&gt; (column_name);
+</code></pre><p>A number of optional keyword arguments can be supplied to 
control the configuration of a new column 
family.</p><table><tr><th>keyword</th><th>default</th><th>description</th></tr><tr><td>comparator</td><td>utf8</td><td>Determines
 sorting and validation of column names. Valid values are identical to the 
types listed in <a href="#columntypes">Specifying Column Type</a> 
above.</td></tr><tr><td>comment</td><td>none</td><td>A free-form, 
human-readable 
comment.</td></tr><tr><td>row_cache_size</td><td>0</td><td>Number of rows whose 
entire contents to cache in 
memory.</td></tr><tr><td>key_cache_size</td><td>200000</td><td>Number of keys 
per SSTable whose locations are kept in memory in &#8220;mostly LRU&#8221; 
order.</td></tr><tr><td>read_repair_chance</td><td>1.0</td><td>The probability 
with which read repairs should be invoked on non-quorum 
reads.</td></tr><tr><td>gc_grace_seconds</td><td>864000</td><td>Time to wait 
before garbage collecting tombstones (deletion ma
 rkers).</td></tr><tr><td>default_validation</td><td>utf8</td><td>Determines 
validation of column values. Valid values are identical to the types listed in 
<a href="#columntypes">Specifying Column Type</a> 
above.</td></tr><tr><td>min_compaction_threshold</td><td>4</td><td>Minimum 
number of SSTables needed to start a minor 
compaction.</td></tr><tr><td>max_compaction_threshold</td><td>32</td><td>Maximum
 number of SSTables allowed before a minor compaction is 
forced.</td></tr><tr><td>row_cache_save_period_in_seconds</td><td>0</td><td>Number
 of seconds between saving row 
caches.</td></tr><tr><td>key_cache_save_period_in_seconds</td><td>14400</td><td>Number
 of seconds between saving key 
caches.</td></tr><tr><td>memtable_flush_after_mins</td><td>60</td><td>Maximum 
time to leave a dirty table 
unflushed.</td></tr><tr><td>memtable_throughput_in_mb</td><td>dynamic</td><td>Maximum
 size of the memtable before it is 
flushed.</td></tr><tr><td>memtable_operations_in_millions</td><td>dynamic
 </td><td>Number of operations in millions before the memtable is 
flushed.</td></tr><tr><td>replicate_on_write</td><td>false</td><td></td></tr></table><h2
 id="CREATEINDEX">CREATE INDEX</h2><p><em>Synopsis:</em></p><pre><code>CREATE 
INDEX [index_name] ON &lt;column_family&gt; (column_name);
 </code></pre><p>A <code>CREATE INDEX</code> statement is used to create a new, 
automatic secondary index for the named column.</p><h2 
id="DROP">DROP</h2><p><em>Synopsis:</em></p><pre><code>DROP 
&lt;KEYSPACE|COLUMNFAMILY&gt; namespace;
 </code></pre><p><code>DROP</code> statements result in the immediate, 
irreversible removal of keyspace and column family namespaces.</p><h2 
id="CommonIdioms">Common Idioms</h2><h3 id="consistency">Specifying 
Consistency</h3><pre><code>... USING &lt;CONSISTENCY&gt; ...
 </code></pre><p>Consistency level specifications are made up the keyword 
<code>USING</code>, followed by a consistency level identifier. Valid 
consistency levels are as follows:</p><ul><li><code>CONSISTENCY 
ZERO</code></li><li><code>CONSISTENCY ONE</code> 
(default)</li><li><code>CONSISTENCY QUORUM</code></li><li><code>CONSISTENCY 
ALL</code></li><li><code>CONSISTENCY DCQUORUM</code></li><li><code>CONSISTENCY 
DCQUORUMSYNC</code></li></ul><h3 id="terms">Term specification</h3><p>Terms are 
used in statements to specify things such as keyspaces, column families, 
indexes, column names and values, and keyword arguments.  The rules governing 
term specification are as follows:</p><ul><li>Any single quoted string literal 
(example: <code>'apple'</code>).</li><li>Unquoted alpha-numeric strings that 
begin with a letter (example: <code>carrot</code>).</li><li>Unquoted numeric 
literals (example: <code>100</code>).</li><li>UUID strings in hyphen-delimited 
hex notation (example: <code>1438fc
 5c-4ff6-11e0-b97f-0026c650d722</code>). </li></ul><p>Terms which do not 
conform to these rules result in an exception.</p><p>How column name/value 
terms are interpreted is determined by the configured 
type.</p><table><tr><th>type</th><th>term</th></tr><tr><td>ascii</td><td>Any 
string which can be decoded using ASCII 
charset</td></tr><tr><td>utf8</td><td>Any string which can be decoded using 
UTF8 charset</td></tr><tr><td>uuid</td><td>Standard UUID string format 
(hyphen-delimited hex notation)</td></tr><tr><td>timeuuid</td><td>Standard UUID 
string format (hyphen-delimited hex 
notation)</td></tr><tr><td>timeuuid</td><td>The string <code>now</code>, to 
represent a type-1 (time-based) UUID with a date-time component based on the 
current time</td></tr><tr><td>timeuuid</td><td>Numeric value representing 
milliseconds since epoch</td></tr><tr><td>timeuuid</td><td>An <a 
href="http://en.wikipedia.org/wiki/8601";>iso8601 
timestamp</a></td></tr><tr><td>long</td><td>Numeric value capable o
 f fitting in 8 bytes</td></tr><tr><td>int</td><td>Numeric value of arbitrary 
size</td></tr><tr><td>bytes</td><td>Hex-encoded strings (converted directly to 
the corresponding bytes)</td></tr></table></body></html>
\ No newline at end of file

Modified: cassandra/trunk/doc/cql/CQL.textile
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.textile?rev=1083130&r1=1083129&r2=1083130&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.textile (original)
+++ cassandra/trunk/doc/cql/CQL.textile Sat Mar 19 02:14:54 2011
@@ -211,13 +211,13 @@ CREATE COLUMNFAMILY ... WITH keyword1 = 
 A number of optional keyword arguments can be supplied to control the 
configuration of a new column family.
 
 |_. keyword|_. default|_. description|
-|comparator|bytes|Determines sorting and validation of column names. Valid 
values are identical to the types listed in "Specifying Column 
Type":#columntypes above.|
+|comparator|utf8|Determines sorting and validation of column names. Valid 
values are identical to the types listed in "Specifying Column 
Type":#columntypes above.|
 |comment|none|A free-form, human-readable comment.|
 |row_cache_size|0|Number of rows whose entire contents to cache in memory.|
 |key_cache_size|200000|Number of keys per SSTable whose locations are kept in 
memory in "mostly LRU" order.|
 |read_repair_chance|1.0|The probability with which read repairs should be 
invoked on non-quorum reads.|
 |gc_grace_seconds|864000|Time to wait before garbage collecting tombstones 
(deletion markers).|
-|default_validation|bytes|Determines validation of column values. Valid values 
are identical to the types listed in "Specifying Column Type":#columntypes 
above.|
+|default_validation|utf8|Determines validation of column values. Valid values 
are identical to the types listed in "Specifying Column Type":#columntypes 
above.|
 |min_compaction_threshold|4|Minimum number of SSTables needed to start a minor 
compaction.|
 |max_compaction_threshold|32|Maximum number of SSTables allowed before a minor 
compaction is forced.|
 |row_cache_save_period_in_seconds|0|Number of seconds between saving row 
caches.|


Reply via email to