def get_default_protocol():
if Version(CASSANDRA_VERSION) >= Version('3.10'):
return ProtocolVersion.DSE_V1
if Version(CASSANDRA_VERSION) >= Version('2.2'):
return 4
elif Version(CASSANDRA_VERSION) >= Version('2.1'):
return 3
elif Version(CASSANDRA_VERSION) >= Version('2.0'):
raise Exception("Cassandra Version 2.0 not supported anymore")
else:
raise Exception("Running tests with an unsupported Cassandra version: {0}".format(CASSANDRA_VERSION))
评论列表
文章目录