Github user nilday commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1674#discussion_r80839227
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/scheduler/blacklist/BlacklistScheduler.java 
---
    @@ -0,0 +1,212 @@
    +package org.apache.storm.scheduler.blacklist;
    +
    +import org.apache.storm.Config;
    +import org.apache.storm.scheduler.*;
    +import org.apache.storm.scheduler.blacklist.reporters.IReporter;
    +import org.apache.storm.scheduler.blacklist.strategies.IBlacklistStrategy;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.util.*;
    +
    +/**
    + * Created by howard.li on 2016/6/29.
    + */
    +public class BlacklistScheduler implements IScheduler {
    +    private static final Logger LOG = 
LoggerFactory.getLogger(BlacklistScheduler.class);
    +    DefaultScheduler defaultScheduler;
    +    @SuppressWarnings("rawtypes")
    +    private Map _conf;
    +
    +    private int toleranceTime;
    +    private int toleranceCount;
    +    private int resumeTime;
    +    private IReporter reporter;
    +    private IBlacklistStrategy blacklistStrategy;
    +
    +    private int nimbusMonitorFreqSecs;
    +
    +
    +    private Map<String,Set<Integer>> cachedSupervisors;
    +
    +    //key is supervisor key ,value is supervisor ports
    +    private CircularBuffer<HashMap<String,Set<Integer>>> toleranceBuffer;
    +
    +    @Override
    +    public void prepare(Map conf) {
    +        LOG.info("prepare black list scheduler");
    +        LOG.info(conf.toString());
    +        defaultScheduler=new DefaultScheduler();
    +        defaultScheduler.prepare(conf);
    +        _conf=conf;
    +        if(_conf.containsKey(Config.BLACKLIST_SCHEDULER_TOLERANCE_TIME)){
    +            
toleranceTime=(Integer)_conf.get(Config.BLACKLIST_SCHEDULER_TOLERANCE_TIME);
    --- End diff --
    
    Maybe it's not necessary? [BLACKLIST_SCHEDULER_TOLERANCE_TIME  ] 
(https://github.com/nilday/storm/blob/blacklist-scheduler/storm-core/src/jvm/org/apache/storm/Config.java#L2164)
 has Annotation of 
     [ isInteger] 
(https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/validation/ConfigValidationAnnotations.java#L106)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to