diff --git a/cassandra/cluster.py b/cassandra/cluster.py index 293a3c94..15336dfd 100644 --- a/cassandra/cluster.py +++ b/cassandra/cluster.py @@ -206,7 +206,7 @@ class Cluster(object): """ When :attr:`~.Cluster.protocol_version` is 2 or higher, this should be an instance of a subclass of :class:`~cassandra.auth.AuthProvider`, - such ass :class:`~.PlainTextAuthProvider`. + such as :class:`~.PlainTextAuthProvider`. When :attr:`~.Cluster.protocol_version` is 1, this should be a function that accepts one argument, the IP address of a node, @@ -264,12 +264,12 @@ class Cluster(object): metrics_enabled = False """ Whether or not metric collection is enabled. If enabled, :attr:`.metrics` - will be an instance of :class:`.metrics.Metrics`. + will be an instance of :class:`~cassandra.metrics.Metrics`. """ metrics = None """ - An instance of :class:`.metrics.Metrics` if :attr:`.metrics_enabled` is + An instance of :class:`cassandra.metrics.Metrics` if :attr:`.metrics_enabled` is :const:`True`, else :const:`None`. """ diff --git a/cassandra/metrics.py b/cassandra/metrics.py index dcaa1783..8a07c06c 100644 --- a/cassandra/metrics.py +++ b/cassandra/metrics.py @@ -26,6 +26,9 @@ log = logging.getLogger(__name__) class Metrics(object): + """ + A collection of timers and counters for various performance metrics. + """ request_timer = None """ diff --git a/cassandra/query.py b/cassandra/query.py index 3f178539..70fa5f9e 100644 --- a/cassandra/query.py +++ b/cassandra/query.py @@ -227,12 +227,12 @@ class Statement(object): :attr:`~.ConsistencyLevel.QUORUM` read is guaranteed to see that write. But if the regular :attr:`~.consistency_level` of that write is :attr:`~.ConsistencyLevel.ANY`, then only a read with a - :attr`~.consistency_level` of :attr:`~.ConsistencyLevel.SERIAL` is + :attr:`~.consistency_level` of :attr:`~.ConsistencyLevel.SERIAL` is guaranteed to see it (even a read with consistency :attr:`~.ConsistencyLevel.ALL` is not guaranteed to be enough). - The serial consistency can only be one of :attr:`~ConsistencyLevel.SERIAL` - or :attr:`~ConsistencyLevel.LOCAL_SERIAL`. While ``SERIAL`` guarantees full + The serial consistency can only be one of :attr:`~.ConsistencyLevel.SERIAL` + or :attr:`~.ConsistencyLevel.LOCAL_SERIAL`. While ``SERIAL`` guarantees full linearizability (with other ``SERIAL`` updates), ``LOCAL_SERIAL`` only guarantees it in the local data center. @@ -241,7 +241,7 @@ class Statement(object): :attr:`consistency_level`. Serial consistency levels may only be used against Cassandra 2.0+ - and the :attr:`~Cluster.protocol_version` must be set to 2 or higher. + and the :attr:`~.Cluster.protocol_version` must be set to 2 or higher. """) @property diff --git a/docs/api/cassandra/metrics.rst b/docs/api/cassandra/metrics.rst new file mode 100644 index 00000000..755ab429 --- /dev/null +++ b/docs/api/cassandra/metrics.rst @@ -0,0 +1,8 @@ +``cassandra.metrics`` - Performance Metrics +=========================================== + +.. module:: cassandra.metrics + :members: + +.. autoclass:: cassandra.metrics.Metrics () + :members: diff --git a/docs/api/index.rst b/docs/api/index.rst index d8106d10..65545028 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -9,6 +9,7 @@ API Documentation cassandra/policies cassandra/auth cassandra/metadata + cassandra/metrics cassandra/query cassandra/pool cassandra/decoder