Class RepairOption
- java.lang.Object
-
- org.apache.cassandra.repair.messages.RepairOption
-
public class RepairOption extends java.lang.Object
Repair options.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLUMNFAMILIES_KEY
static java.lang.String
DATACENTERS_KEY
static java.lang.String
FORCE_REPAIR_KEY
static java.lang.String
HOSTS_KEY
static java.lang.String
IGNORE_UNREPLICATED_KS
static java.lang.String
INCREMENTAL_KEY
static java.lang.String
JOB_THREADS_KEY
static int
MAX_JOB_THREADS
static java.lang.String
OPTIMISE_STREAMS_KEY
static java.lang.String
PARALLELISM_KEY
static java.lang.String
PAXOS_ONLY_KEY
static java.lang.String
PREVIEW
static java.lang.String
PRIMARY_RANGE_KEY
static java.lang.String
PULL_REPAIR_KEY
static java.lang.String
RANGES_KEY
static java.lang.String
REPAIR_PAXOS_KEY
static java.lang.String
SUB_RANGE_REPAIR_KEY
static java.lang.String
TRACE_KEY
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
asMap()
java.util.Collection<java.lang.String>
getColumnFamilies()
java.util.Collection<java.lang.String>
getDataCenters()
java.util.Collection<java.lang.String>
getHosts()
int
getJobThreads()
RepairParallelism
getParallelism()
PreviewKind
getPreviewKind()
java.util.Collection<Range<Token>>
getRanges()
boolean
ignoreUnreplicatedKeyspaces()
boolean
isForcedRepair()
boolean
isGlobal()
boolean
isIncremental()
boolean
isInLocalDCOnly()
boolean
isPreview()
boolean
isPrimaryRange()
boolean
isPullRepair()
boolean
isSubrangeRepair()
boolean
isTraced()
boolean
optimiseStreams()
static RepairOption
parse(java.util.Map<java.lang.String,java.lang.String> options, IPartitioner partitioner)
Construct RepairOptions object from given map of Strings.static java.util.Set<Range<Token>>
parseRanges(java.lang.String rangesStr, IPartitioner partitioner)
boolean
paxosOnly()
boolean
repairPaxos()
java.lang.String
toString()
-
-
-
Field Detail
-
PARALLELISM_KEY
public static final java.lang.String PARALLELISM_KEY
- See Also:
- Constant Field Values
-
PRIMARY_RANGE_KEY
public static final java.lang.String PRIMARY_RANGE_KEY
- See Also:
- Constant Field Values
-
INCREMENTAL_KEY
public static final java.lang.String INCREMENTAL_KEY
- See Also:
- Constant Field Values
-
JOB_THREADS_KEY
public static final java.lang.String JOB_THREADS_KEY
- See Also:
- Constant Field Values
-
RANGES_KEY
public static final java.lang.String RANGES_KEY
- See Also:
- Constant Field Values
-
COLUMNFAMILIES_KEY
public static final java.lang.String COLUMNFAMILIES_KEY
- See Also:
- Constant Field Values
-
DATACENTERS_KEY
public static final java.lang.String DATACENTERS_KEY
- See Also:
- Constant Field Values
-
HOSTS_KEY
public static final java.lang.String HOSTS_KEY
- See Also:
- Constant Field Values
-
TRACE_KEY
public static final java.lang.String TRACE_KEY
- See Also:
- Constant Field Values
-
SUB_RANGE_REPAIR_KEY
public static final java.lang.String SUB_RANGE_REPAIR_KEY
- See Also:
- Constant Field Values
-
PULL_REPAIR_KEY
public static final java.lang.String PULL_REPAIR_KEY
- See Also:
- Constant Field Values
-
FORCE_REPAIR_KEY
public static final java.lang.String FORCE_REPAIR_KEY
- See Also:
- Constant Field Values
-
PREVIEW
public static final java.lang.String PREVIEW
- See Also:
- Constant Field Values
-
OPTIMISE_STREAMS_KEY
public static final java.lang.String OPTIMISE_STREAMS_KEY
- See Also:
- Constant Field Values
-
IGNORE_UNREPLICATED_KS
public static final java.lang.String IGNORE_UNREPLICATED_KS
- See Also:
- Constant Field Values
-
REPAIR_PAXOS_KEY
public static final java.lang.String REPAIR_PAXOS_KEY
- See Also:
- Constant Field Values
-
PAXOS_ONLY_KEY
public static final java.lang.String PAXOS_ONLY_KEY
- See Also:
- Constant Field Values
-
MAX_JOB_THREADS
public static final int MAX_JOB_THREADS
- See Also:
- Constant Field Values
-
-
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 parsepartitioner
- 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 java.util.Collection<java.lang.String> getColumnFamilies()
-
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()
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
asMap
public java.util.Map<java.lang.String,java.lang.String> asMap()
-
-