forked from apache/cassandra-python-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcassandra.html
More file actions
626 lines (524 loc) · 42.5 KB
/
cassandra.html
File metadata and controls
626 lines (524 loc) · 42.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0; URL=https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/">
<link rel="canonical" href="https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/">
<title>cassandra - Exceptions and Enums — Cassandra Driver 3.13.0 documentation</title>
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '3.13.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="cassandra.cluster - Clusters and Sessions" href="cassandra/cluster.html" />
<link rel="prev" title="API Documentation" href="index.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-cassandra">
<span id="cassandra-exceptions-and-enums"></span><h1><a class="reference internal" href="#module-cassandra" title="cassandra"><code class="xref py py-mod docutils literal"><span class="pre">cassandra</span></code></a> - Exceptions and Enums<a class="headerlink" href="#module-cassandra" title="Permalink to this headline">¶</a></h1>
<dl class="data">
<dt id="cassandra.__version_info__">
<code class="descclassname">cassandra.</code><code class="descname">__version_info__</code><a class="headerlink" href="#cassandra.__version_info__" title="Permalink to this definition">¶</a></dt>
<dd><p>The version of the driver in a tuple format</p>
</dd></dl>
<dl class="data">
<dt id="cassandra.__version__">
<code class="descclassname">cassandra.</code><code class="descname">__version__</code><a class="headerlink" href="#cassandra.__version__" title="Permalink to this definition">¶</a></dt>
<dd><p>The version of the driver in a string format</p>
</dd></dl>
<dl class="class">
<dt id="cassandra.ConsistencyLevel">
<em class="property">class </em><code class="descclassname">cassandra.</code><code class="descname">ConsistencyLevel</code><a class="reference internal" href="../_modules/cassandra.html#ConsistencyLevel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ConsistencyLevel" title="Permalink to this definition">¶</a></dt>
<dd><p>Spcifies how many replicas must respond for an operation to be considered
a success. By default, <code class="docutils literal"><span class="pre">ONE</span></code> is used for all operations.</p>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.ANY">
<code class="descname">ANY</code><em class="property"> = 0</em><a class="headerlink" href="#cassandra.ConsistencyLevel.ANY" title="Permalink to this definition">¶</a></dt>
<dd><p>Only requires that one replica receives the write <em>or</em> the coordinator
stores a hint to replay later. Valid only for writes.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.ONE">
<code class="descname">ONE</code><em class="property"> = 1</em><a class="headerlink" href="#cassandra.ConsistencyLevel.ONE" title="Permalink to this definition">¶</a></dt>
<dd><p>Only one replica needs to respond to consider the operation a success</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.TWO">
<code class="descname">TWO</code><em class="property"> = 2</em><a class="headerlink" href="#cassandra.ConsistencyLevel.TWO" title="Permalink to this definition">¶</a></dt>
<dd><p>Two replicas must respond to consider the operation a success</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.THREE">
<code class="descname">THREE</code><em class="property"> = 3</em><a class="headerlink" href="#cassandra.ConsistencyLevel.THREE" title="Permalink to this definition">¶</a></dt>
<dd><p>Three replicas must respond to consider the operation a success</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.QUORUM">
<code class="descname">QUORUM</code><em class="property"> = 4</em><a class="headerlink" href="#cassandra.ConsistencyLevel.QUORUM" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">ceil(RF/2)</span></code> replicas must respond to consider the operation a success</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.ALL">
<code class="descname">ALL</code><em class="property"> = 5</em><a class="headerlink" href="#cassandra.ConsistencyLevel.ALL" title="Permalink to this definition">¶</a></dt>
<dd><p>All replicas must respond to consider the operation a success</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.LOCAL_QUORUM">
<code class="descname">LOCAL_QUORUM</code><em class="property"> = 6</em><a class="headerlink" href="#cassandra.ConsistencyLevel.LOCAL_QUORUM" title="Permalink to this definition">¶</a></dt>
<dd><p>Requires a quorum of replicas in the local datacenter</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.EACH_QUORUM">
<code class="descname">EACH_QUORUM</code><em class="property"> = 7</em><a class="headerlink" href="#cassandra.ConsistencyLevel.EACH_QUORUM" title="Permalink to this definition">¶</a></dt>
<dd><p>Requires a quorum of replicas in each datacenter</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.SERIAL">
<code class="descname">SERIAL</code><em class="property"> = 8</em><a class="headerlink" href="#cassandra.ConsistencyLevel.SERIAL" title="Permalink to this definition">¶</a></dt>
<dd><p>For conditional inserts/updates that utilize Cassandra’s lightweight
transactions, this requires consensus among all replicas for the
modified data.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.LOCAL_SERIAL">
<code class="descname">LOCAL_SERIAL</code><em class="property"> = 9</em><a class="headerlink" href="#cassandra.ConsistencyLevel.LOCAL_SERIAL" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <a class="reference internal" href="#cassandra.ConsistencyLevel.SERIAL" title="cassandra.ConsistencyLevel.SERIAL"><code class="xref py py-attr docutils literal"><span class="pre">SERIAL</span></code></a>, but only requires consensus
among replicas in the local datacenter.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ConsistencyLevel.LOCAL_ONE">
<code class="descname">LOCAL_ONE</code><em class="property"> = 10</em><a class="headerlink" href="#cassandra.ConsistencyLevel.LOCAL_ONE" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a request only to replicas in the local datacenter and waits for
one response.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="cassandra.ProtocolVersion">
<em class="property">class </em><code class="descclassname">cassandra.</code><code class="descname">ProtocolVersion</code><a class="reference internal" href="../_modules/cassandra.html#ProtocolVersion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ProtocolVersion" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines native protocol versions supported by this driver.</p>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.V1">
<code class="descname">V1</code><em class="property"> = 1</em><a class="headerlink" href="#cassandra.ProtocolVersion.V1" title="Permalink to this definition">¶</a></dt>
<dd><p>v1, supported in Cassandra 1.2–>2.2</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.V2">
<code class="descname">V2</code><em class="property"> = 2</em><a class="headerlink" href="#cassandra.ProtocolVersion.V2" title="Permalink to this definition">¶</a></dt>
<dd><p>v2, supported in Cassandra 2.0–>2.2;
added support for lightweight transactions, batch operations, and automatic query paging.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.V3">
<code class="descname">V3</code><em class="property"> = 3</em><a class="headerlink" href="#cassandra.ProtocolVersion.V3" title="Permalink to this definition">¶</a></dt>
<dd><p>v3, supported in Cassandra 2.1–>3.x+;
added support for protocol-level client-side timestamps (see <a class="reference internal" href="cassandra/cluster.html#cassandra.cluster.Session.use_client_timestamp" title="cassandra.cluster.Session.use_client_timestamp"><code class="xref py py-attr docutils literal"><span class="pre">Session.use_client_timestamp</span></code></a>),
serial consistency levels for <a class="reference internal" href="cassandra/query.html#cassandra.query.BatchStatement" title="cassandra.query.BatchStatement"><code class="xref py py-class docutils literal"><span class="pre">BatchStatement</span></code></a>, and an improved connection pool.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.V4">
<code class="descname">V4</code><em class="property"> = 4</em><a class="headerlink" href="#cassandra.ProtocolVersion.V4" title="Permalink to this definition">¶</a></dt>
<dd><p>v4, supported in Cassandra 2.2–>3.x+;
added a number of new types, server warnings, new failure messages, and custom payloads. Details in the
<a class="reference external" href="https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec">project docs</a></p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.V5">
<code class="descname">V5</code><em class="property"> = 5</em><a class="headerlink" href="#cassandra.ProtocolVersion.V5" title="Permalink to this definition">¶</a></dt>
<dd><p>v5, in beta from 3.x+</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.SUPPORTED_VERSIONS">
<code class="descname">SUPPORTED_VERSIONS</code><em class="property"> = (5, 4, 3, 2, 1)</em><a class="headerlink" href="#cassandra.ProtocolVersion.SUPPORTED_VERSIONS" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple of all supported protocol versions</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.BETA_VERSIONS">
<code class="descname">BETA_VERSIONS</code><em class="property"> = (5,)</em><a class="headerlink" href="#cassandra.ProtocolVersion.BETA_VERSIONS" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple of all beta protocol versions</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.MIN_SUPPORTED">
<code class="descname">MIN_SUPPORTED</code><em class="property"> = 1</em><a class="headerlink" href="#cassandra.ProtocolVersion.MIN_SUPPORTED" title="Permalink to this definition">¶</a></dt>
<dd><p>Minimum protocol version supported by this driver.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.ProtocolVersion.MAX_SUPPORTED">
<code class="descname">MAX_SUPPORTED</code><em class="property"> = 5</em><a class="headerlink" href="#cassandra.ProtocolVersion.MAX_SUPPORTED" title="Permalink to this definition">¶</a></dt>
<dd><p>Maximum protocol versioni supported by this driver.</p>
</dd></dl>
<dl class="classmethod">
<dt id="cassandra.ProtocolVersion.get_lower_supported">
<em class="property">classmethod </em><code class="descname">get_lower_supported</code><span class="sig-paren">(</span><em>previous_version</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/cassandra.html#ProtocolVersion.get_lower_supported"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ProtocolVersion.get_lower_supported" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the lower supported protocol version. Beta versions are omitted.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="cassandra.UserFunctionDescriptor">
<em class="property">class </em><code class="descclassname">cassandra.</code><code class="descname">UserFunctionDescriptor</code><span class="sig-paren">(</span><em>name</em>, <em>argument_types</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/cassandra.html#UserFunctionDescriptor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.UserFunctionDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Describes a User function by name and argument signature</p>
<dl class="attribute">
<dt id="cassandra.UserFunctionDescriptor.name">
<code class="descname">name</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.UserFunctionDescriptor.name" title="Permalink to this definition">¶</a></dt>
<dd><p>name of the function</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.UserFunctionDescriptor.argument_types">
<code class="descname">argument_types</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.UserFunctionDescriptor.argument_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Ordered list of CQL argument type names comprising the type signature</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.UserFunctionDescriptor.signature">
<code class="descname">signature</code><a class="headerlink" href="#cassandra.UserFunctionDescriptor.signature" title="Permalink to this definition">¶</a></dt>
<dd><p>function signature string in the form ‘name([type0[,type1[…]]])’</p>
<p>can be used to uniquely identify overloaded function names within a keyspace</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="cassandra.UserAggregateDescriptor">
<em class="property">class </em><code class="descclassname">cassandra.</code><code class="descname">UserAggregateDescriptor</code><span class="sig-paren">(</span><em>name</em>, <em>argument_types</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/cassandra.html#UserAggregateDescriptor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.UserAggregateDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Describes a User aggregate function by name and argument signature</p>
<dl class="attribute">
<dt id="cassandra.UserAggregateDescriptor.name">
<code class="descname">name</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.UserAggregateDescriptor.name" title="Permalink to this definition">¶</a></dt>
<dd><p>name of the aggregate</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.UserAggregateDescriptor.argument_types">
<code class="descname">argument_types</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.UserAggregateDescriptor.argument_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Ordered list of CQL argument type names comprising the type signature</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.UserAggregateDescriptor.signature">
<code class="descname">signature</code><a class="headerlink" href="#cassandra.UserAggregateDescriptor.signature" title="Permalink to this definition">¶</a></dt>
<dd><p>function signature string in the form ‘name([type0[,type1[…]]])’</p>
<p>can be used to uniquely identify overloaded function names within a keyspace</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.DriverException">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">DriverException</code><a class="reference internal" href="../_modules/cassandra.html#DriverException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.DriverException" title="Permalink to this definition">¶</a></dt>
<dd><p>Base for all exceptions explicitly raised by the driver.</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.RequestExecutionException">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">RequestExecutionException</code><a class="reference internal" href="../_modules/cassandra.html#RequestExecutionException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.RequestExecutionException" title="Permalink to this definition">¶</a></dt>
<dd><p>Base for request execution exceptions returned from the server.</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.Unavailable">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">Unavailable</code><a class="reference internal" href="../_modules/cassandra.html#Unavailable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.Unavailable" title="Permalink to this definition">¶</a></dt>
<dd><p>There were not enough live replicas to satisfy the requested consistency
level, so the coordinator node immediately failed the request without
forwarding it to any replicas.</p>
<dl class="attribute">
<dt id="cassandra.Unavailable.consistency">
<code class="descname">consistency</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Unavailable.consistency" title="Permalink to this definition">¶</a></dt>
<dd><p>The requested <a class="reference internal" href="#cassandra.ConsistencyLevel" title="cassandra.ConsistencyLevel"><code class="xref py py-class docutils literal"><span class="pre">ConsistencyLevel</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.Unavailable.required_replicas">
<code class="descname">required_replicas</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Unavailable.required_replicas" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of replicas that needed to be live to complete the operation</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.Unavailable.alive_replicas">
<code class="descname">alive_replicas</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Unavailable.alive_replicas" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of replicas that were actually alive</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.Timeout">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">Timeout</code><a class="reference internal" href="../_modules/cassandra.html#Timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.Timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Replicas failed to respond to the coordinator node before timing out.</p>
<dl class="attribute">
<dt id="cassandra.Timeout.consistency">
<code class="descname">consistency</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Timeout.consistency" title="Permalink to this definition">¶</a></dt>
<dd><p>The requested <a class="reference internal" href="#cassandra.ConsistencyLevel" title="cassandra.ConsistencyLevel"><code class="xref py py-class docutils literal"><span class="pre">ConsistencyLevel</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.Timeout.required_responses">
<code class="descname">required_responses</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Timeout.required_responses" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of required replica responses</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.Timeout.received_responses">
<code class="descname">received_responses</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.Timeout.received_responses" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of replicas that responded before the coordinator timed out
the operation</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.ReadTimeout">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">ReadTimeout</code><a class="reference internal" href="../_modules/cassandra.html#ReadTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ReadTimeout" title="Permalink to this definition">¶</a></dt>
<dd><p>A subclass of <a class="reference internal" href="#cassandra.Timeout" title="cassandra.Timeout"><code class="xref py py-exc docutils literal"><span class="pre">Timeout</span></code></a> for read operations.</p>
<p>This indicates that the replicas failed to respond to the coordinator
node before the configured timeout. This timeout is configured in
<code class="docutils literal"><span class="pre">cassandra.yaml</span></code> with the <code class="docutils literal"><span class="pre">read_request_timeout_in_ms</span></code>
and <code class="docutils literal"><span class="pre">range_request_timeout_in_ms</span></code> options.</p>
<dl class="attribute">
<dt id="cassandra.ReadTimeout.data_retrieved">
<code class="descname">data_retrieved</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.ReadTimeout.data_retrieved" title="Permalink to this definition">¶</a></dt>
<dd><p>A boolean indicating whether the requested data was retrieved
by the coordinator from any replicas before it timed out the
operation</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.WriteTimeout">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">WriteTimeout</code><a class="reference internal" href="../_modules/cassandra.html#WriteTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.WriteTimeout" title="Permalink to this definition">¶</a></dt>
<dd><p>A subclass of <a class="reference internal" href="#cassandra.Timeout" title="cassandra.Timeout"><code class="xref py py-exc docutils literal"><span class="pre">Timeout</span></code></a> for write operations.</p>
<p>This indicates that the replicas failed to respond to the coordinator
node before the configured timeout. This timeout is configured in
<code class="docutils literal"><span class="pre">cassandra.yaml</span></code> with the <code class="docutils literal"><span class="pre">write_request_timeout_in_ms</span></code>
option.</p>
<dl class="attribute">
<dt id="cassandra.WriteTimeout.write_type">
<code class="descname">write_type</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.WriteTimeout.write_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The type of write operation, enum on <a class="reference internal" href="cassandra/policies.html#cassandra.policies.WriteType" title="cassandra.policies.WriteType"><code class="xref py py-class docutils literal"><span class="pre">WriteType</span></code></a></p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.CoordinationFailure">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">CoordinationFailure</code><a class="reference internal" href="../_modules/cassandra.html#CoordinationFailure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.CoordinationFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>Replicas sent a failure to the coordinator.</p>
<dl class="attribute">
<dt id="cassandra.CoordinationFailure.consistency">
<code class="descname">consistency</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.CoordinationFailure.consistency" title="Permalink to this definition">¶</a></dt>
<dd><p>The requested <a class="reference internal" href="#cassandra.ConsistencyLevel" title="cassandra.ConsistencyLevel"><code class="xref py py-class docutils literal"><span class="pre">ConsistencyLevel</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.CoordinationFailure.required_responses">
<code class="descname">required_responses</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.CoordinationFailure.required_responses" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of required replica responses</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.CoordinationFailure.received_responses">
<code class="descname">received_responses</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.CoordinationFailure.received_responses" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of replicas that responded before the coordinator timed out
the operation</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.CoordinationFailure.failures">
<code class="descname">failures</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.CoordinationFailure.failures" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of replicas that sent a failure message</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.CoordinationFailure.error_code_map">
<code class="descname">error_code_map</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.CoordinationFailure.error_code_map" title="Permalink to this definition">¶</a></dt>
<dd><p>A map of inet addresses to error codes representing replicas that sent
a failure message. Only set when <cite>protocol_version</cite> is 5 or higher.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.ReadFailure">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">ReadFailure</code><a class="reference internal" href="../_modules/cassandra.html#ReadFailure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ReadFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>A subclass of <a class="reference internal" href="#cassandra.CoordinationFailure" title="cassandra.CoordinationFailure"><code class="xref py py-exc docutils literal"><span class="pre">CoordinationFailure</span></code></a> for read operations.</p>
<p>This indicates that the replicas sent a failure message to the coordinator.</p>
<dl class="attribute">
<dt id="cassandra.ReadFailure.data_retrieved">
<code class="descname">data_retrieved</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.ReadFailure.data_retrieved" title="Permalink to this definition">¶</a></dt>
<dd><p>A boolean indicating whether the requested data was retrieved
by the coordinator from any replicas before it timed out the
operation</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.WriteFailure">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">WriteFailure</code><a class="reference internal" href="../_modules/cassandra.html#WriteFailure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.WriteFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>A subclass of <a class="reference internal" href="#cassandra.CoordinationFailure" title="cassandra.CoordinationFailure"><code class="xref py py-exc docutils literal"><span class="pre">CoordinationFailure</span></code></a> for write operations.</p>
<p>This indicates that the replicas sent a failure message to the coordinator.</p>
<dl class="attribute">
<dt id="cassandra.WriteFailure.write_type">
<code class="descname">write_type</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.WriteFailure.write_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The type of write operation, enum on <a class="reference internal" href="cassandra/policies.html#cassandra.policies.WriteType" title="cassandra.policies.WriteType"><code class="xref py py-class docutils literal"><span class="pre">WriteType</span></code></a></p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.FunctionFailure">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">FunctionFailure</code><a class="reference internal" href="../_modules/cassandra.html#FunctionFailure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.FunctionFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>User Defined Function failed during execution</p>
<dl class="attribute">
<dt id="cassandra.FunctionFailure.keyspace">
<code class="descname">keyspace</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.FunctionFailure.keyspace" title="Permalink to this definition">¶</a></dt>
<dd><p>Keyspace of the function</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.FunctionFailure.function">
<code class="descname">function</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.FunctionFailure.function" title="Permalink to this definition">¶</a></dt>
<dd><p>Name of the function</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.FunctionFailure.arg_types">
<code class="descname">arg_types</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.FunctionFailure.arg_types" title="Permalink to this definition">¶</a></dt>
<dd><p>List of argument type names of the function</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.RequestValidationException">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">RequestValidationException</code><a class="reference internal" href="../_modules/cassandra.html#RequestValidationException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.RequestValidationException" title="Permalink to this definition">¶</a></dt>
<dd><p>Server request validation failed</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.ConfigurationException">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">ConfigurationException</code><a class="reference internal" href="../_modules/cassandra.html#ConfigurationException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.ConfigurationException" title="Permalink to this definition">¶</a></dt>
<dd><p>Server indicated request errro due to current configuration</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.AlreadyExists">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">AlreadyExists</code><a class="reference internal" href="../_modules/cassandra.html#AlreadyExists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.AlreadyExists" title="Permalink to this definition">¶</a></dt>
<dd><p>An attempt was made to create a keyspace or table that already exists.</p>
<dl class="attribute">
<dt id="cassandra.AlreadyExists.keyspace">
<code class="descname">keyspace</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.AlreadyExists.keyspace" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the keyspace that already exists, or, if an attempt was
made to create a new table, the keyspace that the table is in.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.AlreadyExists.table">
<code class="descname">table</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.AlreadyExists.table" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the table that already exists, or, if an attempt was
make to create a keyspace, <code class="xref py py-const docutils literal"><span class="pre">None</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="cassandra.InvalidRequest">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">InvalidRequest</code><a class="reference internal" href="../_modules/cassandra.html#InvalidRequest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.InvalidRequest" title="Permalink to this definition">¶</a></dt>
<dd><p>A query was made that was invalid for some reason, such as trying to set
the keyspace for a connection to a nonexistent keyspace.</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.Unauthorized">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">Unauthorized</code><a class="reference internal" href="../_modules/cassandra.html#Unauthorized"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.Unauthorized" title="Permalink to this definition">¶</a></dt>
<dd><p>The current user is not authorized to perform the requested operation.</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.AuthenticationFailed">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">AuthenticationFailed</code><a class="reference internal" href="../_modules/cassandra.html#AuthenticationFailed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.AuthenticationFailed" title="Permalink to this definition">¶</a></dt>
<dd><p>Failed to authenticate.</p>
</dd></dl>
<dl class="exception">
<dt id="cassandra.OperationTimedOut">
<em class="property">exception </em><code class="descclassname">cassandra.</code><code class="descname">OperationTimedOut</code><a class="reference internal" href="../_modules/cassandra.html#OperationTimedOut"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cassandra.OperationTimedOut" title="Permalink to this definition">¶</a></dt>
<dd><p>The operation took longer than the specified (client-side) timeout
to complete. This is not an error generated by Cassandra, only
the driver.</p>
<dl class="attribute">
<dt id="cassandra.OperationTimedOut.errors">
<code class="descname">errors</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.OperationTimedOut.errors" title="Permalink to this definition">¶</a></dt>
<dd><p>A dict of errors keyed by the <a class="reference internal" href="cassandra/pool.html#cassandra.pool.Host" title="cassandra.pool.Host"><code class="xref py py-class docutils literal"><span class="pre">Host</span></code></a> against which they occurred.</p>
</dd></dl>
<dl class="attribute">
<dt id="cassandra.OperationTimedOut.last_host">
<code class="descname">last_host</code><em class="property"> = None</em><a class="headerlink" href="#cassandra.OperationTimedOut.last_host" title="Permalink to this definition">¶</a></dt>
<dd><p>The last <a class="reference internal" href="cassandra/pool.html#cassandra.pool.Host" title="cassandra.pool.Host"><code class="xref py py-class docutils literal"><span class="pre">Host</span></code></a> this operation was attempted against.</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">Cassandra Driver</a></h1>
<p class="blurb">Python driver for Cassandra</p>
<p>
<iframe src="https://ghbtns.com/github-btn.html?user=datastax&repo=python-driver&type=star&count=true&size=large&v=2"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">API Documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html#core-driver">Core Driver</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">cassandra</span></code> - Exceptions and Enums</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/cluster.html"><code class="docutils literal"><span class="pre">cassandra.cluster</span></code> - Clusters and Sessions</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/policies.html"><code class="docutils literal"><span class="pre">cassandra.policies</span></code> - Load balancing and Failure Handling Policies</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/auth.html"><code class="docutils literal"><span class="pre">cassandra.auth</span></code> - Authentication</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/metadata.html"><code class="docutils literal"><span class="pre">cassandra.metadata</span></code> - Schema and Ring Topology</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/metrics.html"><code class="docutils literal"><span class="pre">cassandra.metrics</span></code> - Performance Metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/query.html"><code class="docutils literal"><span class="pre">cassandra.query</span></code> - Prepared Statements, Batch Statements, Tracing, and Row Factories</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/pool.html"><code class="docutils literal"><span class="pre">cassandra.pool</span></code> - Hosts and Connection Pools</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/protocol.html"><code class="docutils literal"><span class="pre">cassandra.protocol</span></code> - Protocol Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/encoder.html"><code class="docutils literal"><span class="pre">cassandra.encoder</span></code> - Encoders for non-prepared Statements</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/decoder.html"><code class="docutils literal"><span class="pre">cassandra.decoder</span></code> - Data Return Formats</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/concurrent.html"><code class="docutils literal"><span class="pre">cassandra.concurrent</span></code> - Utilities for Concurrent Statement Execution</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/connection.html"><code class="docutils literal"><span class="pre">cassandra.connection</span></code> - Low Level Connection Info</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/util.html"><code class="docutils literal"><span class="pre">cassandra.util</span></code> - Utilities</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/asyncioreactor.html"><code class="docutils literal"><span class="pre">cassandra.io.asyncioreactor</span></code> - <code class="docutils literal"><span class="pre">asyncio</span></code> Event Loop</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/asyncorereactor.html"><code class="docutils literal"><span class="pre">cassandra.io.asyncorereactor</span></code> - <code class="docutils literal"><span class="pre">asyncore</span></code> Event Loop</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/eventletreactor.html"><code class="docutils literal"><span class="pre">cassandra.io.eventletreactor</span></code> - <code class="docutils literal"><span class="pre">eventlet</span></code>-compatible Connection</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/libevreactor.html"><code class="docutils literal"><span class="pre">cassandra.io.libevreactor</span></code> - <code class="docutils literal"><span class="pre">libev</span></code> Event Loop</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/geventreactor.html"><code class="docutils literal"><span class="pre">cassandra.io.geventreactor</span></code> - <code class="docutils literal"><span class="pre">gevent</span></code>-compatible Event Loop</a></li>
<li class="toctree-l3"><a class="reference internal" href="cassandra/io/twistedreactor.html"><code class="docutils literal"><span class="pre">cassandra.io.twistedreactor</span></code> - Twisted Event Loop</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="index.html#object-mapper">Object Mapper</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../upgrading.html">Upgrading</a></li>
<li class="toctree-l1"><a class="reference internal" href="../execution_profiles.html">Execution Profiles</a></li>
<li class="toctree-l1"><a class="reference internal" href="../performance.html">Performance Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../query_paging.html">Paging Large Queries</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lwt.html">Lightweight Transactions (Compare-and-set)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security.html">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../user_defined_types.html">User Defined Types</a></li>
<li class="toctree-l1"><a class="reference internal" href="../object_mapper.html">Object Mapper</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dates_and_times.html">Working with Dates and Times</a></li>
<li class="toctree-l1"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="index.html">API Documentation</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">API Documentation</a></li>
<li>Next: <a href="cassandra/cluster.html" title="next chapter"><code class="docutils literal"><span class="pre">cassandra.cluster</span></code> - Clusters and Sessions</a></li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2013-2017 DataStax.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.6</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="../_sources/api/cassandra.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>