Package org.apache.cassandra.repair
Class StreamingRepairTask
java.lang.Object
org.apache.cassandra.repair.StreamingRepairTask
- All Implemented Interfaces:
com.google.common.util.concurrent.FutureCallback<StreamState>,Runnable,StreamEventHandler
StreamingRepairTask performs data streaming between two remote replicas, neither of which is repair coordinator.
Task will send
SyncResponse message back to coordinator upon streaming completion.-
Constructor Summary
ConstructorsConstructorDescriptionStreamingRepairTask(SharedContext ctx, SyncState state, RepairJobDesc desc, InetAddressAndPort initiator, InetAddressAndPort src, InetAddressAndPort dst, Collection<Range<Token>> ranges, TimeUUID pendingRepair, PreviewKind previewKind, boolean asymmetric) -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleStreamEvent(StreamEvent event) Callback for various streaming events.voidIf we failed on either stream in or out, respond fail to coordinatorvoidonSuccess(StreamState state) If we succeeded on both stream in and out, respond back to coordinatorvoidrun()
-
Constructor Details
-
Method Details
-
run
public void run() -
handleStreamEvent
Description copied from interface:StreamEventHandlerCallback for various streaming events.- Specified by:
handleStreamEventin interfaceStreamEventHandler- Parameters:
event- Stream event.- See Also:
-
onSuccess
If we succeeded on both stream in and out, respond back to coordinator- Specified by:
onSuccessin interfacecom.google.common.util.concurrent.FutureCallback<StreamState>
-
onFailure
If we failed on either stream in or out, respond fail to coordinator- Specified by:
onFailurein interfacecom.google.common.util.concurrent.FutureCallback<StreamState>
-