apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhupeshchawda <...@git.apache.org>
Subject [GitHub] apex-malhar pull request #358: APEXMALHAR-2172: Updates to JDBC Poll Input O...
Date Wed, 10 Aug 2016 05:32:08 GMT
Github user bhupeshchawda commented on a diff in the pull request:

    https://github.com/apache/apex-malhar/pull/358#discussion_r74187569
  
    --- Diff: library/src/main/java/com/datatorrent/lib/db/jdbc/AbstractJdbcPollInputOperator.java
---
    @@ -638,24 +504,191 @@ public void partitioned(
         public void run()
         {
           while (execute) {
    -        try {
    -          long startTs = System.currentTimeMillis();
    -          if ((isPollable && !isPolled) || !isPollable) {
    -            pollRecords(ps);
    -          }
    -          long endTs = System.currentTimeMillis();
    -          long ioTime = endTs - startTs;
    -          long sleepTime = pollInterval - ioTime;
    -          LOG.debug("pollInterval = {} , I/O time = {} , sleepTime = {}", pollInterval,
ioTime, sleepTime);
    -          Thread.sleep(sleepTime > 0 ? sleepTime : 0);
    -        } catch (Exception ex) {
    -          cause.set(ex);
    -          execute = false;
    +        if ((isPollerPartition && !isPolled) || !isPollerPartition) {
    +          pollRecords();
             }
           }
         }
       }
     
    -  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(AbstractJdbcPollInputOperator.class);
    +  @VisibleForTesting
    +  protected void setScheduledExecutorService(ScheduledExecutorService service)
    +  {
    +    scanService = service;
    +  }
    +
    +  /**
    +   * Gets {@link WindowDataManager}
    +   *
    +   * @return
    +   */
    +  public WindowDataManager getWindowManager()
    +  {
    +    return windowManager;
    +  }
    +
    +  /**
    +   * Sets {@link WindowDataManager}
    +   *
    +   * @return
    --- End diff --
    
    ```@param``` needed instead of ```@return```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message