Author: ivol37 at gmail.com
Date: Fri Jan 14 16:14:47 2011
New Revision: 658

Log:


Modified:
   sandbox/ivol/standalone-cassandra/src/org/amdatu/cassandra/Main.java

Modified: sandbox/ivol/standalone-cassandra/src/org/amdatu/cassandra/Main.java
==============================================================================
--- sandbox/ivol/standalone-cassandra/src/org/amdatu/cassandra/Main.java        
(original)
+++ sandbox/ivol/standalone-cassandra/src/org/amdatu/cassandra/Main.java        
Fri Jan 14 16:14:47 2011
@@ -102,36 +102,36 @@
     private void createTestData() throws InvalidRequestException, TException, 
NotFoundException, UnsupportedEncodingException, UnavailableException, 
TimedOutException {
         m_cassandraServer = new CassandraServer();
 
-        if (!keyspaceExists(DEFAULT_KEYSPACE)) {
+        /*   if (!keyspaceExists(DEFAULT_KEYSPACE)) {
             addKeyspace(DEFAULT_KEYSPACE, 1);
-        }
+        }*/
 
-        if (!columnFamilyExists(DEFAULT_KEYSPACE, ROLE_CF)) {
-            addColumnFamily(DEFAULT_KEYSPACE, ROLE_CF, "Super", "BytesType", 
"BytesType");
+        //if (!columnFamilyExists(DEFAULT_KEYSPACE, ROLE_CF)) {
+        //  addColumnFamily(DEFAULT_KEYSPACE, ROLE_CF, "Super", "BytesType", 
"BytesType");
 
-            // Add 13 test roles to this CF users
-            for (int i=1; i<=13; i++) {
-                setValue(DEFAULT_KEYSPACE, ROLE_CF, "user_"+i, "super", 
"name", toBytes("User " + i));
-            }
+        // Add 13 test roles to this CF users
+        for (int i=1; i<=13; i++) {
+            setValue(DEFAULT_KEYSPACE, ROLE_CF, "user_"+i, "super", "name", 
toBytes("User " + i));
         }
+        //}
 
-        if (!columnFamilyExists(DEFAULT_KEYSPACE, GADGET_CF)) {
-            addColumnFamily(DEFAULT_KEYSPACE, GADGET_CF, "Super", "BytesType", 
"BytesType");
+        // if (!columnFamilyExists(DEFAULT_KEYSPACE, GADGET_CF)) {
+        //  addColumnFamily(DEFAULT_KEYSPACE, GADGET_CF, "Super", "BytesType", 
"BytesType");
 
-            // Add 20 test gadgets to this CF gadgets
-            for (int i=1; i<=20; i++) {
-                setValue(DEFAULT_KEYSPACE, GADGET_CF, "gadget_"+i, "super", 
"name", toBytes("Gadget " + i));
-            }
+        // Add 20 test gadgets to this CF gadgets
+        for (int i=1; i<=20; i++) {
+            setValue(DEFAULT_KEYSPACE, GADGET_CF, "gadget_"+i, "super", 
"name", toBytes("Gadget " + i));
         }
+        //  }
 
-        if (!columnFamilyExists(DEFAULT_KEYSPACE, CATEGORY_CF)) {
-            addColumnFamily(DEFAULT_KEYSPACE, CATEGORY_CF, "Super", 
"BytesType", "BytesType");
+        //  if (!columnFamilyExists(DEFAULT_KEYSPACE, CATEGORY_CF)) {
+        //   addColumnFamily(DEFAULT_KEYSPACE, CATEGORY_CF, "Super", 
"BytesType", "BytesType");
 
-            // Add 3 test categories to this CF category
-            for (int i=1; i<=3; i++) {
-                setValue(DEFAULT_KEYSPACE, CATEGORY_CF, "category_"+i, 
"super", "name", toBytes("Category " + i));
-            }
+        // Add 3 test categories to this CF category
+        for (int i=1; i<=3; i++) {
+            setValue(DEFAULT_KEYSPACE, CATEGORY_CF, "category_"+i, "super", 
"name", toBytes("Category " + i));
         }
+        // }
     }
 
     public synchronized boolean keyspaceExists(String keyspaceName) throws 
TException, InvalidRequestException {

Reply via email to