42
42
43
43
try :
44
44
from ccmlib .dse_cluster import DseCluster
45
- from ccmlib .cluster import Cluster as CCMCluster
45
+ from ccmlib .scylla_cluster import ScyllaCluster as CCMCluster
46
46
from ccmlib .cluster_factory import ClusterFactory as CCMClusterFactory
47
47
from ccmlib import common
48
48
except ImportError as e :
@@ -185,12 +185,10 @@ def _get_dse_version_from_cass(cass_version):
185
185
if DSE_CRED :
186
186
log .info ("Using DSE credentials file located at {0}" .format (DSE_CRED ))
187
187
CCM_KWARGS ['dse_credentials_file' ] = DSE_CRED
188
- elif CASSANDRA_DIR :
189
- log .info ("Using Cassandra dir: %s" , CASSANDRA_DIR )
190
- CCM_KWARGS ['install_dir' ] = CASSANDRA_DIR
191
- else :
192
- log .info ('Using Cassandra version: %s' , CCM_VERSION )
193
- CCM_KWARGS ['version' ] = CCM_VERSION
188
+ if os .getenv ('INSTALL_DIRECTORY' ):
189
+ CCM_KWARGS ['install_dir' ] = os .path .join (os .getenv ('INSTALL_DIRECTORY' ))
190
+ elif os .getenv ('SCYLLA_VERSION' ):
191
+ CCM_KWARGS ['cassandra_version' ] = os .path .join (os .getenv ('SCYLLA_VERSION' ))
194
192
195
193
196
194
#This changes the default contact_point parameter in Cluster
@@ -429,10 +427,10 @@ def is_current_cluster(cluster_name, node_counts, workloads):
429
427
if CCM_CLUSTER and CCM_CLUSTER .name == cluster_name :
430
428
if [len (list (nodes )) for dc , nodes in
431
429
groupby (CCM_CLUSTER .nodelist (), lambda n : n .data_center )] == node_counts :
432
- for node in CCM_CLUSTER .nodelist ():
433
- if set (node .workloads ) != set (workloads ):
434
- print ("node workloads don't match creating new cluster" )
435
- return False
430
+ # for node in CCM_CLUSTER.nodelist():
431
+ # if set(node.workloads) != set(workloads):
432
+ # print("node workloads don't match creating new cluster")
433
+ # return False
436
434
return True
437
435
return False
438
436
@@ -525,7 +523,7 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
525
523
CCM_CLUSTER .set_dse_configuration_options (dse_options )
526
524
else :
527
525
CCM_CLUSTER = CCMCluster (path , cluster_name , ** ccm_options )
528
- CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True })
526
+ CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True , 'experimental' : True })
529
527
if cassandra_version >= Version ('2.2' ):
530
528
CCM_CLUSTER .set_configuration_options ({'enable_user_defined_functions' : True })
531
529
if cassandra_version >= Version ('3.0' ):
@@ -539,9 +537,9 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
539
537
540
538
# This will enable the Mirroring query handler which will echo our custom payload k,v pairs back
541
539
542
- if 'graph' not in workloads :
543
- if PROTOCOL_VERSION >= 4 :
544
- jvm_args = [" -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler" ]
540
+ # if 'graph' not in workloads:
541
+ # if PROTOCOL_VERSION >= 4:
542
+ # jvm_args = [" -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"]
545
543
if len (workloads ) > 0 :
546
544
for node in CCM_CLUSTER .nodes .values ():
547
545
node .set_workloads (workloads )
0 commit comments