MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / create_keyspace_simple

Function create_keyspace_simple

cassandra/cqlengine/management.py:59–76  ·  view source on GitHub ↗

Creates a keyspace with SimpleStrategy for replica placement If the keyspace already exists, it will not be modified. **This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurr

(name, replication_factor, durable_writes=True, connections=None)

Source from the content-addressed store, hash-verified

57
58
59def create_keyspace_simple(name, replication_factor, durable_writes=True, connections=None):
60 """
61 Creates a keyspace with SimpleStrategy for replica placement
62
63 If the keyspace already exists, it will not be modified.
64
65 **This function should be used with caution, especially in production environments.
66 Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).**
67
68 *There are plans to guard schema-modifying functions with an environment-driven conditional.*
69
70 :param str name: name of keyspace to create
71 :param int replication_factor: keyspace replication factor, used with :attr:`~.SimpleStrategy`
72 :param bool durable_writes: Write log is bypassed if set to False
73 :param list connections: List of connection names
74 """
75 _create_keyspace(name, durable_writes, 'SimpleStrategy',
76 {'replication_factor': replication_factor}, connections=connections)
77
78
79def create_keyspace_network_topology(name, dc_replication_map, durable_writes=True, connections=None):

Callers 10

setUpClassMethod · 0.90
setup_packageFunction · 0.90
setUpClassMethod · 0.90
setUpClassMethod · 0.90
_reset_dataMethod · 0.90
setup_moduleFunction · 0.90

Calls 1

_create_keyspaceFunction · 0.85

Tested by 9

setUpClassMethod · 0.72
setUpClassMethod · 0.72
setUpClassMethod · 0.72
_reset_dataMethod · 0.72
setup_moduleFunction · 0.72