Package org.apache.druid.client.selector
Class ServerSelector
- java.lang.Object
-
- org.apache.druid.client.selector.ServerSelector
-
- All Implemented Interfaces:
org.apache.druid.timeline.Overshadowable<ServerSelector>
public class ServerSelector extends Object implements org.apache.druid.timeline.Overshadowable<ServerSelector>
-
-
Constructor Summary
Constructors Constructor Description ServerSelector(org.apache.druid.timeline.DataSegment segment, TierSelectorStrategy strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddServerAndUpdateSegment(QueryableDruidServer server, org.apache.druid.timeline.DataSegment segment)List<DruidServerMetadata>getAllServers()shortgetAtomicUpdateGroupSize()List<DruidServerMetadata>getCandidates(int numCandidates)intgetEndRootPartitionId()shortgetMinorVersion()org.apache.druid.timeline.DataSegmentgetSegment()intgetStartRootPartitionId()StringgetVersion()booleanhasData()booleanisEmpty()booleanovershadows(ServerSelector other)<T> QueryableDruidServer<? extends org.apache.druid.query.QueryRunner<T>>pick(org.apache.druid.query.Query<T> query)booleanremoveServer(QueryableDruidServer server)
-
-
-
Constructor Detail
-
ServerSelector
public ServerSelector(org.apache.druid.timeline.DataSegment segment, TierSelectorStrategy strategy)
-
-
Method Detail
-
getSegment
public org.apache.druid.timeline.DataSegment getSegment()
-
addServerAndUpdateSegment
public void addServerAndUpdateSegment(QueryableDruidServer server, org.apache.druid.timeline.DataSegment segment)
-
removeServer
public boolean removeServer(QueryableDruidServer server)
-
isEmpty
public boolean isEmpty()
-
getCandidates
public List<DruidServerMetadata> getCandidates(int numCandidates)
-
getAllServers
public List<DruidServerMetadata> getAllServers()
-
pick
@Nullable public <T> QueryableDruidServer<? extends org.apache.druid.query.QueryRunner<T>> pick(@Nullable org.apache.druid.query.Query<T> query)
-
overshadows
public boolean overshadows(ServerSelector other)
- Specified by:
overshadowsin interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
getStartRootPartitionId
public int getStartRootPartitionId()
- Specified by:
getStartRootPartitionIdin interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
getEndRootPartitionId
public int getEndRootPartitionId()
- Specified by:
getEndRootPartitionIdin interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
getMinorVersion
public short getMinorVersion()
- Specified by:
getMinorVersionin interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
getAtomicUpdateGroupSize
public short getAtomicUpdateGroupSize()
- Specified by:
getAtomicUpdateGroupSizein interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
hasData
public boolean hasData()
- Specified by:
hasDatain interfaceorg.apache.druid.timeline.Overshadowable<ServerSelector>
-
-