You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/01/28 23:51:18 UTC

[1/5] cassandra git commit: Update tools/stress/README.txt

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 160cbc127 -> 71ccc87a7
  refs/heads/trunk a1f65c34f -> 24bc6a038


Update tools/stress/README.txt

patch by ptnapoleon; reviewed by benedict for CASSANDRA-7933


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

Branch: refs/heads/cassandra-2.1
Commit: 7cd1102606d51d8a5ac26ced818d50172acc1007
Parents: 160cbc1
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Wed Jan 28 22:49:33 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Wed Jan 28 22:49:33 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt             |   1 +
 tools/stress/README.txt | 113 +++++++++++++++++++++++++++----------------
 2 files changed, 72 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a38735..c40fc19 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/tools/stress/README.txt
----------------------------------------------------------------------
diff --git a/tools/stress/README.txt b/tools/stress/README.txt
index 9f745c1..0046b25 100644
--- a/tools/stress/README.txt
+++ b/tools/stress/README.txt
@@ -4,55 +4,84 @@ cassandra-stress
 Description
 -----------
 cassandra-stress is a tool for benchmarking and load testing a Cassandra
-cluster.  It is significantly faster than the older py_stress tool.
+cluster. cassandra-stress supports testing arbitrary CQL tables and queries
+to allow users to benchmark their data model.
 
 Setup
 -----
-Run `ant` from the Cassandra source directory, then cassandra-stress can be invoke from tools/bin/cassandra-stress
+Run `ant` from the Cassandra source directory, then cassandra-stress can be invoked from tools/bin/cassandra-stress.
+cassandra-stress supports benchmarking any Cassandra cluster of version 2.0+.
 
 Usage
 -----
-There are three different modes of operation:
-
-    * inserting (loading test data)
-    * reading
-    * range slicing (only works with the OrderPreservingPartioner)
-    * indexed range slicing (works with RandomParitioner on indexed ColumnFamilies)
-
-Important options:
-    -o or --operation:
-        Sets the operation mode, one of 'insert', 'read', 'rangeslice', or 'indexedrangeslice'
-    -n or --num-keys:
-        the number of rows to insert/read/slice; defaults to one million
-    -d or --nodes:
-        the node(s) to perform the test against.  For multiple nodes, supply a
-        comma-separated list without spaces, ex: cassandra1,cassandra2,cassandra3
-    -y or --family-type:
-        Sets the ColumnFamily type.  One of 'Standard' or 'Super'.  If using super,
-        you probably want to set the -u option also.
-    -c or --cells:
-        the number of cells per row, defaults to 5
-    -u or --supercolumns:
-        use the number of supercolumns specified NOTE: you must set the -y
-        option appropriately, or this option has no effect.
-    -g or --get-range-slice-count:
-        This is only used for the rangeslice operation and will *NOT* work with
-        the RandomPartioner.  You must set the OrderPreservingPartioner in your
-        storage-conf.xml (note that you will need to wipe all existing data
-        when switching partioners.)  This option sets the number of rows to
-        slice at a time and defaults to 1000.
-    -r or --random:
-        Only used for reads.  By default, cassandra-stress will perform reads on rows
-        with a guassian distribution, which will cause some repeats.  Setting
-        this option makes the reads completely random instead.
-    -i or --progress-interval:
-        The interval, in seconds, at which progress will be output.
-
-Remember that you must perform inserts before performing reads or range slices.
+There are several operation types:
+
+    * write-only, read-only, and mixed workloads of standard data
+    * write-only and read-only workloads for counter columns
+    * user configured workloads, running custom queries on custom schemas
+    * support for legacy cassandra-stress operations
+
+The syntax is `cassandra-stress <command> [options]`. If you want more information on a given command
+or options, just run `cassandra-stress help <command|option>`.
+
+Commands:
+    read:
+        Multiple concurrent reads - the cluster must first be populated by a write test
+    write:
+        Multiple concurrent writes against the cluster
+    mixed:
+        Interleaving of any basic commands, with configurable ratio and distribution - the cluster must first be populated by a write test
+    counter_write:
+        Multiple concurrent updates of counters.
+    counter_read:
+        Multiple concurrent reads of counters. The cluster must first be populated by a counterwrite test.
+    user:
+        Interleaving of user provided queries, with configurable ratio and distribution.
+        See http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema
+    help:
+        Print help for a command or option
+    print:
+        Inspect the output of a distribution definition
+    legacy:
+        Legacy support mode
+
+Primary Options:
+    -pop:
+        Population distribution and intra-partition visit order
+    -insert:
+        Insert specific options relating to various methods for batching and splitting partition updates
+    -col:
+        Column details such as size and count distribution, data generator, names, comparator and if super columns should be used
+    -rate:
+        Thread count, rate limit or automatic mode (default is auto)
+    -mode:
+        Thrift or CQL with options
+    -errors:
+        How to handle errors when encountered during stress
+    -sample:
+        Specify the number of samples to collect for measuring latency
+    -schema:
+        Replication settings, compression, compaction, etc.
+    -node:
+        Nodes to connect to
+    -log:
+        Where to log progress to, and the interval at which to do it
+    -transport:
+        Custom transport factories
+    -port:
+        The port to connect to cassandra nodes on
+    -sendto:
+        Specify a stress server to send this command to
+
+Suboptions:
+    Every command and primary option has its own collection of suboptions. These are too numerous to list here.
+    For information on the suboptions for each command or option, please use the help command,
+    `cassandra-stress help <command|option>`.
 
 Examples
 --------
 
