[sr-dev] git:master: modules/db_cassandra Addition in documentation

Anca Vamanu anca.vamanu at 1and1.ro
Thu Feb 2 15:38:05 CET 2012


Module: sip-router
Branch: master
Commit: 29a87c81bab87c5b34d053ed5937cfa271d756f2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=29a87c81bab87c5b34d053ed5937cfa271d756f2

Author: Anca Vamanu <anca.vamanu at 1and1.ro>
Committer: Anca Vamanu <anca.vamanu at 1and1.ro>
Date:   Fri Jan 27 11:24:37 2012 +0200

modules/db_cassandra Addition in documentation

	Specified how keyspaces and column families should be created in
	Cassandra

---

 modules/db_cassandra/README                     |   15 +++++++++++++--
 modules/db_cassandra/doc/db_cassandra_admin.xml |   17 ++++++++++++++++-
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/modules/db_cassandra/README b/modules/db_cassandra/README
index be27201..b545ee9 100644
--- a/modules/db_cassandra/README
+++ b/modules/db_cassandra/README
@@ -94,8 +94,19 @@ Chapter 1. Admin Guide
    You will find the schemas for location, subscriber and version tables
    in utils/kamctl/dbcassandra directory. You have to provide the path to
    the directory containing the table definitions by setting the module
-   parameter schema_path. NOTE that there is no need to configure a table
-   metadata in Cassandra cluster.
+   parameter schema_path.
+
+   There is no need to configure a table metadata in Cassandra cluster.
+   You only need to define a keyspace with the name of the database and
+   for each table a column family inside that keyspace with the name of
+   the table. The comparator and validators should be either UTF8Type or
+   ASCIIType. Example:
+   ...
+   create keyspace openser;
+   use openser;
+   create column family 'location' with comparator='UTF8Type' and
+default_validation_class='UTF8Type' and key_validation_class='UTF8Type';
+   ...
 
    Special attention was given to performance in Cassandra. Therefore, the
    implementation uses only the native row indexing in Cassandra and no
diff --git a/modules/db_cassandra/doc/db_cassandra_admin.xml b/modules/db_cassandra/doc/db_cassandra_admin.xml
index 1a59500..1c00067 100644
--- a/modules/db_cassandra/doc/db_cassandra_admin.xml
+++ b/modules/db_cassandra/doc/db_cassandra_admin.xml
@@ -52,9 +52,24 @@
 		utils/kamctl/dbcassandra directory. You have to provide the path to the 
 		directory containing the table definitions by setting the module parameter
 		schema_path.
-		NOTE that there is no need to configure a table metadata in Cassandra cluster.
 	</para>
 	<para>
+		There is no need to configure a table metadata in Cassandra cluster.
+		You only need to define a keyspace with the name of the database and for each table
+		a column family inside that keyspace with the name of the table. The comparator
+		and validators should be either UTF8Type or ASCIIType.
+		Example:
+	</para>
+<programlisting format="linespecific">
+   ...
+   create keyspace openser;
+   use openser;
+   create column family 'location' with comparator='UTF8Type' and 
+default_validation_class='UTF8Type' and key_validation_class='UTF8Type';
+   ...
+</programlisting>
+
+	<para>
 		Special attention was given to performance in Cassandra. Therefore, the
 		implementation uses only the native row indexing in Cassandra and no secondary
 		indexes, because they are costly. Instead, we simulate a secondary index by 




More information about the sr-dev mailing list