go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Is it possible to set up a multi-node cluster on a single machine
 
Subject: Is it possible to set up a multi-node cluster on a single machine
Author: EricJ
In response to: How to add a new node into existing cluster?
Posted on: 09/30/2015 01:24:40 AM


It seams to be possible based on the following link

http://stackoverflow.com/questions/22513979/setting-up-cassandra-multi-node-cluster-on-a-single-ubuntu-server

In summary:

  • Multiple folders for each instance;
  • Within each folder's yaml file, set 'localhost' as '127,0,0,1', '127,0,0,2', ..., respectively.
  • Within each folder's cassandra-env.sh file, set 'JMX_PORT' as 7199, 8199, ..., respectively.


     

    > On 09/29/2015 02:42:23 AM EricJ wrote:

    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)







    References:

  •  


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