cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Trivial Update of "Operations" by ArtieCopeland
Date Mon, 23 Aug 2010 20:55:41 GMT
Dear Wiki user,

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

The "Operations" page has been changed by ArtieCopeland.
The comment on this change is: updated the algorithm to calculate tokens to use the range
of 0..N-1 since they can start with 0.
http://wiki.apache.org/cassandra/Operations?action=diff&rev1=60&rev2=61

--------------------------------------------------

  When the !RandomPartitioner is used, Tokens are integers from 0 to 2**127.  Keys are converted
to this range by MD5 hashing for comparison with Tokens.  (Thus, keys are always convertible
to Tokens, but the reverse is not always true.)
  
  === Token selection ===
- Using a strong hash function means !RandomPartitioner keys will, on average, be evenly spread
across the Token space, but you can still have imbalances if your Tokens do not divide up
the range evenly, so you should specify !InitialToken to your first nodes as `i * (2**127
/ N)` for i = 1 .. N.
+ Using a strong hash function means !RandomPartitioner keys will, on average, be evenly spread
across the Token space, but you can still have imbalances if your Tokens do not divide up
the range evenly, so you should specify !InitialToken to your first nodes as `i * (2**127
/ N)` for i = 0 .. N-1.
  
  With order preserving partitioners, your key distribution will be application-dependent.
 You should still take your best guess at specifying initial tokens (guided by sampling actual
data, if possible), but you will be more dependent on active load balancing (see below) and/or
adding new nodes to hot spots.
  

Mime
View raw message