Package org.apache.druid.client
Class BrokerServerView
java.lang.Object
org.apache.druid.client.BrokerServerView
- All Implemented Interfaces:
ServerView,TimelineServerView
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.client.ServerView
ServerView.BaseSegmentCallback, ServerView.CallbackAction, ServerView.SegmentCallback, ServerView.ServerCallbackNested classes/interfaces inherited from interface org.apache.druid.client.TimelineServerView
TimelineServerView.TimelineCallback -
Constructor Summary
ConstructorsConstructorDescriptionBrokerServerView(QueryableDruidServer.Maker directDruidClientFactory, FilteredServerInventoryView baseView, TierSelectorStrategy tierSelectorStrategy, ServiceEmitter emitter, BrokerSegmentWatcherConfig segmentWatcherConfig, BrokerViewOfCoordinatorConfig brokerViewOfCoordinatorConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns a snapshot of the current set of server metadata.Returns a snapshot of the current servers, their metadata, and their inventory.<T> QueryRunner<T>getQueryRunner(DruidServer server) getTimeline(TableDataSource dataSource) Returns the timeline for a table, if it exists.booleanvoidregisterSegmentCallback(Executor exec, ServerView.SegmentCallback callback) voidregisterServerCallback(Executor exec, ServerView.ServerCallback callback) voidregisterTimelineCallback(Executor exec, TimelineServerView.TimelineCallback callback) Register a callback for state changes in the timeline managed by this TimelineServerView.voidstart()
-
Constructor Details
-
BrokerServerView
@Inject public BrokerServerView(QueryableDruidServer.Maker directDruidClientFactory, FilteredServerInventoryView baseView, TierSelectorStrategy tierSelectorStrategy, ServiceEmitter emitter, BrokerSegmentWatcherConfig segmentWatcherConfig, BrokerViewOfCoordinatorConfig brokerViewOfCoordinatorConfig)
-
-
Method Details
-
start
- Throws:
InterruptedException
-
isInitialized
public boolean isInitialized() -
awaitInitialization
- Throws:
InterruptedException
-
getDruidClientFactory
-
getTimeline
public Optional<VersionedIntervalTimeline<String,ServerSelector>> getTimeline(TableDataSource dataSource) Description copied from interface:TimelineServerViewReturns the timeline for a table, if it exists.- Specified by:
getTimelinein interfaceTimelineServerView- Parameters:
dataSource- the table- Returns:
- timeline, if it exists
-
registerTimelineCallback
Description copied from interface:TimelineServerViewRegister a callback for state changes in the timeline managed by this TimelineServerView. The callback will be called after the relevant change is made to this TimelineServerView's timeline.- Specified by:
registerTimelineCallbackin interfaceTimelineServerView- Parameters:
exec- executor in which to run the callbackcallback- the callback
-
getQueryRunner
- Specified by:
getQueryRunnerin interfaceTimelineServerView
-
registerServerCallback
- Specified by:
registerServerCallbackin interfaceServerView
-
registerSegmentCallback
- Specified by:
registerSegmentCallbackin interfaceServerView
-
getDruidServerMetadatas
Description copied from interface:TimelineServerViewReturns a snapshot of the current set of server metadata.- Specified by:
getDruidServerMetadatasin interfaceTimelineServerView
-
getDruidServers
Description copied from interface:TimelineServerViewReturns a snapshot of the current servers, their metadata, and their inventory.- Specified by:
getDruidServersin interfaceTimelineServerView
-