0.1.0 • Published 5 years ago

cassandra-nodetool v0.1.0

Weekly downloads
541
License
MIT
Repository
github
Last release
5 years ago

Cassandra Nodetool

License: MIT npm version david-dm CircleCI codecov

Cassandra Nodetool on Node.js

Requirements

  • Node.js: >=7.10.1. (needs async/await support)
  • Package: node-java, node-jmx
    • OpenJDK: 8.
    • node-gyp
      • python: 2.7.x.
      • make
      • g++

Installation

$ npm install cassandra-nodetool

or

$ yarn add cassandra-nodetool

Dockerfile

CLI Usage examples

CLI is available via jsnodetool.

$ jsnodetool -h

usage: jsnodetool [-h] [-v] [-H HOST] [-P PORT] [-U USERNAME] [-PW PASSWORD]
                  {status} ...

Cassandra Nodetool on Node.js

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -H HOST, --host HOST  Hostname or IP address.
  -P PORT, --port PORT  JMX Port number.
  -U USERNAME, --username USERNAME
                        JMX Username.
  -PW PASSWORD, --password PASSWORD
                        JMX Password.

command:
  {status}

To fetch ring status:

$ jsnodetool status --skipTokens

{ datacenter1:
   { rack1:
      { '127.0.0.1':
         { hostId: '510e4833-317e-4d11-8590-fd1f849bafd8',
           datacenter: 'datacenter1',
           rack: 'rack1',
           status: 'U',
           state: 'N',
           load: '280.45 KiB',
           ownership: 1.0000048875808716 } } } }

Module Usage Examples

const { Nodetool } = require('cassandra-nodetool');

Nodetool({ host: '127.0.0.1', port: 7199, username: 'user', password: 'pass' })
    .status({ resolveIp: true })
    .then( ringStatus => console.log(ringStatus))
    .catch( err => console.error(err));
0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago