cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [5/9] git commit: switch to int for count output
Date Mon, 23 Jan 2012 22:04:52 GMT
switch to int for count output


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5409af45
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5409af45
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5409af45

Branch: refs/heads/trunk
Commit: 5409af4535e483103686a4913ea69ab2c68a4b1b
Parents: d51d6f0
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Jan 20 17:31:47 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Jan 23 16:02:28 2012 -0600

----------------------------------------------------------------------
 examples/hadoop_word_count/src/WordCount.java      |    2 +-
 examples/hadoop_word_count/src/WordCountSetup.java |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5409af45/examples/hadoop_word_count/src/WordCount.java
----------------------------------------------------------------------
diff --git a/examples/hadoop_word_count/src/WordCount.java b/examples/hadoop_word_count/src/WordCount.java
index cdd87d9..6c203d7 100644
--- a/examples/hadoop_word_count/src/WordCount.java
+++ b/examples/hadoop_word_count/src/WordCount.java
@@ -137,7 +137,7 @@ public class WordCount extends Configured implements Tool
         {
             Column c = new Column();
             c.setName(Arrays.copyOf(word.getBytes(), word.getLength()));
-            c.setValue(ByteBufferUtil.bytes(String.valueOf(sum)));
+            c.setValue(ByteBufferUtil.bytes(sum));
             c.setTimestamp(System.currentTimeMillis());
 
             Mutation m = new Mutation();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5409af45/examples/hadoop_word_count/src/WordCountSetup.java
----------------------------------------------------------------------
diff --git a/examples/hadoop_word_count/src/WordCountSetup.java b/examples/hadoop_word_count/src/WordCountSetup.java
index 7857f02..dd3c824 100644
--- a/examples/hadoop_word_count/src/WordCountSetup.java
+++ b/examples/hadoop_word_count/src/WordCountSetup.java
@@ -132,10 +132,12 @@ public class WordCountSetup
         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");
+        output.setDefault_validation_class("Int32Type");
         cfDefList.add(output);
+
         CfDef counterInput = new CfDef(WordCount.KEYSPACE, WordCountCounters.COUNTER_COLUMN_FAMILY);
         counterInput.setComparator_type("UTF8Type");
         counterInput.setDefault_validation_class("CounterColumnType");


Mime
View raw message