Class: Host

Host()

Represents a Cassandra node.

Constructor

new Host()

Creates a new Host instance.

Source:

Extends

  • EventEmitter

Members

address :String

Gets ip address and port number of the node separated by :.

Type:
  • String
Source:

cassandraVersion :String

Gets string containing the Cassandra version.

Type:
  • String
Source:

datacenter :String

Gets data center name of the node.

Type:
  • String
Source:

dseVersion :String

Gets string containing the DSE version or null if not set.

Type:
  • String
Source:

hostId :Uuid

Gets the id of the host.

This identifier is used by the server for internal communication / gossip.

Type:
  • Uuid
Source:

rack :String

Gets rack name of the node.

Type:
  • String
Source:

tokens :Array

Gets the tokens assigned to the node.

Type:
  • Array
Source:

workloads :Array.<string>

Gets the DSE Workloads the host is running.

This is based on the "workload" or "workloads" columns in {@code system.local} and {@code system.peers}.

Workload labels may vary depending on the DSE version in use;e.g. DSE 5.1 may report two distinct workloads:

Search and Analytics, while DSE 5.0 would report a single SearchAnalytics workload instead. The driver simply returns the workload labels as reported by DSE, without any form of pre-processing.

When the information is unavailable, this property returns an empty array.

Type:
  • Array.<string>
Source:

Methods

canBeConsideredAsUp() → {boolean}

Determines if the host can be considered as UP. Deprecated: Use Host#isUp() instead.

Source:
Returns:
Type
boolean

getCassandraVersion() → {Array.<Number>}

Returns an array containing the Cassandra Version as an Array of Numbers having the major version in the first position.

Source:
Returns:
Type
Array.<Number>

getDseVersion() → {Array}

Gets the DSE version of the host as an Array, containing the major version in the first position. In case the cluster is not a DSE cluster, it returns an empty Array.

Source:
Returns:
Type
Array

isUp() → {boolean}

Determines if the node is UP now (seen as UP by the driver).

Source:
Returns:
Type
boolean