-    * tools/bin/cassandra-stress -d 192.168.1.101 # 1M inserts to given host
-    * tools/bin/cassandra-stress -d 192.168.1.101 -o read # 1M reads
-    * tools/bin/cassandra-stress -d 192.168.1.101,192.168.1.102 -n 10000000 # 10M inserts spread across two nodes
+    * tools/bin/cassandra-stress write n=1000000 -node 192.168.1.101 # 1M inserts to given host
+    * tools/bin/cassandra-stress read n=10000000 -node 192.168.1.101 -o read # 1M reads
+    * tools/bin/cassandra-stress write -node 192.168.1.101,192.168.1.102 n=10000000 # 10M inserts spread across two nodes
+    * tools/bin/cassandra-stress help -pop # Print help for population distribution option


[3/5] cassandra git commit: ninja add unit test for 7882

Posted by be...@apache.org.
ninja add unit test for 7882


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

Branch: refs/heads/trunk
Commit: 71ccc87a79d161cdf5cf219a276f5bd7313f9c80
Parents: 7cd1102
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Wed Jan 28 22:50:13 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Wed Jan 28 22:50:13 2015 +0000

----------------------------------------------------------------------
 .../utils/memory/NativeAllocatorTest.java       | 111 +++++++++++++++++++
 1 file changed, 111 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71ccc87a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
