Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F41EE8BC for ; Wed, 6 Feb 2013 22:31:31 +0000 (UTC) Received: (qmail 61891 invoked by uid 500); 6 Feb 2013 22:31:30 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 61848 invoked by uid 500); 6 Feb 2013 22:31:30 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 61837 invoked by uid 99); 6 Feb 2013 22:31:30 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 22:31:30 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5E95B245D3; Wed, 6 Feb 2013 22:31:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbellis@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: update WordCount for SuperColumn refactor Message-Id: <20130206223130.5E95B245D3@tyr.zones.apache.org> Date: Wed, 6 Feb 2013 22:31:30 +0000 (UTC) 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 Authored: Wed Feb 6 16:31:24 2013 -0600 Committer: Jonathan Ellis 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, Text, IntWritable> + public static class TokenizerMapper extends Mapper, 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 columns, Context context) throws IOException, InterruptedException + public void map(ByteBuffer key, SortedMap 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());