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 IScheduler
public void cleanup()
IScheduler
cleanup
in interface IScheduler
public void schedule(Topologies topologies, Cluster cluster)
IScheduler
schedule
in interface IScheduler
topologies
- 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()
IScheduler
config
in interface IScheduler
public void nodeAssignmentSent(String node, boolean successful)
nodeAssignmentSent
in interface INodeAssignmentSentCallBack
Copyright © 2023 The Apache Software Foundation. All rights reserved.