public class RepairOption
extends java.lang.Object
Modifier and Type | Field and 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 |
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 |
SUB_RANGE_REPAIR_KEY |
static java.lang.String |
TRACE_KEY |
Constructor and 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) |
Modifier and Type | Method and 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) |
java.lang.String |
toString() |
public static final java.lang.String PARALLELISM_KEY
public static final java.lang.String PRIMARY_RANGE_KEY
public static final java.lang.String INCREMENTAL_KEY
public static final java.lang.String JOB_THREADS_KEY
public static final java.lang.String RANGES_KEY
public static final java.lang.String COLUMNFAMILIES_KEY
public static final java.lang.String DATACENTERS_KEY
public static final java.lang.String HOSTS_KEY
public static final java.lang.String TRACE_KEY
public static final java.lang.String SUB_RANGE_REPAIR_KEY
public static final java.lang.String PULL_REPAIR_KEY
public static final java.lang.String FORCE_REPAIR_KEY
public static final java.lang.String PREVIEW
public static final java.lang.String OPTIMISE_STREAMS_KEY
public static final java.lang.String IGNORE_UNREPLICATED_KS
public static final int MAX_JOB_THREADS
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)
public static java.util.Set<Range<Token>> parseRanges(java.lang.String rangesStr, IPartitioner partitioner)
public static RepairOption parse(java.util.Map<java.lang.String,java.lang.String> options, IPartitioner partitioner)
Available options are:
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 |
options
- options to parsepartitioner
- partitioner is used to construct token rangespublic RepairParallelism getParallelism()
public boolean isPrimaryRange()
public boolean isIncremental()
public boolean isTraced()
public boolean isPullRepair()
public boolean isForcedRepair()
public int getJobThreads()
public java.util.Collection<java.lang.String> getColumnFamilies()
public java.util.Collection<java.lang.String> getDataCenters()
public java.util.Collection<java.lang.String> getHosts()
public boolean isGlobal()
public boolean isSubrangeRepair()
public PreviewKind getPreviewKind()
public boolean isPreview()
public boolean isInLocalDCOnly()
public boolean optimiseStreams()
public boolean ignoreUnreplicatedKeyspaces()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.String> asMap()
Copyright © 2009-2021 The Apache Software Foundation