Interface CoordinatorClient
- All Known Implementing Classes:
CoordinatorClientImpl,NoopCoordinatorClient
public interface CoordinatorClient
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<CloseableIterator<SegmentStatusInCluster>>fetchAllUsedSegmentsWithOvershadowedStatus(Set<String> watchedDataSources, boolean includeRealtimeSegments) Returns an iterator over the metadata segments of multiple datasources in the cluster, fetching them in one go.com.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<URI>Returns the current coordinator leader's URI.com.google.common.util.concurrent.ListenableFuture<BrokerDynamicConfig>Gets the latest broker dynamic config from the Coordinator.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.Returns the current snapshot of the rules.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.com.google.common.util.concurrent.ListenableFuture<Void>updateRulesForDatasource(String dataSource, List<Rule> rules) Posts load rules to the coordinator.withRetryPolicy(ServiceRetryPolicy retryPolicy) Returns a new instance backed by a ServiceClient which follows the provided retryPolicy
-
Method Details
-
isHandoffComplete
com.google.common.util.concurrent.ListenableFuture<Boolean> isHandoffComplete(String dataSource, SegmentDescriptor descriptor) Checks if the given segment is handed off or not. -
fetchSegment
com.google.common.util.concurrent.ListenableFuture<DataSegment> fetchSegment(String dataSource, String segmentId, boolean includeUnused) Fetches 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. -
fetchServerViewSegments
Iterable<ImmutableSegmentLoadInfo> fetchServerViewSegments(String dataSource, List<org.joda.time.Interval> intervals) Fetches segments from the coordinator server view for the given dataSource and intervals. -
fetchUsedSegments
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. -
fetchDataSourceInformation
com.google.common.util.concurrent.ListenableFuture<List<DataSourceInformation>> fetchDataSourceInformation(Set<String> datasources) Retrieves detailed metadata information for the specified data sources, which includesRowSignature. -
fetchBootstrapSegments
com.google.common.util.concurrent.ListenableFuture<BootstrapSegmentsResponse> fetchBootstrapSegments()Fetch bootstrap segments from the coordinator. The results must be streamed back to the caller as the result set can be large. -
withRetryPolicy
Returns a new instance backed by a ServiceClient which follows the provided retryPolicy -
fetchDataSourcesWithUsedSegments
Retrieves list of datasources with used segments. -
getCompactionSnapshots
com.google.common.util.concurrent.ListenableFuture<CompactionStatusResponse> getCompactionSnapshots(@Nullable String dataSource) Gets the latest compaction snapshots of one or all datasources.API:
GET /druid/coordinator/v1/compaction/status- Parameters:
dataSource- If passed as non-null, then the returned list contains only the snapshot for this datasource.
-
getCoordinatorDynamicConfig
com.google.common.util.concurrent.ListenableFuture<CoordinatorDynamicConfig> getCoordinatorDynamicConfig()Gets the latest coordinator dynamic config.API:
GET /druid/coordinator/v1/config -
getBrokerDynamicConfig
com.google.common.util.concurrent.ListenableFuture<BrokerDynamicConfig> getBrokerDynamicConfig()Gets the latest broker dynamic config from the Coordinator. Brokers use this to fetch their configuration from the Coordinator on startup. Returns an emptyBrokerDynamicConfigwhen querying older coordinators to ensure backwards-compatibility.API:
GET /druid/coordinator/v1/broker/config -
updateCoordinatorDynamicConfig
com.google.common.util.concurrent.ListenableFuture<Void> updateCoordinatorDynamicConfig(CoordinatorDynamicConfig dynamicConfig) Updates the Coordinator dynamic config.API:
POST /druid/coordinator/v1/config -
updateAllLookups
Updates lookups for all tiers.API:
POST /druid/coordinator/v1/lookups/config -
fetchLookupsForTierSync
Gets the lookup configuration for a tier synchronously.API:
GET /druid/coordinator/v1/lookups/config/<tier>- Parameters:
tier- The name of the tier for which the lookup configuration is to be fetched.
-
fetchAllUsedSegmentsWithOvershadowedStatus
com.google.common.util.concurrent.ListenableFuture<CloseableIterator<SegmentStatusInCluster>> fetchAllUsedSegmentsWithOvershadowedStatus(@Nullable Set<String> watchedDataSources, boolean includeRealtimeSegments) Returns an iterator over the metadata segments of multiple datasources in the cluster, fetching them in one go.API:
GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus- Parameters:
watchedDataSources- Optional datasources to filter the segments by. If null or empty, all segments are returned.includeRealtimeSegments- If true, includes realtime segments in the result.
-
getRulesForAllDatasources
com.google.common.util.concurrent.ListenableFuture<Map<String,List<Rule>>> getRulesForAllDatasources()Returns the current snapshot of the rules.API:
GET /druid/coordinator/v1/rules -
findCurrentLeader
com.google.common.util.concurrent.ListenableFuture<URI> findCurrentLeader()Returns the current coordinator leader's URI.API:
GET /druid/coordinator/v1/leader -
updateRulesForDatasource
com.google.common.util.concurrent.ListenableFuture<Void> updateRulesForDatasource(String dataSource, List<Rule> rules) Posts load rules to the coordinator.API:
POST /druid/coordinator/v1/rules
-