You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/08/01 15:25:38 UTC

[1/3] git commit: remove seed from stress profile. cleanup yamls. ninja

Repository: cassandra
Updated Branches:
  refs/heads/trunk 24e1bc768 -> 7633d9205


remove seed from stress profile. cleanup yamls. ninja


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d667556d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d667556d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d667556d

Branch: refs/heads/trunk
Commit: d667556d060068a4a93e5331372b92468f0996d8
Parents: 4632673
Author: Jake Luciani <ja...@apache.org>
Authored: Fri Aug 1 09:23:02 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Fri Aug 1 09:23:02 2014 -0400

----------------------------------------------------------------------
 tools/cqlstress-counter-example.yaml            |  7 +---
 tools/cqlstress-example.yaml                    |  8 +----
 tools/cqlstress-insanity-example.yaml           | 18 +++--------
 .../apache/cassandra/stress/StressProfile.java  | 34 +++++++++++---------
 .../org/apache/cassandra/stress/StressYaml.java |  1 -
 5 files changed, 25 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d667556d/tools/cqlstress-counter-example.yaml
----------------------------------------------------------------------
diff --git a/tools/cqlstress-counter-example.yaml b/tools/cqlstress-counter-example.yaml
index a65080a..cff14b6 100644
--- a/tools/cqlstress-counter-example.yaml
+++ b/tools/cqlstress-counter-example.yaml
@@ -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.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d667556d/tools/cqlstress-example.yaml
----------------------------------------------------------------------
diff --git a/tools/cqlstress-example.yaml b/tools/cqlstress-example.yaml
index a997529..d5c90a2 100644
--- a/tools/cqlstress-example.yaml
+++ b/tools/cqlstress-example.yaml
@@ -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.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d667556d/tools/cqlstress-insanity-example.yaml
----------------------------------------------------------------------
diff --git a/tools/cqlstress-insanity-example.yaml b/tools/cqlstress-insanity-example.yaml
index e94c9c3..ef1bb3a 100644
--- a/tools/cqlstress-insanity-example.yaml
+++ b/tools/cqlstress-insanity-example.yaml
@@ -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.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d667556d/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
index 13f26a2..f24ec8c 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
@@ -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"));
-
-            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);
+            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");
+
+                GeneratorConfig config = new GeneratorConfig(seedStr + name, clustering, size, population);
+                columnConfigs.put(name, config);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d667556d/tools/stress/src/org/apache/cassandra/stress/StressYaml.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressYaml.java b/tools/stress/src/org/apache/cassandra/stress/StressYaml.java
index e94fa77..deea1fb 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressYaml.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressYaml.java
@@ -25,7 +25,6 @@ import java.util.Map;
 
 public class StressYaml
 {
-    public String seed;
     public String keyspace;
     public String keyspace_definition;
     public String table;


[2/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

Posted by ja...@apache.org.
Merge branch 'cassandra-2.1.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f5a1c374
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f5a1c374
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f5a1c374

Branch: refs/heads/trunk
Commit: f5a1c374c48898fa934792da680f80ccecf92f30
Parents: b407ebc d667556
Author: Jake Luciani <ja...@apache.org>
Authored: Fri Aug 1 09:24:42 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Fri Aug 1 09:24:42 2014 -0400

----------------------------------------------------------------------
 tools/cqlstress-counter-example.yaml            |  7 +---
 tools/cqlstress-example.yaml                    |  8 +----
 tools/cqlstress-insanity-example.yaml           | 18 +++--------
 .../apache/cassandra/stress/StressProfile.java  | 34 +++++++++++---------
 .../org/apache/cassandra/stress/StressYaml.java |  1 -
 5 files changed, 25 insertions(+), 43 deletions(-)
----------------------------------------------------------------------



[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

Posted by ja...@apache.org.
Merge branch 'cassandra-2.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7633d920
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7633d920
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7633d920

Branch: refs/heads/trunk
Commit: 7633d9205889a0894bc0587522197741bbf7adbf
Parents: 24e1bc7 f5a1c37
Author: Jake Luciani <ja...@apache.org>
Authored: Fri Aug 1 09:25:21 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Fri Aug 1 09:25:21 2014 -0400

----------------------------------------------------------------------
 tools/cqlstress-counter-example.yaml            |  7 +---
 tools/cqlstress-example.yaml                    |  8 +----
 tools/cqlstress-insanity-example.yaml           | 18 +++--------
 .../apache/cassandra/stress/StressProfile.java  | 34 +++++++++++---------
 .../org/apache/cassandra/stress/StressYaml.java |  1 -
 5 files changed, 25 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7633d920/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
----------------------------------------------------------------------