go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  How to add a new node into existing cluster?
 
Subject: How to add a new node into existing cluster?
Author: EricJ
In response to: How to customize/Configure Cassandra
Posted on: 09/29/2015 02:42:23 AM

Setp 1. Download and install Cassandra package unto the new host

Step 2. Configure the new Cassandra node:
Change:

cluster_name: 'Test Cluster'
listen_address: localhost
rpc_address: localhost
 - seeds: "127.0.0.1"

to:
cluster_name: 'Clusetr101'  <-- The cluster to join
listen_address: 10.11.12.123
rpc_address: 10.11.12.123
– seeds: "10.11.12.13"      <-- The cluster's seeds to reference


Step 3. Start the new node:
C:\downloads\apache-cassandra-2.2.1\bin> cassandra -f


Step 4. Check the status:
C:\downloads\apache-cassandra-2.2.1\bin> nodetool status 

Starting NodeTool
Datacenter: datacenter1
========================
Status=Up/Down|/ State=Normal/Leaving/Joining/Moving
--  Address      Load      Tokens  Owns  Host ID        Rack
UN  10.11.12.13  11.51 MB  256      ?    4571f3b-51807  rack1
UN  10.11.12.123  4.32 MB  256      ?    8f1b1c8-2d0d6  rack1


As it can be seen that the cluster is now having 2 nodes: '10.11.12.13' and '10.11.12.123'.


Note: Check your application data's replication factor before adding any new node, for example,
  • ReplicationFactor=1 -- trouble if any one node is down
  • ReplicationFactor=2 -- trouble if any two nodes are down

    UnavailableException: Not enough replica available for query at consistency ONE (1 required but only 0 alive)




     

    > On 09/29/2015 02:37:20 AM EricJ wrote:


    Open C:\downloads\apache-cassandra-2.2.1\conf\cassandra.yaml:

    Change the following default settings:
    cluster_name: 'Test Cluster'
    listen_address: localhost
    rpc_address: localhost
     - seeds: "127.0.0.1"
    


    to:

    cluster_name: 'Cluster101'
    listen_address: 10.11.12.13
    rpc_address: 10.11.12.13
    – seeds: "10.11.12.13"
    


    C:\downloads\apache-cassandra-2.2.1\bin> nodetool status 
    
    Starting NodeTool
    Datacenter: datacenter1
    ========================
    Status=Up/Down|/ State=Normal/Leaving/Joining/Moving
    --  Address      Load      Tokens  Owns  Host ID        Rack
    UN  10.11.12.13  11.41 MB  256      ?    4571f3b-51807  rack1
    


    As it can be seen that this Cassandra is running on 10.11.12.13 which can be accessed from outside.





    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.