title: Cassandra DataStax driver: how to page through columns
body: <p>I have wide rows with timestamp columns. If I use the DataStax Java driver, I can page row results by using LIMIT or FETCH_SIZE, however, I could not find any specifics as to how I can page through columns for a specific row.</p>
  
  <p>I found this post: <a href="http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/CQL-3-and-wide-rows-td7594577.html" rel="nofollow">http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/CQL-3-and-wide-rows-td7594577.html</a>
  which explains how I could get ranges of columns based on the column name (timestamp) values. </p>
  
  <p>However, what I need to do is to get ALL columns, I just don't want to load them all into memory , but rather "stream" the results and process a chunk of columns (preferably of a controllable size) at a time until all columns of the row are processed.
  Does the DataStax driver support streaming of this kind? and of so - what is the syntax for using it?</p>
  
  <p>Additional clarification:
  Essentially, what I'm looking for is an equivalent of the Hector's ColumnSliceIterator using which I could iterate over all columns (up to Integer.MAX_VALUE number) of a specific row in batches of, say, 100 columns at a time as following:</p>
  
  <pre><code>SliceQuery sliceQuery = HFactory.createSliceQuery(keySpace, ...);
  sliceQuery.setColumnFamily(MY_COLUMN_FAMILY);
  sliceQuery.setKey(myRowKey);
  // columns to be returned. The null value indicates all columns
  sliceQuery.setRange(
      null // start column
      , null // end column
      , false // reversed order
      , Integer.MAX_VALUE // number of columns to return
  );
  
  ColumnSliceIterator iter = new ColumnSliceIterator( 
      sliceQuery // previously created slice query needs to be passed as parameter
      , null // starting column name
      , null // ending column name
      , false // reverse
      , 100 // column count &lt;-- the batch size 
  );
  while (iter.hasNext()) {
      String myColumnValue = iter.next().getValue();
  }
  </code></pre>
  
  <p>How do I do the exact same thing using the DataStax driver?</p>
  
  <p>thanks!</p>
  
  <p>Marina</p>