Class RepairOption


  • public class RepairOption
    extends java.lang.Object
    Repair options.
    • Constructor Detail

      • RepairOption

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

      • parseRanges

        public static java.util.Set<Range<Token>> parseRanges​(java.lang.String rangesStr,
                                                              IPartitioner partitioner)
      • parse

        public static RepairOption parse​(java.util.Map<java.lang.String,​java.lang.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
      • 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 java.util.Collection<java.lang.String> getColumnFamilies()
      • getRanges

        public java.util.Collection<Range<Token>> getRanges()
      • getDataCenters

        public java.util.Collection<java.lang.String> getDataCenters()
      • getHosts

        public java.util.Collection<java.lang.String> getHosts()
      • isGlobal

        public boolean isGlobal()
      • isSubrangeRepair

        public boolean isSubrangeRepair()
      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asMap

        public java.util.Map<java.lang.String,​java.lang.String> asMap()