new file mode 100644
index 0000000..83d6c0c
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
@@ -0,0 +1,111 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.cassandra.utils.memory;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.google.common.util.concurrent.Uninterruptibles;
+
+import org.junit.Test;
+
+import junit.framework.Assert;
+import org.apache.cassandra.utils.concurrent.OpOrder;
+
+public class NativeAllocatorTest
+{
+
+    @Test
+    public void testBookKeeping() throws ExecutionException, InterruptedException
+    {
+        {
+            final ScheduledExecutorService exec = Executors.newScheduledThreadPool(2);
+            final OpOrder order = new OpOrder();
+            final OpOrder.Group group = order.start();
+            final CountDownLatch canClean = new CountDownLatch(1);
+            final CountDownLatch isClean = new CountDownLatch(1);
+            final AtomicReference<NativeAllocator> allocatorRef = new AtomicReference<>();
+            final AtomicReference<OpOrder.Barrier> barrier = new AtomicReference<>();
+            final NativeAllocator allocator = new NativeAllocator(new NativePool(1, 100, 0.75f, new Runnable()
+            {
+                public void run()
+                {
+                    try
+                    {
+                        canClean.await();
+                    }
+                    catch (InterruptedException e)
+                    {
+                        throw new AssertionError();
+                    }
+                    if (isClean.getCount() > 0)
+                    {
+                        allocatorRef.get().offHeap().release(80);
+                        isClean.countDown();
+                    }
+                }
+            }));
+            allocatorRef.set(allocator);
+            final Runnable markBlocking = new Runnable()
+            {
+
+                public void run()
+                {
+                    barrier.set(order.newBarrier());
+                    barrier.get().issue();
+                    barrier.get().markBlocking();
+                }
+            };
+            final Runnable run = new Runnable()
+            {
+                public void run()
+                {
+                    // allocate normal, check accounted and not cleaned
+                    allocator.allocate(10, group);
+                    Assert.assertEquals(10, allocator.offHeap().owns());
+                    Uninterruptibles.sleepUninterruptibly(10L, TimeUnit.MILLISECONDS);
+                    Assert.assertEquals(1, isClean.getCount());
+
+                    // allocate above watermark, check cleaned
+                    allocator.allocate(70, group);
+                    Assert.assertEquals(80, allocator.offHeap().owns());
+                    canClean.countDown();
+                    try
+                    {
+                        isClean.await(10L, TimeUnit.MILLISECONDS);
+                    }
+                    catch (InterruptedException e)
+                    {
+                        throw new AssertionError();
+                    }
+                    Assert.assertEquals(0, isClean.getCount());
+                    Assert.assertEquals(0, allocator.offHeap().owns());
+
+                    // allocate above limit, check we block until "marked blocking"
+                    exec.schedule(markBlocking, 10L, TimeUnit.MILLISECONDS);
+                    allocator.allocate(110, group);
+                    Assert.assertNotNull(barrier.get());
+                    Assert.assertEquals(110, allocator.offHeap().owns());
+                }
+            };
+            exec.submit(run).get();
+        }
+    }
+
+}


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

Posted by be...@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/24bc6a03
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/24bc6a03
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/24bc6a03

Branch: refs/heads/trunk
Commit: 24bc6a0386452b7d3fc5db17e5276cb528c5f7ce
Parents: a1f65c3 71ccc87
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Wed Jan 28 22:51:01 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Wed Jan 28 22:51:01 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 .../utils/memory/NativeAllocatorTest.java       | 111 ++++++++++++++++++
 tools/stress/README.txt                         | 113 ++++++++++++-------
 3 files changed, 183 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/24bc6a03/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7af5b89,c40fc19..ba1539b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,61 -1,5 +1,62 @@@
 +3.0
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 +
 +
  2.1.3
+  * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
   * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
   * Safer Resource Management (CASSANDRA-7705)
   * Make sure we compact highly overlapping cold sstables with


[4/5] cassandra git commit: ninja add unit test for 7882

Posted by be...@apache.org.
ninja add unit test for 7882


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

Branch: refs/heads/cassandra-2.1
Commit: 71ccc87a79d161cdf5cf219a276f5bd7313f9c80
Parents: 7cd1102
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Wed Jan 28 22:50:13 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Wed Jan 28 22:50:13 2015 +0000

----------------------------------------------------------------------
 .../utils/memory/NativeAllocatorTest.java       | 111 +++++++++++++++++++
 1 file changed, 111 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71ccc87a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
