apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXMALHAR-1988) CassandraInputOperator fetches less number of records inconsistenly
Date Mon, 14 Mar 2016 10:23:33 GMT

    [ https://issues.apache.org/jira/browse/APEXMALHAR-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15193053#comment-15193053
] 

ASF GitHub Bot commented on APEXMALHAR-1988:
--------------------------------------------

Github user bhupeshchawda commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-malhar/pull/186#discussion_r55979742
  
    --- 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 --
    
    Is this if() needed?


> CassandraInputOperator fetches less number of records inconsistenly
> -------------------------------------------------------------------
>
>                 Key: APEXMALHAR-1988
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-1988
>             Project: Apache Apex Malhar
>          Issue Type: Bug
>            Reporter: Priyanka Gugale
>            Assignee: Priyanka Gugale
>
> CassandraInputOperator fetches less number of records than available in table. Also number
of records returned in each runs are different.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message