public class BlacklistScheduler extends Object implements IScheduler
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.storm.shade.com.google.common.collect.EvictingQueue<HashMap<String,Set<Integer>>> |
badSupervisorsToleranceSlidingWindow |
protected Set<String> |
blacklistHost |
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 int |
toleranceCount |
protected int |
toleranceTime |
protected int |
windowSize |
| Constructor and Description |
|---|
BlacklistScheduler(IScheduler underlyingScheduler,
StormMetricsRegistry metricsRegistry) |
| 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.
|
void |
prepare(Map<String,Object> conf) |
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<HashMap<String,Set<Integer>>> badSupervisorsToleranceSlidingWindow
protected int windowSize
public BlacklistScheduler(IScheduler underlyingScheduler, StormMetricsRegistry metricsRegistry)
public void prepare(Map<String,Object> conf)
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 ISchedulerCopyright © 2019 The Apache Software Foundation. All rights reserved.