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
Constructors Constructor Description CoordinatorBasedSegmentHandoffNotifier(String dataSource, CoordinatorClient coordinatorClient, CoordinatorBasedSegmentHandoffNotifierConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Perform any final processing and clean up after ourselves.booleanregisterSegmentHandoffCallback(org.apache.druid.query.SegmentDescriptor descriptor, Executor exec, Runnable handOffRunnable)register a handOffCallback to be called when segment handoff is complete.voidstart()Perform any initial setup.
-
-
-
Constructor Detail
-
CoordinatorBasedSegmentHandoffNotifier
public CoordinatorBasedSegmentHandoffNotifier(String dataSource, CoordinatorClient coordinatorClient, CoordinatorBasedSegmentHandoffNotifierConfig config)
-
-
Method Detail
-
registerSegmentHandoffCallback
public boolean registerSegmentHandoffCallback(org.apache.druid.query.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
-
-