Class RepairOption
java.lang.Object
org.apache.cassandra.repair.messages.RepairOption
Repair options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionRepairOption(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 Summary
Modifier and TypeMethodDescriptionasMap()getHosts()intbooleanbooleanbooleanisGlobal()booleanbooleanbooleanbooleanbooleanbooleanbooleanisTraced()booleanstatic RepairOptionparse(Map<String, String> options, IPartitioner partitioner) Construct RepairOptions object from given map of Strings.parseRanges(String rangesStr, IPartitioner partitioner) booleanbooleantoString()
-
Field Details
-
PARALLELISM_KEY
- See Also:
-
PRIMARY_RANGE_KEY
- See Also:
-
INCREMENTAL_KEY
- See Also:
-
JOB_THREADS_KEY
- See Also:
-
RANGES_KEY
- See Also:
-
COLUMNFAMILIES_KEY
- See Also:
-
DATACENTERS_KEY
- See Also:
-
HOSTS_KEY
- See Also:
-
TRACE_KEY
- See Also:
-
SUB_RANGE_REPAIR_KEY
- See Also:
-
PULL_REPAIR_KEY
- See Also:
-
FORCE_REPAIR_KEY
- See Also:
-
PREVIEW
- See Also:
-
OPTIMISE_STREAMS_KEY
- See Also:
-
IGNORE_UNREPLICATED_KS
- See Also:
-
REPAIR_PAXOS_KEY
- See Also:
-
PAXOS_ONLY_KEY
- See Also:
-
MAX_JOB_THREADS
public static final int MAX_JOB_THREADS- See Also:
-
-
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
-
parse
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
-
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
-
getRanges
-
getDataCenters
-
getHosts
-
isGlobal
public boolean isGlobal() -
isSubrangeRepair
public boolean isSubrangeRepair() -
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
-
asMap
-