Interface IAutoRepairTokenRangeSplitter

All Known Implementing Classes:
FixedSplitTokenRangeSplitter, RepairTokenRangeSplitter

public interface IAutoRepairTokenRangeSplitter
Interface that defines how to generate KeyspaceRepairAssignments.

The default is RepairTokenRangeSplitter which aims to provide sensible defaults for all repair types.

Custom implementations class should require a constructor accepting (AutoRepairConfig.RepairType, Map) with the Map parameter accepting custom configuration for your splitter. If such a constructor does not exist, AutoRepairConfig.newAutoRepairTokenRangeSplitter(AutoRepairConfig.RepairType, ParameterizedClass) will fall back on invoking a default zero argument constructor.

  • Method Details

    • getRepairAssignments

      Iterator<KeyspaceRepairAssignments> getRepairAssignments(boolean primaryRangeOnly, List<PrioritizedRepairPlan> repairPlans)
      Split the token range you wish to repair into multiple assignments. The autorepair framework will repair the assignments from returned subrange iterator in the sequence it's provided.
      Parameters:
      primaryRangeOnly - Whether to repair only this node's primary ranges or all of its ranges.
      repairPlans - A list of ordered prioritized repair plans to generate assignments for in order.
      Returns:
      iterator of repair assignments, with each element representing a grouping of repair assignments for a given keyspace. The iterator is traversed lazily KeyspaceRepairAssignments at a time with the intent to try to get the most up-to-date representation of your data (e.g. how much data exists and is unrepaired at a given time).
    • setParameter

      default void setParameter(String key, String value)
      Update a configuration parameter. This is meant to be used by nodetool setautorepairconfig to update configuration dynamically.
      Parameters:
      key - parameter to update
      value - The value to set to.
    • getParameters

      default Map<String,String> getParameters()
      Returns:
      custom configuration. This is meant to be used by nodetool getautorepairconfig for retrieving the splitter configuration.