org.apache.cassandra.dht
Class BootStrapper
java.lang.Object
org.apache.cassandra.dht.BootStrapper
public class BootStrapper
- extends java.lang.Object
This class handles the bootstrapping responsibilities for the local endpoint.
- bootstrapTokenVerb asks the most-loaded node what Token to use to split its Range in two.
- streamRequestVerb tells source nodes to send us the necessary Ranges
- source nodes send streamInitiateVerb to us to say "get ready to receive data" [if there is data to send]
- when we have everything set up to receive the data, we send streamInitiateDoneVerb back to the source nodes and they start streaming
- when streaming is complete, we send streamFinishedVerb to the source so it can clean up on its end
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
address
protected final java.net.InetAddress address
token
protected final Token token
tokenMetadata
protected final TokenMetadata tokenMetadata
BootStrapper
public BootStrapper(AbstractReplicationStrategy rs,
java.net.InetAddress address,
Token token,
TokenMetadata tmd)
startBootstrap
public void startBootstrap()
throws java.io.IOException
- Throws:
java.io.IOException
getBootstrapToken
public static Token getBootstrapToken(TokenMetadata metadata,
java.util.Map<java.net.InetAddress,java.lang.Double> load)
throws java.io.IOException
- if initialtoken was specified, use that.
otherwise, pick a token to assume half the load of the most-loaded node.
- Throws:
java.io.IOException
getBalancedToken
public static Token getBalancedToken(TokenMetadata metadata,
java.util.Map<java.net.InetAddress,java.lang.Double> load)
Copyright © 2010 The Apache Software Foundation