cassandra 大批量读操作

一个悲催的消息是cassandra 3.0 里面目前还不支持 fetch_size,请猛戳:
https://datastax-oss.atlassian.net/browse/PYTHON-323
https://github.com/datastax/python-driver/pull/389

众所周知fetch_size 是全量读,分页(iteration)展示,那么cassandra 这种不建议全表扫描的数据库不支持 fetch_size 也是在情理之中的了。

想要用python driver 大批量/分页读取cassandra 数据的朋友们,可以用如下体位(啊不,方式):