public class ShardChecker extends AbstractServer
running| Constructor and Description |
|---|
ShardChecker(ServiceManager serviceManager,
WorkerManager workerManager,
Scheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAndUpdateShard(java.lang.String serviceId,
long workerId,
java.util.List<ShardReportInfo> shardReportInfos) |
void |
doStart() |
void |
doStop() |
protected void |
shardGroupBalanceCheckForService(java.lang.String serviceId)
Check and balance shard group if needed
|
protected void |
shardHealthCheck(Shard shard)
Check given shard's replica status, remove dead replica and add missing replicas.
|
protected void |
shardHealthCheckForService(java.lang.String serviceId)
check the shards inside a service
|
isRunning, start, stoppublic ShardChecker(ServiceManager serviceManager, WorkerManager workerManager, Scheduler scheduler)
public void doStart()
doStart in class AbstractServerpublic void doStop()
doStop in class AbstractServerprotected void shardHealthCheckForService(java.lang.String serviceId)
serviceId - the target service idprotected void shardHealthCheck(Shard shard) throws StarException
shard - the shard to be checkedStarExceptionprotected void shardGroupBalanceCheckForService(java.lang.String serviceId)
serviceId - target service idpublic void checkAndUpdateShard(java.lang.String serviceId,
long workerId,
java.util.List<ShardReportInfo> shardReportInfos)
Copyright © 2024. All rights reserved.