2
votes

I have some questions about Cassandra, first of all i want to create columns and keyspaces in the storage-conf.xml, (which i dont have but i think that cassandra.yaml replaced that in the latest version) I tried to write this in the cassandra.yaml by opening it in notepad, but it didnt seem to work since i couldnt see my new keyspace in datastax web interface.

<Keyspace>
<Keyspace Name="Sales">
<ColumnFamily Name="Customer" CompareWith="UTF8Type" />
<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy
</ReplicaPlacementStrategy>
<ReplicationFactor>1</ReplicationFactor
<EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
</Keyspace>

What am i doing wrong?

I also wonder if there is a somehow easy way to migrate a relational sql server database in to cassandra?

Thanks in advance!

1
your question seems to be messed up, just tell us what you actually want to do? And FYI cassandra.yaml is meant for cassandra server configuration related information. You better go through the cassandra documentation - abhi
this is not the way of creating a Keyspace/ColumnFamily in Cassandra, use CQL client or exposed APIs for this purpose. - Mayank Raghav

1 Answers

5
votes

You are trying to create a keyspace and column by adding the above to cassandra.yaml you cant do that. Second of all what you are adding really doesn't make sense, cassandra.yaml is a YAML file, and the above is XML markup. Cassandra.yaml is for configuration only. If you want to add keyspaces/columns you are going to have to use a cassadra interface (cassandra APIs).

As for the migration, is there an easy way? No not really. B̶u̶t̶ ̶w̶i̶t̶h̶ ̶l̶o̶t̶s̶ ̶o̶f̶ ̶d̶e̶n̶o̶r̶m̶a̶l̶i̶z̶a̶t̶i̶o̶n̶ ̶a̶n̶d̶ ̶r̶e̶s̶e̶a̶r̶c̶h̶ ̶i̶t̶ ̶c̶a̶n̶ ̶b̶e̶ ̶d̶o̶n̶e̶.̶ ̶H̶e̶r̶e̶ ̶i̶s̶ ̶a̶ ̶[̶b̶l̶o̶g̶]̶[̶5̶]̶ ̶t̶h̶a̶t̶ ̶g̶o̶e̶s̶ ̶o̶v̶e̶r̶ ̶a̶ ̶b̶a̶s̶i̶c̶ ̶w̶a̶y̶ ̶o̶f̶ ̶a̶t̶t̶e̶m̶p̶t̶i̶n̶g̶ ̶t̶o̶ ̶d̶o̶ ̶s̶o̶.

Update The blog is gone 😞. This tutorial by oreilly provides a good overview of how a typical RDMS data model can be modified for Cassandra.