public int forceRepairAsync(String keyspace, boolean isSequential, Collection<String> dataCenters, Collection<String> hosts, Collection<Range<Token>> ranges, boolean fullRepair, String... columnFamilies) { return forceRepairAsync(keyspace, isSequential ? RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, ranges, fullRepair, columnFamilies); }
public int forceRepairAsync(String keyspace, boolean isSequential, boolean isLocal, Collection<Range<Token>> ranges, boolean fullRepair, String... columnFamilies) { return forceRepairAsync(keyspace, isSequential ? RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, isLocal, ranges, fullRepair, columnFamilies); }
public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, boolean isLocal, boolean fullRepair, String... columnFamilies) { if (!fullRepair) throw new IllegalArgumentException("Incremental repair can't be requested with subrange repair because " + "each subrange repair would generate an anti-compacted table"); Collection<Range<Token>> repairingRange = createRepairRangeFrom(beginToken, endToken); logger.info("starting user-requested repair of range {} for keyspace {} and column families {}", repairingRange, keyspaceName, columnFamilies); return forceRepairAsync(keyspaceName, isSequential, isLocal, repairingRange, fullRepair, columnFamilies); }
@Deprecated public int forceRepairAsync(String keyspace, boolean isSequential, boolean isLocal, boolean primaryRange, boolean fullRepair, String... tableNames) { Set<String> dataCenters = null; if (isLocal) { dataCenters = Sets.newHashSet(DatabaseDescriptor.getLocalDataCenter()); } return forceRepairAsync(keyspace, isSequential, dataCenters, null, primaryRange, fullRepair, tableNames); }
@Deprecated public int forceRepairAsync(String keyspace, boolean isSequential, boolean isLocal, boolean primaryRange, boolean fullRepair, String... tableNames) { Set<String> dataCenters = null; if (isLocal) { dataCenters = Sets.newHashSet(DatabaseDescriptor.getLocalDataCenter()); } return forceRepairAsync(keyspace, isSequential, dataCenters, null, primaryRange, fullRepair, tableNames); }
@Deprecated public int forceRepairAsync(String keyspace, boolean isSequential, boolean isLocal, boolean primaryRange, boolean fullRepair, String... tableNames) { Set<String> dataCenters = null; if (isLocal) { dataCenters = Sets.newHashSet(DatabaseDescriptor.getLocalDataCenter()); } return forceRepairAsync(keyspace, isSequential, dataCenters, null, primaryRange, fullRepair, tableNames); }
public int forceRepairAsync(String keyspace, boolean isSequential, Collection<String> dataCenters, Collection<String> hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies) throws IOException { return forceRepairAsync(keyspace, isSequential ? RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), dataCenters, hosts, primaryRange, fullRepair, columnFamilies); }
public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, int parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, boolean fullRepair, String... columnFamilies) { if (parallelismDegree < 0 || parallelismDegree > RepairParallelism.values().length - 1) { throw new IllegalArgumentException("Invalid parallelism degree specified: " + parallelismDegree); } Collection<Range<Token>> repairingRange = createRepairRangeFrom(beginToken, endToken); logger.info("starting user-requested repair of range {} for keyspace {} and column families {}", repairingRange, keyspaceName, columnFamilies); RepairParallelism parallelism = RepairParallelism.values()[parallelismDegree]; return forceRepairAsync(keyspaceName, parallelism, dataCenters, hosts, repairingRange, fullRepair, columnFamilies); }
public int forceRepairAsync(String keyspace, boolean isSequential, boolean isLocal, boolean primaryRange, boolean fullRepair, String... columnFamilies) { Collection<Range<Token>> ranges; if (primaryRange) { ranges = isLocal ? getPrimaryRangesWithinDC(keyspace) : getPrimaryRanges(keyspace); } else { ranges = getLocalRanges(keyspace); } return forceRepairAsync(keyspace, isSequential, isLocal, ranges, fullRepair, columnFamilies); }
return forceRepairAsync(keyspaceName, options, true);
return forceRepairAsync(keyspaceName, options, true);
public int forceRepairAsync(String keyspace, int parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies) { if (parallelismDegree < 0 || parallelismDegree > RepairParallelism.values().length - 1) { throw new IllegalArgumentException("Invalid parallelism degree specified: " + parallelismDegree); } Collection<Range<Token>> ranges; if (primaryRange) { // when repairing only primary range, neither dataCenters nor hosts can be set if (dataCenters == null && hosts == null) ranges = getPrimaryRanges(keyspace); // except dataCenters only contain local DC (i.e. -local) else if (dataCenters != null && dataCenters.size() == 1 && dataCenters.contains(DatabaseDescriptor.getLocalDataCenter())) ranges = getPrimaryRangesWithinDC(keyspace); else throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); } else { ranges = getLocalRanges(keyspace); } return forceRepairAsync(keyspace, RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, fullRepair, columnFamilies); }
return forceRepairAsync(keyspaceName, options, true);
public int repairAsync(String keyspace, Map<String, String> repairSpec) { RepairOption option = RepairOption.parse(repairSpec, tokenMetadata.partitioner); // if ranges are not specified if (option.getRanges().isEmpty()) { if (option.isPrimaryRange()) { // when repairing only primary range, neither dataCenters nor hosts can be set if (option.getDataCenters().isEmpty() && option.getHosts().isEmpty()) option.getRanges().addAll(getPrimaryRanges(keyspace)); // except dataCenters only contain local DC (i.e. -local) else if (option.isInLocalDCOnly()) option.getRanges().addAll(getPrimaryRangesWithinDC(keyspace)); else throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); } else { option.getRanges().addAll(getLocalRanges(keyspace)); } } return forceRepairAsync(keyspace, option, false); }
public int repairAsync(String keyspace, Map<String, String> repairSpec) { RepairOption option = RepairOption.parse(repairSpec, tokenMetadata.partitioner); // if ranges are not specified if (option.getRanges().isEmpty()) { if (option.isPrimaryRange()) { // when repairing only primary range, neither dataCenters nor hosts can be set if (option.getDataCenters().isEmpty() && option.getHosts().isEmpty()) option.getRanges().addAll(getPrimaryRanges(keyspace)); // except dataCenters only contain local DC (i.e. -local) else if (option.isInLocalDCOnly()) option.getRanges().addAll(getPrimaryRangesWithinDC(keyspace)); else throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); } else { option.getRanges().addAll(getLocalRanges(keyspace)); } } return forceRepairAsync(keyspace, option, false); }
return forceRepairAsync(keyspace, options, true);
return forceRepairAsync(keyspace, options, true);
public int repairAsync(String keyspace, Map<String, String> repairSpec) { RepairOption option = RepairOption.parse(repairSpec, tokenMetadata.partitioner); // if ranges are not specified if (option.getRanges().isEmpty()) { if (option.isPrimaryRange()) { // when repairing only primary range, neither dataCenters nor hosts can be set if (option.getDataCenters().isEmpty() && option.getHosts().isEmpty()) option.getRanges().addAll(getPrimaryRanges(keyspace)); // except dataCenters only contain local DC (i.e. -local) else if (option.isInLocalDCOnly()) option.getRanges().addAll(getPrimaryRangesWithinDC(keyspace)); else throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); } else { option.getRanges().addAll(getLocalRanges(keyspace)); } } return forceRepairAsync(keyspace, option, false); }
return forceRepairAsync(keyspace, options, true);