mirror of https://github.com/apache/cassandra
Switch word count to M3P. Patch by brandonwilliams reviewed by yukim
for CASSANDRA-4975
This commit is contained in:
parent
452f596827
commit
f31c53049d
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
|
|
|
|||
Loading…
Reference in New Issue