voldemort.store.slop
Class HintedHandoff

java.lang.Object
  extended by voldemort.store.slop.HintedHandoff

public class HintedHandoff
extends java.lang.Object

Hinted handoff: if, when processing a pipeline for a given request, failures shall occur on specific nodes, the requests for these failed nodes should be queued up on other, currently available nodes. Semantics of the operation should not change i.e., if required-writes are not met, the request should still be considered a failure.


Constructor Summary
HintedHandoff(FailureDetector failureDetector, java.util.Map<java.lang.Integer,Store<ByteArray,Slop,byte[]>> slopStores, java.util.Map<java.lang.Integer,NonblockingStore> nonblockingSlopStores, HintedHandoffStrategy handoffStrategy, java.util.List<Node> failedNodes, long timeoutMs)
          Create a Hinted Handoff object
 
Method Summary
 void sendHintParallel(Node failedNode, Version version, Slop slop)
          Like sendHintSerial(voldemort.cluster.Node, voldemort.versioning.Version, Slop) , but doesn't block the pipeline.
 boolean sendHintSerial(Node failedNode, Version version, Slop slop)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HintedHandoff

public HintedHandoff(FailureDetector failureDetector,
                     java.util.Map<java.lang.Integer,Store<ByteArray,Slop,byte[]>> slopStores,
                     java.util.Map<java.lang.Integer,NonblockingStore> nonblockingSlopStores,
                     HintedHandoffStrategy handoffStrategy,
                     java.util.List<Node> failedNodes,
                     long timeoutMs)
Create a Hinted Handoff object

Parameters:
failureDetector - The failure detector
nonblockingSlopStores - A map of node ids to nonb-locking slop stores
slopStores - A map of node ids to blocking slop stores
handoffStrategy - The HintedHandoffStrategy implementation
failedNodes - A list of nodes in the original preflist for the request that have failed or are unavailable
timeoutMs - Timeout for slop stores
Method Detail

sendHintParallel

public void sendHintParallel(Node failedNode,
                             Version version,
                             Slop slop)
Like sendHintSerial(voldemort.cluster.Node, voldemort.versioning.Version, Slop) , but doesn't block the pipeline. Intended for handling prolonged failures without incurring a performance cost.

See Also:
sendHintSerial(voldemort.cluster.Node, voldemort.versioning.Version, Slop)

sendHintSerial

@Deprecated
public boolean sendHintSerial(Node failedNode,
                                         Version version,
                                         Slop slop)
Deprecated. 

Send a hint of a request originally meant for the failed node to another node in the ring, as selected by the HintedHandoffStrategy implementation passed in the constructor

Parameters:
failedNode - The node the request was originally meant for
version - The version of the request's object
slop - The hint
Returns:
True if persisted on another node, false otherwise


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu