cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: update WordCount for SuperColumn refactor
Date Wed, 06 Feb 2013 22:31:30 GMT
Updated Branches:
  refs/heads/trunk ed79a59d9 -> 22d8e8448


update WordCount for SuperColumn refactor


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

Branch: refs/heads/trunk
Commit: 22d8e8448a5db16a2c550664773780748e801bf7
Parents: ed79a59
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Feb 6 16:31:24 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Feb 6 16:31:24 2013 -0600

----------------------------------------------------------------------
 examples/hadoop_word_count/src/WordCount.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/22d8e844/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 a0ad913..398a7cb 100644
--- a/examples/hadoop_word_count/src/WordCount.java
+++ b/examples/hadoop_word_count/src/WordCount.java
@@ -25,7 +25,7 @@ import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.cassandra.db.IColumn;
+import org.apache.cassandra.db.Column;
 import org.apache.cassandra.hadoop.ColumnFamilyInputFormat;
 import org.apache.cassandra.hadoop.ConfigHelper;
 import org.apache.cassandra.utils.ByteBufferUtil;
@@ -70,7 +70,7 @@ public class WordCount extends Configured implements Tool
         System.exit(0);
     }
 
-    public static class TokenizerMapper extends Mapper<ByteBuffer, SortedMap<ByteBuffer,
IColumn>, Text, IntWritable>
+    public static class TokenizerMapper extends Mapper<ByteBuffer, SortedMap<ByteBuffer,
Column>, Text, IntWritable>
     {
         private final static IntWritable one = new IntWritable(1);
         private Text word = new Text();
@@ -81,9 +81,9 @@ public class WordCount extends Configured implements Tool
         {
         }
 
-        public void map(ByteBuffer key, SortedMap<ByteBuffer, IColumn> columns, Context
context) throws IOException, InterruptedException
+        public void map(ByteBuffer key, SortedMap<ByteBuffer, Column> columns, Context
context) throws IOException, InterruptedException
         {
-            for (IColumn column : columns.values())
+            for (Column column : columns.values())
             {
                 String name  = ByteBufferUtil.string(column.name());
                 String value = null;
@@ -137,7 +137,7 @@ public class WordCount extends Configured implements Tool
 
         private static Mutation getMutation(Text word, int sum)
         {
-            Column c = new Column();
+            org.apache.cassandra.thrift.Column c = new org.apache.cassandra.thrift.Column();
             c.setName(Arrays.copyOf(word.getBytes(), word.getLength()));
             c.setValue(ByteBufferUtil.bytes(sum));
             c.setTimestamp(System.currentTimeMillis());


Mime
View raw message