Class PrioritizedRepairPlan
java.lang.Object
org.apache.cassandra.repair.autorepair.PrioritizedRepairPlan
Encapsulates a devised plan to repair tables, grouped by their keyspace and a given priority. This is used
by
AutoRepair to pass in an organized plan to
IAutoRepairTokenRangeSplitter.getRepairAssignments(boolean, List) which
can iterate over this plan in order to generate RepairAssignments.-
Constructor Summary
ConstructorsConstructorDescriptionPrioritizedRepairPlan(int priority, List<KeyspaceRepairPlan> keyspaceRepairPlans) -
Method Summary
Modifier and TypeMethodDescriptionstatic List<PrioritizedRepairPlan>build(Map<String, List<String>> keyspacesToTableNames, AutoRepairConfig.RepairType repairType, Consumer<List<String>> orderFunc, boolean primaryRangeOnly) Builds a list ofPrioritizedRepairPlans for the given keyspace and table map, ordered by priority from highest to lowest, where priority is derived from table schema's defined priority for the given repair type.booleanintinthashCode()toString()
-
Constructor Details
-
PrioritizedRepairPlan
-
-
Method Details
-
getPriority
public int getPriority() -
getKeyspaceRepairPlans
-
equals
-
hashCode
public int hashCode() -
toString
-
build
public static List<PrioritizedRepairPlan> build(Map<String, List<String>> keyspacesToTableNames, AutoRepairConfig.RepairType repairType, Consumer<List<String>> orderFunc, boolean primaryRangeOnly) Builds a list ofPrioritizedRepairPlans for the given keyspace and table map, ordered by priority from highest to lowest, where priority is derived from table schema's defined priority for the given repair type.If a keyspace has tables with differing priorities, those tables will be included in the PrioritizedRepairPlan for their given priority.
- Parameters:
keyspacesToTableNames- A mapping keyspace to table namesrepairType- The repair type that is being executedorderFunc- A function to order keyspace and tables in the returned plan.- Returns:
- Ordered list of plan's by table priorities.
-