cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Kołaczkowski (JIRA) <>
Subject [jira] [Commented] (CASSANDRA-6311) Add CqlRecordReader to take advantage of native CQL pagination
Date Wed, 12 Mar 2014 09:24:44 GMT


Piotr Kołaczkowski commented on CASSANDRA-6311:

Now it looks better, but I don't get why you need this magic constant here:
if (count > 2)

Why not just create a list of (origHost, liveRemoteHost1, liveRemoteHost2, ..., liveRemoteHostN)
and return an iterator to it?
To avoid creating a new list just to get an iterator, you can use Iterators.concat:

return Iterators.concat(Collections.singletonList(origHost).iterator(), liveRemoteHosts.iterator());

> Add CqlRecordReader to take advantage of native CQL pagination
> --------------------------------------------------------------
>                 Key: CASSANDRA-6311
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Hadoop
>            Reporter: Alex Liu
>            Assignee: Alex Liu
>             Fix For: 2.0.7
>         Attachments: 6311-v3-2.0-branch.txt, 6311-v4.txt, 6311-v5-2.0-branch.txt, 6311-v6-2.0-branch.txt,
6311-v7.txt, 6331-2.0-branch.txt, 6331-v2-2.0-branch.txt
> Since the latest Cql pagination is done and it should be more efficient, so we need update
CqlPagingRecordReader to use it instead of the custom thrift paging.

This message was sent by Atlassian JIRA

View raw message