mirror of https://github.com/apache/cassandra
Update word_count README
git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@1042863 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0aa85e9398
commit
7eae748cc3
|
|
@ -13,15 +13,15 @@ contrib/word_count$ bin/word_count
|
|||
The output of the word count can now be configured. In the bin/word_count
|
||||
file, you can specify the OUTPUT_REDUCER. The two options are 'filesystem'
|
||||
and 'cassandra'. The filesystem option outputs to the /tmp/word_count*
|
||||
directories. The cassandra option outputs to the 'Standard2' column family.
|
||||
directories. The cassandra option outputs to the 'output_words' column family
|
||||
in the 'wordcount' keyspace.
|
||||
|
||||
In order to view the results in Cassandra, one can use python/pycassa and
|
||||
In order to view the results in Cassandra, one can use bin/cassandra-cli and
|
||||
perform the following operations:
|
||||
$ python
|
||||
>>> import pycassa
|
||||
>>> con = pycassa.connect('Keyspace1')
|
||||
>>> cf = pycassa.ColumnFamily(con, 'Standard2')
|
||||
>>> list(cf.get_range())
|
||||
$ bin/cassandra-cli
|
||||
> connect localhost/9160
|
||||
> use wordcount;
|
||||
> list output_words;
|
||||
|
||||
Read the code in src/ for more details.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue