cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1042851 - in /cassandra: branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java trunk/contrib/word_count/src/WordCountSetup.java
Date Mon, 06 Dec 2010 23:24:18 GMT
Author: brandonwilliams
Date: Mon Dec  6 23:24:17 2010
New Revision: 1042851

URL: http://svn.apache.org/viewvc?rev=1042851&view=rev
Log:
Switch word_count CFs to AsciiType.  Patch by brandonwillliams

Modified:
    cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java
    cassandra/trunk/contrib/word_count/src/WordCountSetup.java

Modified: cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java?rev=1042851&r1=1042850&r2=1042851&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java (original)
+++ cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java Mon Dec  6
23:24:17 2010
@@ -99,8 +99,14 @@ public class WordCountSetup
     private static void setupKeyspace(Cassandra.Iface client) throws TException, InvalidRequestException
     {
         List<CfDef> cfDefList = new ArrayList<CfDef>();
-        cfDefList.add(new CfDef(WordCount.KEYSPACE, WordCount.COLUMN_FAMILY));
-        cfDefList.add(new CfDef(WordCount.KEYSPACE, WordCount.OUTPUT_COLUMN_FAMILY));
+        CfDef input = new CfDef(WordCount.KEYSPACE, WordCount.COLUMN_FAMILY);
+       input.setComparator_type("AsciiType");
+       input.setDefault_validation_class("AsciiType");
+       cfDefList.add(input);
+        CfDef output = new CfDef(WordCount.KEYSPACE, WordCount.OUTPUT_COLUMN_FAMILY);
+       output.setComparator_type("AsciiType");
+       output.setDefault_validation_class("AsciiType");
+        cfDefList.add(output);
 
         client.system_add_keyspace(new KsDef(WordCount.KEYSPACE, "org.apache.cassandra.locator.SimpleStrategy",
1, cfDefList));
         int magnitude = client.describe_ring(WordCount.KEYSPACE).size();

Modified: cassandra/trunk/contrib/word_count/src/WordCountSetup.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/contrib/word_count/src/WordCountSetup.java?rev=1042851&r1=1042850&r2=1042851&view=diff
==============================================================================
--- cassandra/trunk/contrib/word_count/src/WordCountSetup.java (original)
+++ cassandra/trunk/contrib/word_count/src/WordCountSetup.java Mon Dec  6 23:24:17 2010
@@ -99,8 +99,14 @@ public class WordCountSetup
     private static void setupKeyspace(Cassandra.Iface client) throws TException, InvalidRequestException
     {
         List<CfDef> cfDefList = new ArrayList<CfDef>();
-        cfDefList.add(new CfDef(WordCount.KEYSPACE, WordCount.COLUMN_FAMILY));
-        cfDefList.add(new CfDef(WordCount.KEYSPACE, WordCount.OUTPUT_COLUMN_FAMILY));
+        CfDef input = new CfDef(WordCount.KEYSPACE, WordCount.COLUMN_FAMILY);
+       input.setComparator_type("AsciiType");
+       input.setDefault_validation_class("AsciiType");
+       cfDefList.add(input);
+        CfDef output = new CfDef(WordCount.KEYSPACE, WordCount.OUTPUT_COLUMN_FAMILY);
+       output.setComparator_type("AsciiType");
+       output.setDefault_validation_class("AsciiType");
+        cfDefList.add(output);
 
         client.system_add_keyspace(new KsDef(WordCount.KEYSPACE, "org.apache.cassandra.locator.SimpleStrategy",
1, cfDefList));
         int magnitude = client.describe_ring(WordCount.KEYSPACE).size();



Mime
View raw message