Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Jake Luciani 2014-08-01 09:25:21 -04:00
commit 7633d92058
5 changed files with 23 additions and 41 deletions

View File

@ -52,12 +52,11 @@ table_definition: |
#
# If preceded by ~, the distribution is inverted
#
# Defaults for all columns are size: uniform(1..256), identity: uniform(1..1024)
# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1)
#
columnspec:
- name: name
clustering: uniform(1..100)
size: uniform(1..4)
- name: count
population: fixed(1)
@ -79,7 +78,3 @@ insert:
queries:
simple1: select * from counttest where name = ?
#
# In order to generate data consistently we need something to generate a unique key for this schema profile.
#
seed: changing this string changes the generated data. its hashcode is used as the random seed.

View File

@ -62,13 +62,12 @@ table_definition: |
#
# If preceded by ~, the distribution is inverted
#
# Defaults for all columns are size: uniform(1..256), identity: uniform(1..1024)
# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1)
#
columnspec:
- name: name
size: uniform(1..10)
population: uniform(1..1M) # the range of unique values to select for the field (default is 100Billion)
- name: choice
- name: date
cluster: uniform(1..4)
- name: lval
@ -92,8 +91,3 @@ insert:
queries:
simple1: select * from typestest where name = ? and choice = ? LIMIT 100
range1: select * from typestest where name = ? and choice = ? and date >= ? LIMIT 100
#
# In order to generate data consistently we need something to generate a unique key for this schema profile.
#
seed: changing this string changes the generated data. its hashcode is used as the random seed.

View File

@ -64,26 +64,20 @@ table_definition: |
#
# If preceded by ~, the distribution is inverted
#
# Defaults for all columns are size: uniform(1..256), population: uniform(1..100B)
# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1)
#
columnspec:
- name: name
clustering: uniform(1..4)
- name: date
clustering: gaussian(1..20)
cluster: gaussian(1..20)
- name: lval
population: fixed(1)
- name: dates
clustering: uniform(1..100)
- name: inets
clustering: uniform(1..200)
- name: value
insert:
partitions: fixed(1) # number of unique partitions to update in a single operation
# if perbatch < 1, multiple batches will be used but all partitions will
# occur in all batches (unless already finished); only the row counts will vary
pervisit: uniform(1..10)/100K # ratio of rows each partition should update in a single visit to the partition,
pervisit: uniform(1..10)/10 # ratio of rows each partition should update in a single visit to the partition,
# as a proportion of the total possible for the partition
perbatch: fixed(1)/1 # number of rows each partition should update in a single batch statement,
# as a proportion of the proportion we are inserting this visit
@ -96,7 +90,3 @@ insert:
queries:
simple1: select * from insanitytest where name = ? and choice = ? LIMIT 100
#
# In order to generate data consistently we need something to generate a unique key for this schema profile.
#
seed: changing this string changes the generated data. its hashcode is used as the random seed.

View File

@ -111,7 +111,7 @@ public class StressProfile implements Serializable
keyspaceCql = yaml.keyspace_definition;
tableName = yaml.table;
tableCql = yaml.table_definition;
seedStr = yaml.seed;
seedStr = "seed for stress";
queries = yaml.queries;
insert = yaml.insert;
@ -140,21 +140,25 @@ public class StressProfile implements Serializable
}
columnConfigs = new HashMap<>();
for (Map<String,Object> spec : yaml.columnspec)
if (yaml.columnspec != null)
{
lowerCase(spec);
String name = (String) spec.remove("name");
DistributionFactory population = !spec.containsKey("population") ? null : OptionDistribution.get((String) spec.remove("population"));
DistributionFactory size = !spec.containsKey("size") ? null : OptionDistribution.get((String) spec.remove("size"));
DistributionFactory clustering = !spec.containsKey("cluster") ? null : OptionDistribution.get((String) spec.remove("cluster"));
for (Map<String, Object> spec : yaml.columnspec)
{
lowerCase(spec);
String name = (String) spec.remove("name");
DistributionFactory population = !spec.containsKey("population") ? null : OptionDistribution.get((String) spec.remove("population"));
DistributionFactory size = !spec.containsKey("size") ? null : OptionDistribution.get((String) spec.remove("size"));
DistributionFactory clustering = !spec.containsKey("cluster") ? null : OptionDistribution.get((String) spec.remove("cluster"));
if (!spec.isEmpty())
throw new IllegalArgumentException("Unrecognised option(s) in column spec: " + spec);
if (name == null)
throw new IllegalArgumentException("Missing name argument in column spec");
if (!spec.isEmpty())
throw new IllegalArgumentException("Unrecognised option(s) in column spec: " + spec);
if (name == null)
throw new IllegalArgumentException("Missing name argument in column spec");
GeneratorConfig config = new GeneratorConfig(yaml.seed + name, clustering, size, population);
columnConfigs.put(name, config);
GeneratorConfig config = new GeneratorConfig(seedStr + name, clustering, size, population);
columnConfigs.put(name, config);
}
}
}

View File

@ -25,7 +25,6 @@ import java.util.Map;
public class StressYaml
{
public String seed;
public String keyspace;
public String keyspace_definition;
public String table;