public class BlacklistScheduler extends Object implements IScheduler
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.storm.shade.com.google.common.collect.EvictingQueue<Map<String,Set<Integer>>> |
badSupervisorsToleranceSlidingWindow |
protected Set<String> |
blacklistedSupervisorIds |
protected IBlacklistStrategy |
blacklistStrategy |
protected Map<String,Set<Integer>> |
cachedSupervisors |
static int |
DEFAULT_BLACKLIST_SCHEDULER_RESUME_TIME |
static int |
DEFAULT_BLACKLIST_SCHEDULER_TOLERANCE_COUNT |
static int |
DEFAULT_BLACKLIST_SCHEDULER_TOLERANCE_TIME |
protected int |
nimbusMonitorFreqSecs |
protected IReporter |
reporter |
protected int |
resumeTime |
protected org.apache.storm.shade.com.google.common.collect.EvictingQueue<Map<String,Integer>> |
sendAssignmentFailureCount |
protected int |
toleranceCount |
protected int |
toleranceTime |
protected int |
windowSize |
| Constructor and Description |
|---|
BlacklistScheduler(IScheduler underlyingScheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
called once when the system is shutting down, should be idempotent.
|
Map<String,Map<String,Double>> |
config()
This function returns the scheduler’s configuration.
|
Set<String> |
getBlacklistSupervisorIds() |
void |
nodeAssignmentSent(String node,
boolean successful) |
void |
prepare(Map<String,Object> conf,
StormMetricsRegistry metricsRegistry) |
void |
schedule(Topologies topologies,
Cluster cluster)
Set assignments for the topologies which needs scheduling.
|
public static final int DEFAULT_BLACKLIST_SCHEDULER_RESUME_TIME
public static final int DEFAULT_BLACKLIST_SCHEDULER_TOLERANCE_COUNT
public static final int DEFAULT_BLACKLIST_SCHEDULER_TOLERANCE_TIME
protected int toleranceTime
protected int toleranceCount
protected int resumeTime
protected IReporter reporter
protected IBlacklistStrategy blacklistStrategy
protected int nimbusMonitorFreqSecs
protected org.apache.storm.shade.com.google.common.collect.EvictingQueue<Map<String,Set<Integer>>> badSupervisorsToleranceSlidingWindow
protected org.apache.storm.shade.com.google.common.collect.EvictingQueue<Map<String,Integer>> sendAssignmentFailureCount
protected int windowSize
public BlacklistScheduler(IScheduler underlyingScheduler)
public void prepare(Map<String,Object> conf, StormMetricsRegistry metricsRegistry)
prepare in interface ISchedulerpublic void cleanup()
ISchedulercalled once when the system is shutting down, should be idempotent.
cleanup in interface ISchedulerpublic void schedule(Topologies topologies, Cluster cluster)
ISchedulerSet assignments for the topologies which needs scheduling. The new assignments is available through cluster.getAssignments()
schedule in interface ISchedulertopologies - all the topologies in the cluster, some of them need schedule. Topologies object here only contain static information about topologies. Information like assignments, slots are all in the cluster object.cluster - the cluster these topologies are running in. cluster contains everything user need to develop a new scheduling logic. e.g. supervisors information, available slots, current assignments for all the topologies etc. User can set the new assignment for topologies using cluster.setAssignmentById()`public Map<String,Map<String,Double>> config()
ISchedulerThis function returns the scheduler’s configuration.
config in interface ISchedulerpublic void nodeAssignmentSent(String node, boolean successful)
nodeAssignmentSent in interface INodeAssignmentSentCallBackCopyright © 2021 The Apache Software Foundation. All rights reserved.