Class HttpLoadQueuePeon
java.lang.Object
org.apache.druid.server.coordinator.loading.HttpLoadQueuePeon
- All Implemented Interfaces:
LoadQueuePeon
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.core.type.TypeReference<List<DataSegmentChangeRequest>>static final com.fasterxml.jackson.core.type.TypeReference<List<DataSegmentChangeResponse>> -
Constructor Summary
ConstructorsConstructorDescriptionHttpLoadQueuePeon(String baseUrl, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, HttpClient httpClient, HttpLoadQueuePeonConfig config, Supplier<SegmentLoadingMode> loadingModeSupplier, ScheduledExecutorService processingExecutor, ExecutorService callBackExecutor) -
Method Summary
Modifier and TypeMethodDescriptionbooleancancelOperation(DataSegment segment) Tries to cancel a load/drop operation.voiddropSegment(DataSegment segment, LoadPeonCallback callback) longlongvoidloadSegment(DataSegment segment, SegmentAction action, LoadPeonCallback callback) voidmarkSegmentToDrop(DataSegment dataSegment) voidstart()voidstop()voidunmarkSegmentToDrop(DataSegment dataSegment)
-
Field Details
-
REQUEST_ENTITY_TYPE_REF
public static final com.fasterxml.jackson.core.type.TypeReference<List<DataSegmentChangeRequest>> REQUEST_ENTITY_TYPE_REF -
RESPONSE_ENTITY_TYPE_REF
public static final com.fasterxml.jackson.core.type.TypeReference<List<DataSegmentChangeResponse>> RESPONSE_ENTITY_TYPE_REF
-
-
Constructor Details
-
HttpLoadQueuePeon
public HttpLoadQueuePeon(String baseUrl, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, HttpClient httpClient, HttpLoadQueuePeonConfig config, Supplier<SegmentLoadingMode> loadingModeSupplier, ScheduledExecutorService processingExecutor, ExecutorService callBackExecutor)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceLoadQueuePeon
-
stop
public void stop()- Specified by:
stopin interfaceLoadQueuePeon
-
loadSegment
- Specified by:
loadSegmentin interfaceLoadQueuePeon
-
dropSegment
- Specified by:
dropSegmentin interfaceLoadQueuePeon
-
getSegmentsToLoad
- Specified by:
getSegmentsToLoadin interfaceLoadQueuePeon
-
getSegmentsToDrop
- Specified by:
getSegmentsToDropin interfaceLoadQueuePeon
-
getTimedOutSegments
- Specified by:
getTimedOutSegmentsin interfaceLoadQueuePeon
-
getSegmentsInQueue
- Specified by:
getSegmentsInQueuein interfaceLoadQueuePeon
-
getSizeOfSegmentsToLoad
public long getSizeOfSegmentsToLoad()- Specified by:
getSizeOfSegmentsToLoadin interfaceLoadQueuePeon
-
getLoadRateKbps
public long getLoadRateKbps()- Specified by:
getLoadRateKbpsin interfaceLoadQueuePeon
-
getAndResetStats
- Specified by:
getAndResetStatsin interfaceLoadQueuePeon
-
markSegmentToDrop
- Specified by:
markSegmentToDropin interfaceLoadQueuePeon
-
unmarkSegmentToDrop
- Specified by:
unmarkSegmentToDropin interfaceLoadQueuePeon
-
getSegmentsMarkedToDrop
- Specified by:
getSegmentsMarkedToDropin interfaceLoadQueuePeon
-
cancelOperation
Tries to cancel a load/drop operation. A load/drop request can be cancelled only if it has not already been sent to the corresponding server.- Specified by:
cancelOperationin interfaceLoadQueuePeon- Returns:
- true if the operation was successfully cancelled
-