Interface IBlacklistStrategy

All Known Implementing Classes:
DefaultBlacklistStrategy, RasBlacklistStrategy

public interface IBlacklistStrategy
  • Method Details

    • prepare

      void prepare(Map<String,Object> conf)
    • getBlacklist

      Set<String> getBlacklist(List<Map<String,Set<Integer>>> badSupervisorsToleranceSlidingWindow, List<Map<String,Integer>> sendAssignmentFailureCount, Cluster cluster, Topologies topologies)
      Get blacklist by blacklist strategy.
      Parameters:
      badSupervisorsToleranceSlidingWindow - bad supervisors buffered in sliding window
      sendAssignmentFailureCount - supervisors with failed assignment calls in sliding window
      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()`
      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.
      Returns:
      blacklisted supervisors' id set
    • resumeFromBlacklist

      void resumeFromBlacklist()
      resume supervisors form blacklist. Blacklist is just a temporary list for supervisors, or there will be less and less available resources. This will be called every time before getBlacklist() and schedule.