class Cassandra::Errors::ReadError

Raised when a read request fails.

@see github.com/apache/cassandra/blob/cassandra-3.4/doc/native_protocol_v4.spec#L1084-L1098 Description

of Read 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 reads 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 responses received

required[R]

@return [Integer] the number of responses required

retrieved[R]

@return [Boolean] whether actual data (as opposed to data checksum) was

present in the received responses.

Public Class Methods

new(message, payload, warnings, keyspace, statement, options, hosts, r_consistency, retries, retrieved, consistency, required, failed, received, failures_by_node) click to toggle source

@private

Calls superclass method Cassandra::Errors::ExecutionError::new
    # File lib/cassandra/errors.rb
413 def initialize(message,
414                payload,
415                warnings,
416                keyspace,
417                statement,
418                options,
419                hosts,
420                r_consistency,
421                retries,
422                retrieved,
423                consistency,
424                required,
425                failed,
426                received,
427                failures_by_node)
428   super(message,
429         payload,
430         warnings,
431         keyspace,
432         statement,
433         options,
434         hosts,
435         r_consistency,
436         retries)
437   @retrieved   = retrieved
438   @consistency = consistency
439   @required    = required
440   @failed      = failed
441   @received    = received
442   @failures_by_node = failures_by_node
443 end

Public Instance Methods

retrieved?() click to toggle source
    # File lib/cassandra/errors.rb
445 def retrieved?
446   @retrieved
447 end