org.apache.cassandra.db
Class HintedHandOffManager
java.lang.Object
org.apache.cassandra.db.HintedHandOffManager
public class HintedHandOffManager
- extends java.lang.Object
For each table (keyspace), there is a row in the system hints CF.
SuperColumns in that row are keys for which we have hinted data.
Subcolumns names within that supercolumn are host IPs. Subcolumn values are always empty.
Instead, we store the row data "normally" in the application table it belongs in.
So when we deliver hints we look up endpoints that need data delivered
on a per-key basis, then read that entire row out and send it over.
(TODO handle rows that have incrementally grown too large for a single message.)
HHM never deletes the row from Application tables; there is no way to distinguish that
from hinted tombstones! instead, rely on cleanup compactions to remove data
that doesn't belong on this node. (Cleanup compactions may be started manually
-- on a per node basis -- with "nodeprobe cleanup.")
TODO this avoids our hint rows from growing excessively large by offloading the
message data into application tables. But, this means that cleanup compactions
will nuke HH data. Probably better would be to store the RowMutation messages
in a HHData (non-super) CF, modifying the above to store a UUID value in the
HH subcolumn value, which we use as a key to a [standard] HHData system CF
that would contain the message bytes.
There are two ways hinted data gets delivered to the intended nodes.
runHints() runs periodically and pushes the hinted data on this node to
every intended node.
runDelieverHints() is called when some other node starts up (potentially
from a failure) and delivers the hinted data just to that node.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final HintedHandOffManager instance
HINTS_CF
public static final java.lang.String HINTS_CF
- See Also:
- Constant Field Values
HintedHandOffManager
protected HintedHandOffManager()
deliverHints
public void deliverHints(java.net.InetAddress to)
Copyright © 2010 The Apache Software Foundation