new file mode 100644
index 0000000..83d6c0c
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
@@ -0,0 +1,111 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.cassandra.utils.memory;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.google.common.util.concurrent.Uninterruptibles;
+
+import org.junit.Test;
+
+import junit.framework.Assert;
+import org.apache.cassandra.utils.concurrent.OpOrder;
+
+public class NativeAllocatorTest
+{
+
+    @Test
+    public void testBookKeeping() throws ExecutionException, InterruptedException
+    {
+        {
+            final ScheduledExecutorService exec = Executors.newScheduledThreadPool(2);
+            final OpOrder order = new OpOrder();
+            final OpOrder.Group group = order.start();
+            final CountDownLatch canClean = new CountDownLatch(1);
+            final CountDownLatch isClean = new CountDownLatch(1);
+            final AtomicReference<NativeAllocator> allocatorRef = new AtomicReference<>();
+            final AtomicReference<OpOrder.Barrier> barrier = new AtomicReference<>();
+            final NativeAllocator allocator = new NativeAllocator(new NativePool(1, 100, 0.75f, new Runnable()
+            {
+                public void run()
+                {
+                    try
+                    {
+                        canClean.await();
+                    }
+                    catch (InterruptedException e)
+                    {
+                        throw new AssertionError();
+                    }
+                    if (isClean.getCount() > 0)
+                    {
+                        allocatorRef.get().offHeap().release(80);
+                        isClean.countDown();
+                    }
+                }
+            }));
+            allocatorRef.set(allocator);
+            final Runnable markBlocking = new Runnable()
+            {
+
+                public void run()
+                {
+                    barrier.set(order.newBarrier());
+                    barrier.get().issue();
+                    barrier.get().markBlocking();
+                }
+            };
+            final Runnable run = new Runnable()
+            {
+                public void run()
+                {
+                    // allocate normal, check accounted and not cleaned
+                    allocator.allocate(10, group);
+                    Assert.assertEquals(10, allocator.offHeap().owns());
+                    Uninterruptibles.sleepUninterruptibly(10L, TimeUnit.MILLISECONDS);
+                    Assert.assertEquals(1, isClean.getCount());
+
+                    // allocate above watermark, check cleaned
+                    allocator.allocate(70, group);
+                    Assert.assertEquals(80, allocator.offHeap().owns());
+                    canClean.countDown();
+                    try
+                    {
+                        isClean.await(10L, TimeUnit.MILLISECONDS);
+                    }
+                    catch (InterruptedException e)
+                    {
+                        throw new AssertionError();
+                    }
+                    Assert.assertEquals(0, isClean.getCount());
+                    Assert.assertEquals(0, allocator.offHeap().owns());
+
+                    // allocate above limit, check we block until "marked blocking"
+                    exec.schedule(markBlocking, 10L, TimeUnit.MILLISECONDS);
+                    allocator.allocate(110, group);
+                    Assert.assertNotNull(barrier.get());
+                    Assert.assertEquals(110, allocator.offHeap().owns());
+                }
+            };
+            exec.submit(run).get();
+        }
+    }
+
+}


[2/5] cassandra git commit: Update tools/stress/README.txt

Posted by be...@apache.org.
Update tools/stress/README.txt

patch by ptnapoleon; reviewed by benedict for CASSANDRA-7933


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

Branch: refs/heads/trunk
Commit: 7cd1102606d51d8a5ac26ced818d50172acc1007
Parents: 160cbc1
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Wed Jan 28 22:49:33 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Wed Jan 28 22:49:33 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt             |   1 +
 tools/stress/README.txt | 113 +++++++++++++++++++++++++++----------------
 2 files changed, 72 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a38735..c40fc19 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/tools/stress/README.txt
----------------------------------------------------------------------
diff --git a/tools/stress/README.txt b/tools/stress/README.txt
index 9f745c1..0046b25 100644
--- a/tools/stress/README.txt
+++ b/tools/stress/README.txt
@@ -4,55 +4,84 @@ cassandra-stress
 Description
 -----------
 cassandra-stress is a tool for benchmarking and load testing a Cassandra
-cluster.  It is significantly faster than the older py_stress tool.
+cluster. cassandra-stress supports testing arbitrary CQL tables and queries
+to allow users to benchmark their data model.
 
 Setup
 -----
-Run `ant` from the Cassandra source directory, then cassandra-stress can be invoke from tools/bin/cassandra-stress
+Run `ant` from the Cassandra source directory, then cassandra-stress can be invoked from tools/bin/cassandra-stress.
+cassandra-stress supports benchmarking any Cassandra cluster of version 2.0+.
 
 Usage
 -----
