cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cassandra Wiki] Update of "FAQ" by JonathanEllis
Date Tue, 30 Aug 2011 02:56:56 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "FAQ" page has been changed by JonathanEllis:

add cli_keys

   * [[#ubuntu_hangs|I'm using Ubuntu with JNA, and holy crap weird things keep hanging and
stalling and printing scary tracebacks in dmesg!]]
   * [[#schema_disagreement|What are schema disagreement errors and how do I fix them?]]
   * [[#dropped_messages|Why do I see "... messages dropped.." in the logs?]]
+  * [[#cli_keys|Why does the 0.8 cli not assume keys are strings anymore?]]
@@ -540, +541 @@

  Load shedding is part of the Cassandra architecture, if this is a persistent issue it is
generally a sign of an overloaded node or cluster. 
+ <<Anchor(cli_keys)>>
+ == Why does the 0.8 cli not assume keys are strings anymore? ==
+ Prior to 0.8, there was no type metadata available for row keys, and the cli interface treated
all keys as strings.  This made the cli unusable for the many applications whose rows were
numberic, uuids, or other non-string data.
+ 0.8 added key_validation_class to the !ColumnFamily definition, similarly to the existing
comparator for column names, and column_metadata validation_class for column values.  This
both lets clients know the expected data type, and rejects updates with non-conformant values.
+ To preserve application compatibility, the default key_validation_class is BytesType, i.e.,
"anything goes."  The CLI expects bytes to be provided in hex.
+ If all your keys are of the same type, you should add information to the CF metadata, e.g.,
"update column family <cf> with key_validation_class = 'UTF8Type'".  If you have heterogeneous
keys, you can tell the cli what type to use on case-by-case basis, as in, "assume <cf>
keys as utf8".

View raw message