Class CoordinatorClientImpl
java.lang.Object
org.apache.druid.client.coordinator.CoordinatorClientImpl
- All Implemented Interfaces:
CoordinatorClient
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinatorClientImpl(ServiceClient client, com.fasterxml.jackson.databind.ObjectMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<BootstrapSegmentsResponse>Fetch bootstrap segments from the coordinator.com.google.common.util.concurrent.ListenableFuture<List<DataSourceInformation>>fetchDataSourceInformation(Set<String> dataSources) Retrieves detailed metadata information for the specified data sources, which includesRowSignature.Retrieves list of datasources with used segments.Gets the lookup configuration for a tier synchronously.com.google.common.util.concurrent.ListenableFuture<DataSegment>fetchSegment(String dataSource, String segmentId, boolean includeUnused) Fetches segment metadata for the given dataSource and segmentId.fetchServerViewSegments(String dataSource, List<org.joda.time.Interval> intervals) Fetches segments from the coordinator server view for the given dataSource and intervals.com.google.common.util.concurrent.ListenableFuture<List<DataSegment>>fetchUsedSegments(String dataSource, List<org.joda.time.Interval> intervals) Fetches segment metadata for the given dataSource and intervals.com.google.common.util.concurrent.ListenableFuture<CompactionStatusResponse>getCompactionSnapshots(String dataSource) Gets the latest compaction snapshots of one or all datasources.com.google.common.util.concurrent.ListenableFuture<CoordinatorDynamicConfig>Gets the latest coordinator dynamic config.com.google.common.util.concurrent.ListenableFuture<Boolean>isHandoffComplete(String dataSource, SegmentDescriptor descriptor) Checks if the given segment is handed off or not.com.google.common.util.concurrent.ListenableFuture<Void>updateAllLookups(Object lookups) Updates lookups for all tiers.com.google.common.util.concurrent.ListenableFuture<Void>updateCoordinatorDynamicConfig(CoordinatorDynamicConfig dynamicConfig) Updates the Coordinator dynamic config.withRetryPolicy(ServiceRetryPolicy retryPolicy) Returns a new instance backed by a ServiceClient which follows the provided retryPolicy
-
Constructor Details
-
CoordinatorClientImpl
public CoordinatorClientImpl(ServiceClient client, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
-
Method Details
-
isHandoffComplete
public com.google.common.util.concurrent.ListenableFuture<Boolean> isHandoffComplete(String dataSource, SegmentDescriptor descriptor) Description copied from interface:CoordinatorClientChecks if the given segment is handed off or not.- Specified by:
isHandoffCompletein interfaceCoordinatorClient
-
fetchSegment
public com.google.common.util.concurrent.ListenableFuture<DataSegment> fetchSegment(String dataSource, String segmentId, boolean includeUnused) Description copied from interface:CoordinatorClientFetches segment metadata for the given dataSource and segmentId. If includeUnused is set to false, the segment is not returned if it is marked as unused.- Specified by:
fetchSegmentin interfaceCoordinatorClient
-
fetchServerViewSegments
public Iterable<ImmutableSegmentLoadInfo> fetchServerViewSegments(String dataSource, List<org.joda.time.Interval> intervals) Description copied from interface:CoordinatorClientFetches segments from the coordinator server view for the given dataSource and intervals.- Specified by:
fetchServerViewSegmentsin interfaceCoordinatorClient
-
fetchUsedSegments
public com.google.common.util.concurrent.ListenableFuture<List<DataSegment>> fetchUsedSegments(String dataSource, List<org.joda.time.Interval> intervals) Description copied from interface:CoordinatorClientFetches segment metadata for the given dataSource and intervals.- Specified by:
fetchUsedSegmentsin interfaceCoordinatorClient
-
fetchDataSourceInformation
public com.google.common.util.concurrent.ListenableFuture<List<DataSourceInformation>> fetchDataSourceInformation(Set<String> dataSources) Description copied from interface:CoordinatorClientRetrieves detailed metadata information for the specified data sources, which includesRowSignature.- Specified by:
fetchDataSourceInformationin interfaceCoordinatorClient
-
fetchBootstrapSegments
public com.google.common.util.concurrent.ListenableFuture<BootstrapSegmentsResponse> fetchBootstrapSegments()Description copied from interface:CoordinatorClientFetch bootstrap segments from the coordinator. The results must be streamed back to the caller as the result set can be large.- Specified by:
fetchBootstrapSegmentsin interfaceCoordinatorClient
-
withRetryPolicy
Description copied from interface:CoordinatorClientReturns a new instance backed by a ServiceClient which follows the provided retryPolicy- Specified by:
withRetryPolicyin interfaceCoordinatorClient
-
fetchDataSourcesWithUsedSegments
public com.google.common.util.concurrent.ListenableFuture<Set<String>> fetchDataSourcesWithUsedSegments()Description copied from interface:CoordinatorClientRetrieves list of datasources with used segments.- Specified by:
fetchDataSourcesWithUsedSegmentsin interfaceCoordinatorClient
-
getCompactionSnapshots
public com.google.common.util.concurrent.ListenableFuture<CompactionStatusResponse> getCompactionSnapshots(@Nullable String dataSource) Description copied from interface:CoordinatorClientGets the latest compaction snapshots of one or all datasources.API:
GET /druid/coordinator/v1/compaction/status- Specified by:
getCompactionSnapshotsin interfaceCoordinatorClient- Parameters:
dataSource- If passed as non-null, then the returned list contains only the snapshot for this datasource.
-
getCoordinatorDynamicConfig
public com.google.common.util.concurrent.ListenableFuture<CoordinatorDynamicConfig> getCoordinatorDynamicConfig()Description copied from interface:CoordinatorClientGets the latest coordinator dynamic config.API:
GET /druid/coordinator/v1/config- Specified by:
getCoordinatorDynamicConfigin interfaceCoordinatorClient
-
updateCoordinatorDynamicConfig
public com.google.common.util.concurrent.ListenableFuture<Void> updateCoordinatorDynamicConfig(CoordinatorDynamicConfig dynamicConfig) Description copied from interface:CoordinatorClientUpdates the Coordinator dynamic config.API:
POST /druid/coordinator/v1/config- Specified by:
updateCoordinatorDynamicConfigin interfaceCoordinatorClient
-
updateAllLookups
Description copied from interface:CoordinatorClientUpdates lookups for all tiers.API:
POST /druid/coordinator/v1/lookups/config- Specified by:
updateAllLookupsin interfaceCoordinatorClient
-
fetchLookupsForTierSync
Description copied from interface:CoordinatorClientGets the lookup configuration for a tier synchronously.API:
GET /druid/coordinator/v1/lookups/config/<tier>- Specified by:
fetchLookupsForTierSyncin interfaceCoordinatorClient- Parameters:
tier- The name of the tier for which the lookup configuration is to be fetched.
-