cassandra-driver 3.0.0.beta.1 → 3.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +90 -38
- data/ext/cassandra_murmur3/cassandra_murmur3.c +1 -1
- data/lib/cassandra.rb +327 -130
- data/lib/cassandra/address_resolution.rb +1 -1
- data/lib/cassandra/address_resolution/policies/ec2_multi_region.rb +1 -1
- data/lib/cassandra/address_resolution/policies/none.rb +1 -1
- data/lib/cassandra/aggregate.rb +21 -7
- data/lib/cassandra/argument.rb +2 -2
- data/lib/cassandra/auth.rb +4 -4
- data/lib/cassandra/auth/providers.rb +1 -1
- data/lib/cassandra/auth/providers/password.rb +9 -5
- data/lib/cassandra/cassandra_logger.rb +80 -0
- data/lib/cassandra/cluster.rb +38 -9
- data/lib/cassandra/cluster/client.rb +801 -205
- data/lib/cassandra/cluster/connection_pool.rb +2 -2
- data/lib/cassandra/cluster/connector.rb +74 -25
- data/lib/cassandra/cluster/control_connection.rb +217 -82
- data/lib/cassandra/cluster/failed_connection.rb +1 -1
- data/lib/cassandra/cluster/metadata.rb +12 -4
- data/lib/cassandra/cluster/options.rb +60 -11
- data/lib/cassandra/cluster/registry.rb +69 -16
- data/lib/cassandra/cluster/schema.rb +25 -7
- data/lib/cassandra/cluster/schema/cql_type_parser.rb +15 -10
- data/lib/cassandra/cluster/schema/fetchers.rb +263 -106
- data/lib/cassandra/cluster/schema/fqcn_type_parser.rb +41 -36
- data/lib/cassandra/cluster/schema/partitioners.rb +1 -1
- data/lib/cassandra/cluster/schema/partitioners/murmur3.rb +3 -3
- data/lib/cassandra/cluster/schema/partitioners/ordered.rb +1 -1
- data/lib/cassandra/cluster/schema/partitioners/random.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies/network_topology.rb +19 -18
- data/lib/cassandra/cluster/schema/replication_strategies/none.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies/simple.rb +1 -1
- data/lib/cassandra/column.rb +3 -3
- data/lib/cassandra/compression.rb +1 -1
- data/lib/cassandra/compression/compressors/lz4.rb +4 -3
- data/lib/cassandra/compression/compressors/snappy.rb +4 -3
- data/lib/cassandra/driver.rb +103 -41
- data/lib/cassandra/errors.rb +265 -30
- data/lib/cassandra/execution/info.rb +16 -5
- data/lib/cassandra/execution/options.rb +99 -54
- data/lib/cassandra/execution/trace.rb +16 -9
- data/lib/cassandra/executors.rb +1 -1
- data/lib/cassandra/function.rb +19 -13
- data/lib/cassandra/function_collection.rb +85 -0
- data/lib/cassandra/future.rb +106 -48
- data/lib/cassandra/host.rb +10 -4
- data/lib/cassandra/keyspace.rb +90 -33
- data/lib/cassandra/listener.rb +1 -1
- data/lib/cassandra/load_balancing.rb +2 -2
- data/lib/cassandra/load_balancing/policies.rb +1 -1
- data/lib/cassandra/load_balancing/policies/dc_aware_round_robin.rb +18 -18
- data/lib/cassandra/load_balancing/policies/round_robin.rb +1 -1
- data/lib/cassandra/load_balancing/policies/token_aware.rb +15 -13
- data/lib/cassandra/load_balancing/policies/white_list.rb +11 -5
- data/lib/cassandra/null_logger.rb +27 -6
- data/lib/cassandra/protocol.rb +1 -1
- data/lib/cassandra/protocol/coder.rb +78 -39
- data/lib/cassandra/protocol/cql_byte_buffer.rb +50 -33
- data/lib/cassandra/protocol/cql_protocol_handler.rb +44 -45
- data/lib/cassandra/protocol/request.rb +2 -2
- data/lib/cassandra/protocol/requests/auth_response_request.rb +3 -3
- data/lib/cassandra/protocol/requests/batch_request.rb +16 -7
- data/lib/cassandra/protocol/requests/credentials_request.rb +3 -3
- data/lib/cassandra/protocol/requests/execute_request.rb +41 -20
- data/lib/cassandra/protocol/requests/options_request.rb +1 -1
- data/lib/cassandra/protocol/requests/prepare_request.rb +5 -5
- data/lib/cassandra/protocol/requests/query_request.rb +27 -22
- data/lib/cassandra/protocol/requests/register_request.rb +2 -2
- data/lib/cassandra/protocol/requests/startup_request.rb +6 -4
- data/lib/cassandra/protocol/requests/void_query_request.rb +1 -1
- data/lib/cassandra/protocol/response.rb +2 -2
- data/lib/cassandra/protocol/responses/already_exists_error_response.rb +12 -2
- data/lib/cassandra/protocol/responses/auth_challenge_response.rb +1 -1
- data/lib/cassandra/protocol/responses/auth_success_response.rb +1 -1
- data/lib/cassandra/protocol/responses/authenticate_response.rb +1 -1
- data/lib/cassandra/protocol/responses/error_response.rb +101 -13
- data/lib/cassandra/protocol/responses/event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/function_failure_error_response.rb +13 -2
- data/lib/cassandra/protocol/responses/prepared_result_response.rb +11 -5
- data/lib/cassandra/protocol/responses/raw_rows_result_response.rb +14 -9
- data/lib/cassandra/protocol/responses/read_failure_error_response.rb +26 -4
- data/lib/cassandra/protocol/responses/read_timeout_error_response.rb +22 -3
- data/lib/cassandra/protocol/responses/ready_response.rb +3 -3
- data/lib/cassandra/protocol/responses/result_response.rb +4 -2
- data/lib/cassandra/protocol/responses/rows_result_response.rb +5 -3
- data/lib/cassandra/protocol/responses/schema_change_event_response.rb +5 -4
- data/lib/cassandra/protocol/responses/schema_change_result_response.rb +16 -9
- data/lib/cassandra/protocol/responses/set_keyspace_result_response.rb +2 -2
- data/lib/cassandra/protocol/responses/status_change_event_response.rb +2 -2
- data/lib/cassandra/protocol/responses/supported_response.rb +1 -1
- data/lib/cassandra/protocol/responses/topology_change_event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/unavailable_error_response.rb +20 -3
- data/lib/cassandra/protocol/responses/unprepared_error_response.rb +11 -2
- data/lib/cassandra/protocol/responses/void_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/write_failure_error_response.rb +26 -4
- data/lib/cassandra/protocol/responses/write_timeout_error_response.rb +22 -3
- data/lib/cassandra/protocol/v1.rb +101 -36
- data/lib/cassandra/protocol/v3.rb +124 -51
- data/lib/cassandra/protocol/v4.rb +172 -68
- data/lib/cassandra/reconnection.rb +1 -1
- data/lib/cassandra/reconnection/policies.rb +1 -1
- data/lib/cassandra/reconnection/policies/constant.rb +2 -4
- data/lib/cassandra/reconnection/policies/exponential.rb +6 -6
- data/lib/cassandra/result.rb +53 -19
- data/lib/cassandra/retry.rb +8 -8
- data/lib/cassandra/retry/policies.rb +1 -1
- data/lib/cassandra/retry/policies/default.rb +1 -1
- data/lib/cassandra/retry/policies/downgrading_consistency.rb +7 -3
- data/lib/cassandra/retry/policies/fallthrough.rb +1 -1
- data/lib/cassandra/session.rb +22 -16
- data/lib/cassandra/statement.rb +1 -1
- data/lib/cassandra/statements.rb +1 -1
- data/lib/cassandra/statements/batch.rb +16 -10
- data/lib/cassandra/statements/bound.rb +10 -3
- data/lib/cassandra/statements/prepared.rb +59 -15
- data/lib/cassandra/statements/simple.rb +23 -10
- data/lib/cassandra/statements/void.rb +1 -1
- data/lib/cassandra/table.rb +79 -30
- data/lib/cassandra/time.rb +11 -6
- data/lib/cassandra/time_uuid.rb +7 -7
- data/lib/cassandra/tuple.rb +16 -8
- data/lib/cassandra/types.rb +20 -9
- data/lib/cassandra/udt.rb +32 -36
- data/lib/cassandra/util.rb +20 -13
- data/lib/cassandra/uuid.rb +22 -15
- data/lib/cassandra/uuid/generator.rb +7 -5
- data/lib/cassandra/version.rb +2 -2
- data/lib/datastax/cassandra.rb +1 -1
- metadata +5 -3
data/lib/cassandra/errors.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright 2013-
|
4
|
+
# Copyright 2013-2016 DataStax, Inc.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -48,7 +48,15 @@ module Cassandra
|
|
48
48
|
include Error, HostError
|
49
49
|
|
50
50
|
# @private
|
51
|
-
def initialize(message,
|
51
|
+
def initialize(message,
|
52
|
+
payload,
|
53
|
+
warnings,
|
54
|
+
keyspace,
|
55
|
+
statement,
|
56
|
+
options,
|
57
|
+
hosts,
|
58
|
+
consistency,
|
59
|
+
retries)
|
52
60
|
super(message)
|
53
61
|
@payload = payload
|
54
62
|
@warnings = warnings
|
@@ -63,7 +71,15 @@ module Cassandra
|
|
63
71
|
# Query execution information, such as number of retries and all tried hosts, etc.
|
64
72
|
# @return [Cassandra::Execution::Info]
|
65
73
|
def execution_info
|
66
|
-
@info ||= Execution::Info.new(@payload,
|
74
|
+
@info ||= Execution::Info.new(@payload,
|
75
|
+
@warnings,
|
76
|
+
@keyspace,
|
77
|
+
@statement,
|
78
|
+
@options,
|
79
|
+
@hosts,
|
80
|
+
@consistency,
|
81
|
+
@retries,
|
82
|
+
nil)
|
67
83
|
end
|
68
84
|
end
|
69
85
|
|
@@ -97,7 +113,15 @@ module Cassandra
|
|
97
113
|
include Error
|
98
114
|
|
99
115
|
# @private
|
100
|
-
def initialize(message,
|
116
|
+
def initialize(message,
|
117
|
+
payload,
|
118
|
+
warnings,
|
119
|
+
keyspace,
|
120
|
+
statement,
|
121
|
+
options,
|
122
|
+
hosts,
|
123
|
+
consistency,
|
124
|
+
retries)
|
101
125
|
super(message)
|
102
126
|
@payload = payload
|
103
127
|
@warnings = warnings
|
@@ -112,7 +136,15 @@ module Cassandra
|
|
112
136
|
# Query execution information, such as number of retries and all tried hosts, etc.
|
113
137
|
# @return [Cassandra::Execution::Info]
|
114
138
|
def execution_info
|
115
|
-
@info ||= Execution::Info.new(@payload,
|
139
|
+
@info ||= Execution::Info.new(@payload,
|
140
|
+
@warnings,
|
141
|
+
@keyspace,
|
142
|
+
@statement,
|
143
|
+
@options,
|
144
|
+
@hosts,
|
145
|
+
@consistency,
|
146
|
+
@retries,
|
147
|
+
nil)
|
116
148
|
end
|
117
149
|
end
|
118
150
|
|
@@ -140,8 +172,27 @@ module Cassandra
|
|
140
172
|
attr_reader :alive
|
141
173
|
|
142
174
|
# @private
|
143
|
-
def initialize(message,
|
144
|
-
|
175
|
+
def initialize(message,
|
176
|
+
payload,
|
177
|
+
warnings,
|
178
|
+
keyspace,
|
179
|
+
statement,
|
180
|
+
options,
|
181
|
+
hosts,
|
182
|
+
r_consistency,
|
183
|
+
retries,
|
184
|
+
consistency,
|
185
|
+
required,
|
186
|
+
alive)
|
187
|
+
super(message,
|
188
|
+
payload,
|
189
|
+
warnings,
|
190
|
+
keyspace,
|
191
|
+
statement,
|
192
|
+
options,
|
193
|
+
hosts,
|
194
|
+
r_consistency,
|
195
|
+
retries)
|
145
196
|
@consistency = consistency
|
146
197
|
@required = required
|
147
198
|
@alive = alive
|
@@ -191,8 +242,28 @@ module Cassandra
|
|
191
242
|
attr_reader :received
|
192
243
|
|
193
244
|
# @private
|
194
|
-
def initialize(message,
|
195
|
-
|
245
|
+
def initialize(message,
|
246
|
+
payload,
|
247
|
+
warnings,
|
248
|
+
keyspace,
|
249
|
+
statement,
|
250
|
+
options,
|
251
|
+
hosts,
|
252
|
+
r_consistency,
|
253
|
+
retries,
|
254
|
+
type,
|
255
|
+
consistency,
|
256
|
+
required,
|
257
|
+
received)
|
258
|
+
super(message,
|
259
|
+
payload,
|
260
|
+
warnings,
|
261
|
+
keyspace,
|
262
|
+
statement,
|
263
|
+
options,
|
264
|
+
hosts,
|
265
|
+
r_consistency,
|
266
|
+
retries)
|
196
267
|
@type = type
|
197
268
|
@consistency = consistency
|
198
269
|
@required = required
|
@@ -220,8 +291,28 @@ module Cassandra
|
|
220
291
|
attr_reader :received
|
221
292
|
|
222
293
|
# @private
|
223
|
-
def initialize(message,
|
224
|
-
|
294
|
+
def initialize(message,
|
295
|
+
payload,
|
296
|
+
warnings,
|
297
|
+
keyspace,
|
298
|
+
statement,
|
299
|
+
options,
|
300
|
+
hosts,
|
301
|
+
r_consistency,
|
302
|
+
retries,
|
303
|
+
retrieved,
|
304
|
+
consistency,
|
305
|
+
required,
|
306
|
+
received)
|
307
|
+
super(message,
|
308
|
+
payload,
|
309
|
+
warnings,
|
310
|
+
keyspace,
|
311
|
+
statement,
|
312
|
+
options,
|
313
|
+
hosts,
|
314
|
+
r_consistency,
|
315
|
+
retries)
|
225
316
|
@retrieved = retrieved
|
226
317
|
@consistency = consistency
|
227
318
|
@required = required
|
@@ -253,8 +344,29 @@ module Cassandra
|
|
253
344
|
attr_reader :failed
|
254
345
|
|
255
346
|
# @private
|
256
|
-
def initialize(message,
|
257
|
-
|
347
|
+
def initialize(message,
|
348
|
+
payload,
|
349
|
+
warnings,
|
350
|
+
keyspace,
|
351
|
+
statement,
|
352
|
+
options,
|
353
|
+
hosts,
|
354
|
+
r_consistency,
|
355
|
+
retries,
|
356
|
+
type,
|
357
|
+
consistency,
|
358
|
+
required,
|
359
|
+
failed,
|
360
|
+
received)
|
361
|
+
super(message,
|
362
|
+
payload,
|
363
|
+
warnings,
|
364
|
+
keyspace,
|
365
|
+
statement,
|
366
|
+
options,
|
367
|
+
hosts,
|
368
|
+
r_consistency,
|
369
|
+
retries)
|
258
370
|
@type = type
|
259
371
|
@consistency = consistency
|
260
372
|
@required = required
|
@@ -283,8 +395,29 @@ module Cassandra
|
|
283
395
|
attr_reader :failed
|
284
396
|
|
285
397
|
# @private
|
286
|
-
def initialize(message,
|
287
|
-
|
398
|
+
def initialize(message,
|
399
|
+
payload,
|
400
|
+
warnings,
|
401
|
+
keyspace,
|
402
|
+
statement,
|
403
|
+
options,
|
404
|
+
hosts,
|
405
|
+
r_consistency,
|
406
|
+
retries,
|
407
|
+
retrieved,
|
408
|
+
consistency,
|
409
|
+
required,
|
410
|
+
failed,
|
411
|
+
received)
|
412
|
+
super(message,
|
413
|
+
payload,
|
414
|
+
warnings,
|
415
|
+
keyspace,
|
416
|
+
statement,
|
417
|
+
options,
|
418
|
+
hosts,
|
419
|
+
r_consistency,
|
420
|
+
retries)
|
288
421
|
@retrieved = retrieved
|
289
422
|
@consistency = consistency
|
290
423
|
@required = required
|
@@ -311,8 +444,27 @@ module Cassandra
|
|
311
444
|
attr_reader :signature
|
312
445
|
|
313
446
|
# @private
|
314
|
-
def initialize(message,
|
315
|
-
|
447
|
+
def initialize(message,
|
448
|
+
payload,
|
449
|
+
warnings,
|
450
|
+
r_keyspace,
|
451
|
+
statement,
|
452
|
+
options,
|
453
|
+
hosts,
|
454
|
+
consistency,
|
455
|
+
retries,
|
456
|
+
keyspace,
|
457
|
+
name,
|
458
|
+
signature)
|
459
|
+
super(message,
|
460
|
+
payload,
|
461
|
+
warnings,
|
462
|
+
r_keyspace,
|
463
|
+
statement,
|
464
|
+
options,
|
465
|
+
hosts,
|
466
|
+
consistency,
|
467
|
+
retries)
|
316
468
|
@keyspace = keyspace
|
317
469
|
@name = name
|
318
470
|
@signature = signature
|
@@ -330,7 +482,15 @@ module Cassandra
|
|
330
482
|
# @see https://github.com/apache/cassandra/blob/cassandra-2.0.16/doc/native_protocol_v1.spec#L656-L658 Description of Protocol Error in Apache Cassandra native protocol spec v1
|
331
483
|
class ProtocolError < ClientError
|
332
484
|
# @private
|
333
|
-
def initialize(message,
|
485
|
+
def initialize(message,
|
486
|
+
payload,
|
487
|
+
warnings,
|
488
|
+
keyspace,
|
489
|
+
statement,
|
490
|
+
options,
|
491
|
+
hosts,
|
492
|
+
consistency,
|
493
|
+
retries)
|
334
494
|
super(message)
|
335
495
|
@payload = payload
|
336
496
|
@warnings = warnings
|
@@ -345,7 +505,15 @@ module Cassandra
|
|
345
505
|
# Query execution information, such as number of retries and all tried hosts, etc.
|
346
506
|
# @return [Cassandra::Execution::Info]
|
347
507
|
def execution_info
|
348
|
-
@info ||= Execution::Info.new(@payload,
|
508
|
+
@info ||= Execution::Info.new(@payload,
|
509
|
+
@warnings,
|
510
|
+
@keyspace,
|
511
|
+
@statement,
|
512
|
+
@options,
|
513
|
+
@hosts,
|
514
|
+
@consistency,
|
515
|
+
@retries,
|
516
|
+
nil)
|
349
517
|
end
|
350
518
|
end
|
351
519
|
|
@@ -354,7 +522,15 @@ module Cassandra
|
|
354
522
|
# @see https://github.com/apache/cassandra/blob/cassandra-2.0.16/doc/native_protocol_v1.spec#L659-L660 Description of Bad Credentials Error in Apache Cassandra native protocol spec v1
|
355
523
|
class AuthenticationError < ClientError
|
356
524
|
# @private
|
357
|
-
def initialize(message,
|
525
|
+
def initialize(message,
|
526
|
+
payload,
|
527
|
+
warnings,
|
528
|
+
keyspace,
|
529
|
+
statement,
|
530
|
+
options,
|
531
|
+
hosts,
|
532
|
+
consistency,
|
533
|
+
retries)
|
358
534
|
super(message)
|
359
535
|
@payload = payload
|
360
536
|
@warnings = warnings
|
@@ -369,7 +545,15 @@ module Cassandra
|
|
369
545
|
# Query execution information, such as number of retries and all tried hosts, etc.
|
370
546
|
# @return [Cassandra::Execution::Info]
|
371
547
|
def execution_info
|
372
|
-
@info ||= Execution::Info.new(@payload,
|
548
|
+
@info ||= Execution::Info.new(@payload,
|
549
|
+
@warnings,
|
550
|
+
@keyspace,
|
551
|
+
@statement,
|
552
|
+
@options,
|
553
|
+
@hosts,
|
554
|
+
@consistency,
|
555
|
+
@retries,
|
556
|
+
nil)
|
373
557
|
end
|
374
558
|
end
|
375
559
|
|
@@ -378,7 +562,15 @@ module Cassandra
|
|
378
562
|
include Error
|
379
563
|
|
380
564
|
# @private
|
381
|
-
def initialize(message,
|
565
|
+
def initialize(message,
|
566
|
+
payload,
|
567
|
+
warnings,
|
568
|
+
keyspace,
|
569
|
+
statement,
|
570
|
+
options,
|
571
|
+
hosts,
|
572
|
+
consistency,
|
573
|
+
retries)
|
382
574
|
super(message)
|
383
575
|
@payload = payload
|
384
576
|
@warnings = warnings
|
@@ -393,7 +585,15 @@ module Cassandra
|
|
393
585
|
# Query execution information, such as number of retries and all tried hosts, etc.
|
394
586
|
# @return [Cassandra::Execution::Info]
|
395
587
|
def execution_info
|
396
|
-
@info ||= Execution::Info.new(@payload,
|
588
|
+
@info ||= Execution::Info.new(@payload,
|
589
|
+
@warnings,
|
590
|
+
@keyspace,
|
591
|
+
@statement,
|
592
|
+
@options,
|
593
|
+
@hosts,
|
594
|
+
@consistency,
|
595
|
+
@retries,
|
596
|
+
nil)
|
397
597
|
end
|
398
598
|
end
|
399
599
|
|
@@ -410,8 +610,25 @@ module Cassandra
|
|
410
610
|
attr_reader :id
|
411
611
|
|
412
612
|
# @private
|
413
|
-
def initialize(message,
|
414
|
-
|
613
|
+
def initialize(message,
|
614
|
+
payload,
|
615
|
+
warnings,
|
616
|
+
keyspace,
|
617
|
+
statement,
|
618
|
+
options,
|
619
|
+
hosts,
|
620
|
+
consistency,
|
621
|
+
retries,
|
622
|
+
id)
|
623
|
+
super(message,
|
624
|
+
payload,
|
625
|
+
warnings,
|
626
|
+
keyspace,
|
627
|
+
statement,
|
628
|
+
options,
|
629
|
+
hosts,
|
630
|
+
consistency,
|
631
|
+
retries)
|
415
632
|
@id = id
|
416
633
|
end
|
417
634
|
end
|
@@ -477,8 +694,26 @@ module Cassandra
|
|
477
694
|
attr_reader :table
|
478
695
|
|
479
696
|
# @private
|
480
|
-
def initialize(message,
|
481
|
-
|
697
|
+
def initialize(message,
|
698
|
+
payload,
|
699
|
+
warnings,
|
700
|
+
r_keyspace,
|
701
|
+
statement,
|
702
|
+
options,
|
703
|
+
hosts,
|
704
|
+
consistency,
|
705
|
+
retries,
|
706
|
+
keyspace,
|
707
|
+
table)
|
708
|
+
super(message,
|
709
|
+
payload,
|
710
|
+
warnings,
|
711
|
+
r_keyspace,
|
712
|
+
statement,
|
713
|
+
options,
|
714
|
+
hosts,
|
715
|
+
consistency,
|
716
|
+
retries)
|
482
717
|
@keyspace = keyspace
|
483
718
|
@table = table
|
484
719
|
end
|
@@ -500,8 +735,8 @@ module Cassandra
|
|
500
735
|
def initialize(errors = nil)
|
501
736
|
if errors
|
502
737
|
first = true
|
503
|
-
message =
|
504
|
-
|
738
|
+
message = 'All attempted hosts failed'
|
739
|
+
errors.each do |(host, error)|
|
505
740
|
if first
|
506
741
|
first = false
|
507
742
|
message << ': '
|
@@ -511,7 +746,7 @@ module Cassandra
|
|
511
746
|
message << "#{host.ip} (#{error.class.name}: #{error.message})"
|
512
747
|
end
|
513
748
|
else
|
514
|
-
message =
|
749
|
+
message = 'All hosts down'
|
515
750
|
end
|
516
751
|
|
517
752
|
super(message)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright 2013-
|
4
|
+
# Copyright 2013-2016 DataStax, Inc.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -32,17 +32,28 @@ module Cassandra
|
|
32
32
|
attr_reader :options
|
33
33
|
# @return [Array<Cassandra::Host>] a list of attempted hosts
|
34
34
|
attr_reader :hosts
|
35
|
-
# Actual consistency used, it can differ from consistency in
|
35
|
+
# Actual consistency used, it can differ from consistency in
|
36
|
+
# {Cassandra::Execution::Info#options} if a retry policy modified it.
|
36
37
|
# @return [Symbol] one of {Cassandra::CONSISTENCIES}
|
37
38
|
attr_reader :consistency
|
38
39
|
# @return [Integer] number of retries
|
39
40
|
attr_reader :retries
|
40
|
-
# Returns {Cassandra::Execution::Trace} if `trace: true` was passed to
|
41
|
-
#
|
41
|
+
# Returns {Cassandra::Execution::Trace} if `trace: true` was passed to
|
42
|
+
# {Cassandra::Session#execute} or {Cassandra::Session#execute_async}
|
43
|
+
# @return [Cassandra::Execution::Trace, nil] a Trace if it has been enabled for
|
44
|
+
# request
|
42
45
|
attr_reader :trace
|
43
46
|
|
44
47
|
# @private
|
45
|
-
def initialize(payload,
|
48
|
+
def initialize(payload,
|
49
|
+
warnings,
|
50
|
+
keyspace,
|
51
|
+
statement,
|
52
|
+
options,
|
53
|
+
hosts,
|
54
|
+
consistency,
|
55
|
+
retries,
|
56
|
+
trace)
|
46
57
|
@payload = payload
|
47
58
|
@warnings = warnings
|
48
59
|
@keyspace = keyspace
|