Class RepairOption

java.lang.Object
org.apache.cassandra.repair.messages.RepairOption

public class RepairOption extends Object
Repair options.
  • Field Details

  • Constructor Details

    • RepairOption

      public RepairOption(RepairParallelism parallelism, boolean primaryRange, boolean incremental, boolean trace, int jobThreads, Collection<Range<Token>> ranges, boolean isSubrangeRepair, boolean pullRepair, boolean forceRepair, PreviewKind previewKind, boolean optimiseStreams, boolean ignoreUnreplicatedKeyspaces, boolean repairPaxos, boolean paxosOnly)
  • Method Details

    • parseRanges

      public static Set<Range<Token>> parseRanges(String rangesStr, IPartitioner partitioner)
    • parse

      public static RepairOption parse(Map<String,String> options, IPartitioner partitioner)
      Construct RepairOptions object from given map of Strings.

      Available options are:

      Repair Options
      key value default (when key not given)
      parallelism "sequential", "parallel" or "dc_parallel" "sequential"
      primaryRange "true" if perform repair only on primary range. false
      incremental "true" if perform incremental repair. false
      trace "true" if repair is traced. false
      jobThreads Number of threads to use to run repair job. 1
      ranges Ranges to repair. A range is expressed as <start token>:<end token> and multiple ranges can be given as comma separated ranges(e.g. aaa:bbb,ccc:ddd).
      columnFamilies Specify names of ColumnFamilies to repair. Multiple ColumnFamilies can be given as comma separated values(e.g. cf1,cf2,cf3).
      dataCenters Specify names of data centers who participate in this repair. Multiple data centers can be given as comma separated values(e.g. dc1,dc2,dc3).
      hosts Specify names of hosts who participate in this repair. Multiple hosts can be given as comma separated values(e.g. cass1,cass2).
      pullRepair "true" if the repair should only stream data one way from a remote host to this host. This is only allowed if exactly 2 hosts are specified along with a token range that they share. false
      forceRepair "true" if the repair should continue, even if one of the replicas involved is down. false
      optimiseStreams "true" if we should try to optimise the syncing to avoid transfering identical ranges to the same host multiple times false
      Parameters:
      options - options to parse
      partitioner - partitioner is used to construct token ranges
      Returns:
      RepairOptions object
    • getParallelism

      public RepairParallelism getParallelism()
    • isPrimaryRange

      public boolean isPrimaryRange()
    • isIncremental

      public boolean isIncremental()
    • isTraced

      public boolean isTraced()
    • isPullRepair

      public boolean isPullRepair()
    • isForcedRepair

      public boolean isForcedRepair()
    • getJobThreads

      public int getJobThreads()
    • getColumnFamilies

      public Collection<String> getColumnFamilies()
    • getRanges

      public Collection<Range<Token>> getRanges()
    • getDataCenters

      public Collection<String> getDataCenters()
    • getHosts

      public Collection<String> getHosts()
    • isGlobal

      public boolean isGlobal()
    • isSubrangeRepair

      public boolean isSubrangeRepair()
    • getPreviewKind

      public PreviewKind getPreviewKind()
    • isPreview

      public boolean isPreview()
    • isInLocalDCOnly

      public boolean isInLocalDCOnly()
    • optimiseStreams

      public boolean optimiseStreams()
    • ignoreUnreplicatedKeyspaces

      public boolean ignoreUnreplicatedKeyspaces()
    • repairPaxos

      public boolean repairPaxos()
    • paxosOnly

      public boolean paxosOnly()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • asMap

      public Map<String,String> asMap()