AppController/lib/cassandra_helper.rb
# Starts Cassandra on this machine. This is identical to starting Cassandra as a
# Database Master role, with the extra step of waiting for the DB Master to boot
# Cassandra up.
#
# Args:
#   clear_datastore: Remove any pre-existent data in the database.
#   needed: The number of nodes required for quorum.
Starts Cassandra on this machine. This is identical to starting Cassandra as a
Database Master role, with the extra step of waiting for the DB Master to boot
Cassandra up.

Remove any pre-existent data in the database.
needed: The number of nodes required for quorum.
Starts Cassandra on this machine . This is identical to starting Cassandra as a Database Master role with the extra step of waiting for the DB Master to boot Cassandra up . Remove any pre - existent data in the database . needed : The number of nodes required for quorum .
def start_db_slave(clear_datastore, needed)
  seed_node = get_db_master.private_ip
  @state = "Waiting for Cassandra seed node at #{seed_node} to start"
  Djinn.log_info(@state)
  acc = AppControllerClient.new(seed_node, HelperFunctions.get_secret())
  while true
    begin
      break if acc.primary_db_is_up() == "true"
    rescue FailedNodeException
      Djinn.log_warn(
          "Failed to check if Cassandra is up at #{seed_node}")
    end
    sleep(SMALL_WAIT)
  end
  start_cassandra(clear_datastore, needed)
end
def start_db_slave ( clear_datastore , needed ) seed_node = get_db_master . private_ip @state = "Waiting for Cassandra seed node at #{seed_node} to start" Djinn . log_info ( @state ) acc = AppControllerClient . new ( seed_node , HelperFunctions . get_secret ( ) ) while true begin break if acc . primary_db_is_up ( ) == "true" rescue FailedNodeException Djinn . log_warn ( "Failed to check if Cassandra is up at #{seed_node}" ) end sleep ( SMALL_WAIT ) end start_cassandra ( clear_datastore , needed ) end
Starts Cassandra on this machine.
Starts Cassandra on this machine .
clear_datastore
<not_specific>
needed
<not_specific>