Author: ivol37 at gmail.com
Date: Fri Jan 14 16:19:49 2011
New Revision: 661

Log:


Modified:
   sandbox/ivol/standalone-cassandra/conf-r2d2/cassandra.yaml
   sandbox/ivol/standalone-cassandra/conf-veers/cassandra.yaml
   sandbox/ivol/standalone-cassandra/src/org/amdatu/cassandra/Main.java

Modified: sandbox/ivol/standalone-cassandra/conf-r2d2/cassandra.yaml
==============================================================================
--- sandbox/ivol/standalone-cassandra/conf-r2d2/cassandra.yaml  (original)
+++ sandbox/ivol/standalone-cassandra/conf-r2d2/cassandra.yaml  Fri Jan 14 
16:19:49 2011
@@ -279,20 +279,4 @@
 # The Index Interval determines how large the sampling of row keys
 #  is for a given SSTable. The larger the sampling, the more effective
 #  the index is at the cost of space.
-index_interval: 128
-
-
-
-keyspaces:
-    - name: Default
-      replica_placement_strategy: org.apache.cassandra.locator.SimpleStrategy
-      replication_factor: 1
-      column_families:
-        - name: Role
-          compare_with: BytesType
-
-        - name: Gadget
-          compare_with: BytesType
-
-        - name: Category
-          compare_with: BytesType
\ No newline at end of file
+index_interval: 128
\ No newline at end of file

Modified: sandbox/ivol/standalone-cassandra/conf-veers/cassandra.yaml
==============================================================================
--- sandbox/ivol/standalone-cassandra/conf-veers/cassandra.yaml (original)
+++ sandbox/ivol/standalone-cassandra/conf-veers/cassandra.yaml Fri Jan 14 
16:19:49 2011
@@ -279,18 +279,4 @@
 # The Index Interval determines how large the sampling of row keys
 #  is for a given SSTable. The larger the sampling, the more effective
 #  the index is at the cost of space.
-index_interval: 128
-
-keyspaces:
-    - name: Default
-      replica_placement_strategy: org.apache.cassandra.locator.SimpleStrategy
-      replication_factor: 1
-      column_families:
-        - name: Role
-          compare_with: BytesType
-
-        - name: Gadget
-          compare_with: BytesType
-
-        - name: Category
-          compare_with: BytesType
\ No newline at end of file
+index_interval: 128
\ No newline at end of file

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:19:49 2011
@@ -102,36 +102,35 @@
     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++) {
+        /*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++) {
+        /*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++) {
+        /* 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