Package org.apache.druid.segment.handoff
Class CoordinatorBasedSegmentHandoffNotifier
java.lang.Object
org.apache.druid.segment.handoff.CoordinatorBasedSegmentHandoffNotifier
- All Implemented Interfaces:
Closeable,AutoCloseable,SegmentHandoffNotifier
public class CoordinatorBasedSegmentHandoffNotifier
extends Object
implements SegmentHandoffNotifier
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinatorBasedSegmentHandoffNotifier(String dataSource, CoordinatorClient coordinatorClient, CoordinatorBasedSegmentHandoffNotifierConfig config, String taskId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Perform any final processing and clean up after ourselves.booleanregisterSegmentHandoffCallback(SegmentDescriptor descriptor, Executor exec, Runnable handOffRunnable) register a handOffCallback to be called when segment handoff is complete.voidstart()Perform any initial setup.
-
Constructor Details
-
CoordinatorBasedSegmentHandoffNotifier
public CoordinatorBasedSegmentHandoffNotifier(String dataSource, CoordinatorClient coordinatorClient, CoordinatorBasedSegmentHandoffNotifierConfig config, String taskId)
-
-
Method Details
-
registerSegmentHandoffCallback
public boolean registerSegmentHandoffCallback(SegmentDescriptor descriptor, Executor exec, Runnable handOffRunnable) Description copied from interface:SegmentHandoffNotifierregister a handOffCallback to be called when segment handoff is complete.- Specified by:
registerSegmentHandoffCallbackin interfaceSegmentHandoffNotifier- Parameters:
descriptor- segment descriptor for the segment for which handoffCallback is requestedexec- executor used to call the runnablehandOffRunnable- runnable to be called when segment handoff is complete
-
start
public void start()Description copied from interface:SegmentHandoffNotifierPerform any initial setup. Should be called before using any other methods, and should be paired with a corresponding call toSegmentHandoffNotifier.close().- Specified by:
startin interfaceSegmentHandoffNotifier
-
close
public void close()Description copied from interface:SegmentHandoffNotifierPerform any final processing and clean up after ourselves.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSegmentHandoffNotifier
-