mirror of https://github.com/apache/cassandra
Fix default ratio in stress (ninja)
This commit is contained in:
parent
ee6fb19eeb
commit
f708c1e416
|
|
@ -87,7 +87,7 @@ public class OptionRatioDistribution extends Option
|
|||
return new DelegateFactory(delegate.get(), divisor);
|
||||
if (defaultSpec == null)
|
||||
return null;
|
||||
OptionRatioDistribution sub = new OptionRatioDistribution(delegate.prefix, null, null, true);
|
||||
OptionRatioDistribution sub = new OptionRatioDistribution("", null, null, true);
|
||||
if (!sub.accept(defaultSpec))
|
||||
throw new IllegalStateException("Invalid default spec: " + defaultSpec);
|
||||
return sub.get();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ public class SettingsInsert implements Serializable
|
|||
this.selectRatio = options.selectRatio.get();
|
||||
this.rowPopulationRatio = options.rowPopulationRatio.get();
|
||||
|
||||
|
||||
|
||||
this.batchType = !options.batchType.setByUser() ? null : BatchStatement.Type.valueOf(options.batchType.value());
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +62,7 @@ public class SettingsInsert implements Serializable
|
|||
final OptionDistribution partitions = new OptionDistribution("partitions=", null, "The number of partitions to update in a single batch", false);
|
||||
final OptionSimple batchType = new OptionSimple("batchtype=", "unlogged|logged|counter", null, "Specify the type of batch statement (LOGGED, UNLOGGED or COUNTER)", false);
|
||||
final OptionRatioDistribution selectRatio = new OptionRatioDistribution("select-ratio=", null, "The uniform probability of visiting any CQL row in the generated partition", false);
|
||||
final OptionRatioDistribution rowPopulationRatio = new OptionRatioDistribution("row-population-ratio=", null, "The percent of a given rows columns to populate", false);
|
||||
final OptionRatioDistribution rowPopulationRatio = new OptionRatioDistribution("row-population-ratio=", "fixed(1)/1", "The percent of a given rows columns to populate", false);
|
||||
|
||||
@Override
|
||||
public List<? extends Option> options()
|
||||
|
|
|
|||
Loading…
Reference in New Issue