Cassandra WordCount Hadoop

183 views Asked by At

Can anyone explain to me the following lines from Cassandra 2.1.15 WordCount example?

CqlConfigHelper.setInputCQLPageRowSize(job.getConfiguration(), "3");
CqlConfigHelper.setInputCql(job.getConfiguration(), "select * from " + COLUMN_FAMILY + " where token(id) > ? and token(id) <= ? allow filtering");

How do I define concrete values which will be used to replace "?" in the query?

And what is meant by page row size?

1

There are 1 answers

7
RussS On BEST ANSWER

How do I define concrete values which will be used to replace "?" in the query?

You don't. These parameterized values are set by the splits created by the input format. They are set automatically but can be adjusted (to a degree) by adjusting the split size.

And what is meant by page row size?

Page row size determines the number of CQL Rows retrieved in a single request by a mapper during execution. If a C* partition contains 10000 CQL rows and the page row size is set to 1000, it will take 10 requests to retrieve all of the data.