/// <summary> /// Create the keyspace /// </summary> /// <param name="keyspace"></param> public void createKeySpace(String keyspace) { KsDef keyspaceDefinition = new KsDef(); keyspaceDefinition.Name = keyspace; keyspaceDefinition.Replication_factor = 1; keyspaceDefinition.Strategy_class = "org.apache.cassandra.locator.SimpleStrategy"; keyspaceDefinition.Strategy_options = new Dictionary <string, string>(); keyspaceDefinition.Strategy_options.Add("replication_factor", "1"); keyspaceDefinition.Cf_defs = new List <CfDef>(); client.system_add_keyspace(keyspaceDefinition); waitForCreation(keyspace); }
public override void Execute(Apache.Cassandra.Cassandra.Client cassandraClient) { Output = cassandraClient.system_add_keyspace(keyspaceDefinition.ToCassandraKsDef()); }