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)
| 57 | |
| 58 | |
| 59 | def 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 | |
| 79 | def create_keyspace_network_topology(name, dc_replication_map, durable_writes=True, connections=None): |