public static Cluster getOrCreateCluster(String clusterName, String hostIp) {
    return getOrCreateCluster(clusterName,
        new CassandraHostConfigurator(hostIp));
  }
public static Cluster getOrCreateCluster ( String clusterName , String hostIp ) { return getOrCreateCluster ( clusterName , new CassandraHostConfigurator ( hostIp ) ) ; }
Method tries to create a Cluster instance for an existing Cassandra
cluster. If another class already called getOrCreateCluster, the factory
returns the cached instance. If the instance doesn't exist in memory, a new
ThriftCluster is created and cached.

Example usage for a default installation of Cassandra.

String clusterName = "Test Cluster"; String host = "localhost:9160";
Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);

Note the host should be the hostname and port number. It is preferable to
use the hostname instead of the IP address.

@param clusterName
The cluster name. This is an identifying string for the cluster,
e.g. "production" or "test" etc. Clusters will be created on
demand per each unique clusterName key.
@param hostIp
host:ip format string
@return