-There are three different modes of operation:
-
-    * inserting (loading test data)
-    * reading
-    * range slicing (only works with the OrderPreservingPartioner)
-    * indexed range slicing (works with RandomParitioner on indexed ColumnFamilies)
-
-Important options:
-    -o or --operation:
-        Sets the operation mode, one of 'insert', 'read', 'rangeslice', or 'indexedrangeslice'
-    -n or --num-keys:
-        the number of rows to insert/read/slice; defaults to one million
-    -d or --nodes:
-        the node(s) to perform the test against.  For multiple nodes, supply a
-        comma-separated list without spaces, ex: cassandra1,cassandra2,cassandra3
-    -y or --family-type:
-        Sets the ColumnFamily type.  One of 'Standard' or 'Super'.  If using super,
-        you probably want to set the -u option also.
-    -c or --cells:
-        the number of cells per row, defaults to 5
-    -u or --supercolumns:
-        use the number of supercolumns specified NOTE: you must set the -y
-        option appropriately, or this option has no effect.
-    -g or --get-range-slice-count:
-        This is only used for the rangeslice operation and will *NOT* work with
-        the RandomPartioner.  You must set the OrderPreservingPartioner in your
-        storage-conf.xml (note that you will need to wipe all existing data
-        when switching partioners.)  This option sets the number of rows to
-        slice at a time and defaults to 1000.
-    -r or --random:
-        Only used for reads.  By default, cassandra-stress will perform reads on rows
-        with a guassian distribution, which will cause some repeats.  Setting
-        this option makes the reads completely random instead.
-    -i or --progress-interval:
-        The interval, in seconds, at which progress will be output.
-
-Remember that you must perform inserts before performing reads or range slices.
+There are several operation types:
+
+    * write-only, read-only, and mixed workloads of standard data
+    * write-only and read-only workloads for counter columns
+    * user configured workloads, running custom queries on custom schemas
+    * support for legacy cassandra-stress operations
+
+The syntax is `cassandra-stress <command> [options]`. If you want more information on a given command
+or options, just run `cassandra-stress help <command|option>`.
+
+Commands:
+    read:
+        Multiple concurrent reads - the cluster must first be populated by a write test
+    write:
+        Multiple concurrent writes against the cluster
+    mixed:
+        Interleaving of any basic commands, with configurable ratio and distribution - the cluster must first be populated by a write test
+    counter_write:
+        Multiple concurrent updates of counters.
+    counter_read:
+        Multiple concurrent reads of counters. The cluster must first be populated by a counterwrite test.
+    user:
+        Interleaving of user provided queries, with configurable ratio and distribution.
+        See http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema
+    help:
+        Print help for a command or option
+    print:
+        Inspect the output of a distribution definition
+    legacy:
+        Legacy support mode
+
+Primary Options:
+    -pop:
+        Population distribution and intra-partition visit order
+    -insert:
+        Insert specific options relating to various methods for batching and splitting partition updates
+    -col:
+        Column details such as size and count distribution, data generator, names, comparator and if super columns should be used
+    -rate:
+        Thread count, rate limit or automatic mode (default is auto)
+    -mode:
+        Thrift or CQL with options
+    -errors:
+        How to handle errors when encountered during stress
+    -sample:
+        Specify the number of samples to collect for measuring latency
+    -schema:
+        Replication settings, compression, compaction, etc.
+    -node:
+        Nodes to connect to
+    -log:
+        Where to log progress to, and the interval at which to do it
+    -transport:
+        Custom transport factories
+    -port:
+        The port to connect to cassandra nodes on
+    -sendto:
+        Specify a stress server to send this command to
+
+Suboptions:
+    Every command and primary option has its own collection of suboptions. These are too numerous to list here.
+    For information on the suboptions for each command or option, please use the help command,
+    `cassandra-stress help <command|option>`.
 
 Examples
 --------
 
-    * tools/bin/cassandra-stress -d 192.168.1.101 # 1M inserts to given host
-    * tools/bin/cassandra-stress -d 192.168.1.101 -o read # 1M reads
-    * tools/bin/cassandra-stress -d 192.168.1.101,192.168.1.102 -n 10000000 # 10M inserts spread across two nodes
+    * tools/bin/cassandra-stress write n=1000000 -node 192.168.1.101 # 1M inserts to given host
+    * tools/bin/cassandra-stress read n=10000000 -node 192.168.1.101 -o read # 1M reads
+    * tools/bin/cassandra-stress write -node 192.168.1.101,192.168.1.102 n=10000000 # 10M inserts spread across two nodes
+    * tools/bin/cassandra-stress help -pop # Print help for population distribution option