AppController/djinn.rb
# This function makes sure we have a zookeeper connection active to one
# of the ZK servers.
This function makes sure we have a zookeeper connection active to one
of the ZK servers.
This function makes sure we have a zookeeper connection active to one of the ZK servers .
def pick_zookeeper(zk_list)
    if zk_list.length < 1
      HelperFunctions.log_and_crash("Don't have valid zookeeper servers.")
    end
    loop {
      break if ZKInterface.is_connected?
      @state = NO_ZOOKEEPER_CONNECTION
      ip = zk_list.sample()
      Djinn.log_info("Trying to use zookeeper server at #{ip}.")
      ZKInterface.init_to_ip(HelperFunctions.local_ip(), ip.to_s)
    }
    Djinn.log_debug("Found zookeeper server.")
  end
def pick_zookeeper ( zk_list ) if zk_list . length < 1 HelperFunctions . log_and_crash ( "Don't have valid zookeeper servers." ) end loop { break if ZKInterface . is_connected? @state = NO_ZOOKEEPER_CONNECTION ip = zk_list . sample ( ) Djinn . log_info ( "Trying to use zookeeper server at #{ip}." ) ZKInterface . init_to_ip ( HelperFunctions . local_ip ( ) , ip . to_s ) } Djinn . log_debug ( "Found zookeeper server." ) end
This function makes sure we have a zookeeper connection active to one
of the ZK servers.
This function makes sure we have a zookeeper connection active to one of the ZK servers .
zk_list
<not_specific>