You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2012/11/27 00:06:16 UTC
[4/10] git commit: Switch word count to M3P. Patch by brandonwilliams
reviewed by yukim for CASSANDRA-4975
Switch word count to M3P. Patch by brandonwilliams reviewed by yukim
for CASSANDRA-4975
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f31c5304
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f31c5304
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f31c5304
Branch: refs/heads/trunk
Commit: f31c53049d37b16e413eb9ae7d481014f5391e9c
Parents: 452f596
Author: Brandon Williams <br...@apache.org>
Authored: Mon Nov 26 16:59:54 2012 -0600
Committer: Brandon Williams <br...@apache.org>
Committed: Mon Nov 26 16:59:54 2012 -0600
----------------------------------------------------------------------
examples/hadoop_word_count/src/WordCount.java | 4 ++--
.../hadoop_word_count/src/WordCountCounters.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31c5304/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 96bcb1b..a0ad913 100644
--- a/examples/hadoop_word_count/src/WordCount.java
+++ b/examples/hadoop_word_count/src/WordCount.java
@@ -198,7 +198,7 @@ public class WordCount extends Configured implements Tool
ConfigHelper.setInputRpcPort(job.getConfiguration(), "9160");
ConfigHelper.setInputInitialAddress(job.getConfiguration(), "localhost");
- ConfigHelper.setInputPartitioner(job.getConfiguration(), "RandomPartitioner");
+ ConfigHelper.setInputPartitioner(job.getConfiguration(), "Murmur3Partitioner");
ConfigHelper.setInputColumnFamily(job.getConfiguration(), KEYSPACE, COLUMN_FAMILY);
SlicePredicate predicate = new SlicePredicate().setColumn_names(Arrays.asList(ByteBufferUtil.bytes(columnName)));
ConfigHelper.setInputSlicePredicate(job.getConfiguration(), predicate);
@@ -216,7 +216,7 @@ public class WordCount extends Configured implements Tool
}
ConfigHelper.setOutputInitialAddress(job.getConfiguration(), "localhost");
- ConfigHelper.setOutputPartitioner(job.getConfiguration(), "RandomPartitioner");
+ ConfigHelper.setOutputPartitioner(job.getConfiguration(), "Murmur3Partitioner");
job.waitForCompletion(true);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31c5304/examples/hadoop_word_count/src/WordCountCounters.java
----------------------------------------------------------------------
diff --git a/examples/hadoop_word_count/src/WordCountCounters.java b/examples/hadoop_word_count/src/WordCountCounters.java
index 2d843df..e5a2460 100644
--- a/examples/hadoop_word_count/src/WordCountCounters.java
+++ b/examples/hadoop_word_count/src/WordCountCounters.java
@@ -89,7 +89,7 @@ public class WordCountCounters extends Configured implements Tool
ConfigHelper.setInputRpcPort(job.getConfiguration(), "9160");
ConfigHelper.setInputInitialAddress(job.getConfiguration(), "localhost");
- ConfigHelper.setInputPartitioner(job.getConfiguration(), "org.apache.cassandra.dht.RandomPartitioner");
+ ConfigHelper.setInputPartitioner(job.getConfiguration(), "org.apache.cassandra.dht.Murmur3Partitioner");
ConfigHelper.setInputColumnFamily(job.getConfiguration(), WordCount.KEYSPACE, WordCountCounters.COUNTER_COLUMN_FAMILY);
SlicePredicate predicate = new SlicePredicate().setSlice_range(
new SliceRange().