def start(cluster_name='cassandra', **kwargs): if is_cassandra_installed(): if is_cassandra_running(): print("Cassandra is already running. Use 'cqs stop' to stop it.") return cluster = ccmlib.cluster.Cluster.load(ccm_home, cluster_name) cluster.start()
def ccm_create(version="git:cassandra-2.0"): test_path = tempfile.mkdtemp(prefix='dtest-') print "cluster ccm directory: %s" % test_path cluster = ccmlib.cluster.Cluster(test_path, 'test', cassandra_version=version) cluster.set_configuration_options(values={'initial_token': None, 'num_tokens': 256}) cluster.populate(1) cluster.start()
def check_cassandra_version(cassandra_version): with GracefulCluster('thrift-test', cassandra_version, 'RandomPartitioner', ThriftMultigetTestCase.ClusterOptions) as cluster: cluster.set_log_level("TRACE") cluster.populate(3, debug=True) cluster.start() log('Populate nodes') ThriftMultigetTestCase._prepare_for_test(cluster) cluster.nodetool('settraceprobability 1') log('Enable tracing on every node') return ThriftMultigetTestCase._check_cassandra()