Github user DT-Priyanka commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/186#discussion_r55993453
  
    --- Diff: 
contrib/src/main/java/com/datatorrent/contrib/cassandra/AbstractCassandraInputOperator.java
 ---
    @@ -104,19 +108,29 @@ public void emitTuples()
         String query = queryToRetrieveData();
         logger.debug("select statement: {}", query);
     
    +    SimpleStatement stmt = new SimpleStatement(query);
    +    stmt.setFetchSize(limit);
         try {
    -      ResultSet result = store.getSession().execute(query);
    +      if (nextPageState != null) {
    +        stmt.setPagingState(nextPageState);
    +      }
    +      ResultSet result = store.getSession().execute(stmt);
    +      nextPageState = result.getExecutionInfo().getPagingState();
    +
    +      int remaining = result.getAvailableWithoutFetching();
           if (!result.isExhausted()) {
             for (Row row : result) {
               T tuple = getTuple(row);
               emit(tuple);
    +          if (--remaining == 0) {
    --- End diff --
    
    removing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to