public class StrategicSegmentAssigner extends Object implements SegmentActionHandler
An instance of this class is freshly created for each coordinator run.
| Constructor and Description |
|---|
StrategicSegmentAssigner(SegmentLoadQueueManager loadQueueManager,
DruidCluster cluster,
BalancerStrategy strategy,
SegmentLoadingConfig loadingConfig,
CoordinatorRunStats stats) |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcastSegment(DataSegment segment)
Broadcasts the given segment to all servers that are broadcast targets.
|
void |
deleteSegment(DataSegment segment)
Marks the given segment as unused.
|
SegmentReplicationStatus |
getReplicationStatus() |
CoordinatorRunStats |
getStats() |
void |
makeAlerts() |
boolean |
moveSegment(DataSegment segment,
ServerHolder sourceServer,
List<ServerHolder> destinationServers)
Moves the given segment from the source server to an eligible destination
server.
|
void |
replicateSegment(DataSegment segment,
Map<String,Integer> tierToReplicaCount)
Queues load or drop of replicas of the given segment to achieve the
target replication level on all historical tiers.
|
public StrategicSegmentAssigner(SegmentLoadQueueManager loadQueueManager, DruidCluster cluster, BalancerStrategy strategy, SegmentLoadingConfig loadingConfig, CoordinatorRunStats stats)
public CoordinatorRunStats getStats()
public SegmentReplicationStatus getReplicationStatus()
public void makeAlerts()
public boolean moveSegment(DataSegment segment, ServerHolder sourceServer, List<ServerHolder> destinationServers)
An eligible destination server must:
The segment is not moved if:
public void replicateSegment(DataSegment segment, Map<String,Integer> tierToReplicaCount)
SegmentActionHandlerreplicateSegment in interface SegmentActionHandlerpublic void broadcastSegment(DataSegment segment)
SegmentActionHandlerbroadcastSegment in interface SegmentActionHandlerpublic void deleteSegment(DataSegment segment)
SegmentActionHandlerdeleteSegment in interface SegmentActionHandlerCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.