class Cassandra::Errors::WriteError
Raised when a write request fails.
@see github.com/apache/cassandra/blob/cassandra-3.4/doc/native_protocol_v4.spec#L1106-L1134 Description
of Write Failure Error in Apache Cassandra native protocol spec v4
Attributes
consistency[R]
@return [Symbol] the original consistency level for the request, one of
{Cassandra::CONSISTENCIES}
failed[R]
@return [Integer] the number of writes failed
failures_by_node[R]
@return [Hash<IPAddr, Integer>] map of <ip, error-code>. This is new in v5 and is nil in previous versions
of the Casssandra protocol.
received[R]
@return [Integer] the number of acks received
required[R]
@return [Integer] the number of acks required
type[R]
@return [Symbol] the type of write request that timed out, one of
{Cassandra::WRITE_TYPES}
Public Class Methods
new(message, payload, warnings, keyspace, statement, options, hosts, r_consistency, retries, type, consistency, required, failed, received, failures_by_node)
click to toggle source
@private
Calls superclass method
Cassandra::Errors::ExecutionError::new
# File lib/cassandra/errors.rb 356 def initialize(message, 357 payload, 358 warnings, 359 keyspace, 360 statement, 361 options, 362 hosts, 363 r_consistency, 364 retries, 365 type, 366 consistency, 367 required, 368 failed, 369 received, 370 failures_by_node) 371 super(message, 372 payload, 373 warnings, 374 keyspace, 375 statement, 376 options, 377 hosts, 378 r_consistency, 379 retries) 380 @type = type 381 @consistency = consistency 382 @required = required 383 @failed = failed 384 @received = received 385 @failures_by_node = failures_by_node 386 end