Skip to content

Commit 4a911ef

Browse files
author
Brian Cantoni
committed
Doc improvements:
- Explain prerequisites needed for benchmark examples - Minor spelling and other fixes
1 parent a68b1de commit 4a911ef

6 files changed

Lines changed: 25 additions & 14 deletions

File tree

docs/getting_started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ which sets the default keyspace for all queries made through that :class:`~.Sess
6868
session = cluster.connect('mykeyspace')
6969
7070
71-
You can always change a Sesssion's keyspace using :meth:`~.Session.set_keyspace` or
71+
You can always change a Session's keyspace using :meth:`~.Session.set_keyspace` or
7272
by executing a ``USE <keyspace>`` query:
7373

7474
.. code-block:: python
@@ -385,7 +385,7 @@ prepared statement:
385385
user2 = session.execute(user_lookup_stmt, [user_id2])[0]
386386
387387
The second option is to create a :class:`~.BoundStatement` from the
388-
:class:`~.PreparedStatement` and binding paramaters and set a consistency
388+
:class:`~.PreparedStatement` and binding parameters and set a consistency
389389
level on that:
390390
391391
.. code-block:: python

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The driver supports Python 2.6, 2.7, 3.3, and 3.4.
88

99
This driver is open source under the
1010
`Apache v2 License <http://www.apache.org/licenses/LICENSE-2.0.html>`_.
11-
The source code for this driver can be found on `Github <http://github.com/datastax/python-driver>`_.
11+
The source code for this driver can be found on `GitHub <http://github.com/datastax/python-driver>`_.
1212

1313
Contents
1414
--------

docs/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Linux, OSX, and Windows are supported.
1212
Installation through pip
1313
------------------------
1414
`pip <https://pypi.python.org/pypi/pip>`_ is the suggested tool for installing
15-
packages. It will handle installing all python dependencies for the driver at
15+
packages. It will handle installing all Python dependencies for the driver at
1616
the same time as the driver itself. To install the driver*::
1717

1818
pip install cassandra-driver
@@ -102,7 +102,7 @@ When installing manually through setup.py, you can disable both with
102102
the ``--no-extensions`` option, or selectively disable one or the other
103103
with ``--no-murmur3`` and ``--no-libev``.
104104

105-
To compile the extenions, ensure that GCC and the Python headers are available.
105+
To compile the extensions, ensure that GCC and the Python headers are available.
106106

107107
On Ubuntu and Debian, this can be accomplished by running::
108108

docs/performance.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Performance Notes
22
=================
3-
The python driver for Cassandra offers several methods for executing queries.
3+
The Python driver for Cassandra offers several methods for executing queries.
44
You can synchronously block for queries to complete using
55
:meth:`.Session.execute()`, you can use a future-like interface through
66
:meth:`.Session.execute_async()`, or you can attach a callback to the future
@@ -13,7 +13,7 @@ Benchmark Notes
1313
All benchmarks were executed using the
1414
`benchmark scripts <https://github.com/datastax/python-driver/tree/master/benchmarks>`_
1515
in the driver repository. They were executed on a laptop with 16 GiB of RAM, an SSD,
16-
and a 2 GHz, four core CPU with hyperthreading. The Cassandra cluster was a three
16+
and a 2 GHz, four core CPU with hyper-threading. The Cassandra cluster was a three
1717
node `ccm <https://github.com/pcmanus/ccm>`_ cluster running on the same laptop
1818
with version 1.2.13 of Cassandra. I suggest testing these benchmarks against your
1919
own cluster when tuning the driver for optimal throughput or latency.
@@ -26,6 +26,17 @@ by using the ``--asyncore-only`` command line option.
2626
Each benchmark completes 100,000 small inserts. The replication factor for the
2727
keyspace was three, so all nodes were replicas for the inserted rows.
2828

29+
The benchmarks require the Python driver C extensions as well as a few additional
30+
Python packages. Follow these steps to install the prerequisites:
31+
32+
1. Install packages to support Python driver C extensions:
33+
34+
* Debian/Ubuntu: ``sudo apt-get install gcc python-dev libev4 libev-dev``
35+
* RHEL/CentOS/Fedora: ``sudo yum install gcc python-dev libev4 libev-dev``
36+
37+
2. Install Python packages: ``pip install scales twisted blist``
38+
3. Re-install the Cassandra driver: ``pip install --upgrade cassandra-driver``
39+
2940
Synchronous Execution (`sync.py <https://github.com/datastax/python-driver/blob/master/benchmarks/sync.py>`_)
3041
-------------------------------------------------------------------------------------------------------------
3142
Although this is the simplest way to make queries, it has low throughput
@@ -173,7 +184,7 @@ Callback Chaining (`callback_full_pipeline.py <https://github.com/datastax/pytho
173184
-----------------------------------------------------------------------------------------------------------------------------------------------
174185
This pattern is very different from the previous patterns. Here we're taking
175186
advantage of the :meth:`.ResponseFuture.add_callback()` function to start
176-
another request as soon as one finishes. Futhermore, we're starting 120
187+
another request as soon as one finishes. Furthermore, we're starting 120
177188
of these callback chains, so we've always got about 120 operations in
178189
flight at any time:
179190

@@ -243,7 +254,7 @@ dramatically:
243254
Average throughput: 679.61/sec
244255
245256
When :attr:`.Cluster.protocol_version` is set to 1 or 2, you should limit the
246-
number of callback chains you run to rougly 100 per node in the cluster.
257+
number of callback chains you run to roughly 100 per node in the cluster.
247258
When :attr:`~.Cluster.protocol_version` is 3 or higher, you can safely experiment
248259
with higher numbers of callback chains.
249260

docs/upgrading.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Upgrading
66

77
Upgrading to 2.1 from 2.0
88
-------------------------
9-
Version 2.1 of the Datastax python driver for Apache Cassandra
9+
Version 2.1 of the DataStax Python driver for Apache Cassandra
1010
adds support for Cassandra 2.1 and version 3 of the native protocol.
1111

1212
Cassandra 1.2, 2.0, and 2.1 are all supported. However, 1.2 only
@@ -68,7 +68,7 @@ See :ref:`udts` for more details.
6868
Customizing Encoders for Non-prepared Statements
6969
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7070
Starting with version 2.1 of the driver, it is possible to customize
71-
how python types are converted to CQL literals when working with
71+
how Python types are converted to CQL literals when working with
7272
non-prepared statements. This is done on a per-:class:`~.Session`
7373
basis through :attr:`.Session.encoder`:
7474

@@ -94,7 +94,7 @@ timestamp generated by the driver.
9494

9595
Upgrading to 2.0 from 1.x
9696
-------------------------
97-
Version 2.0 of the DataStax python driver for Apache Cassandra
97+
Version 2.0 of the DataStax Python driver for Apache Cassandra
9898
includes some notable improvements over version 1.x. This version
9999
of the driver supports Cassandra 1.2, 2.0, and 2.1. However, not
100100
all features may be used with Cassandra 1.2, and some new features

docs/user_defined_types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ new type through ``CREATE TYPE`` statements in CQL::
77

88
CREATE TYPE address (street text, zip int);
99

10-
Version 2.1 of the python driver adds support for user-defined types.
10+
Version 2.1 of the Python driver adds support for user-defined types.
1111

1212
Registering a Class to Map to a UDT
1313
-----------------------------------
14-
You can tell the python driver to return columns of a specific UDT as
14+
You can tell the Python driver to return columns of a specific UDT as
1515
instances of a class by registering them with your :class:`~.Cluster`
1616
instance through :meth:`.Cluster.register_user_type`:
1717

0 commit comments

Comments
 (0)