Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/1781#discussion_r88944588 --- Diff: external/storm-cassandra/src/main/java/org/apache/storm/cassandra/executor/AsyncExecutor.java --- @@ -138,6 +139,109 @@ public void onFailure(Throwable t) { } /** + * Asynchronously executes the specified select statements. Results will be passed to the {@link AsyncResultSetHandler} + * once each query has succeed or failed. + */ + public SettableFuture<List<T>> execAsync(final List<Statement> statements, final List<T> inputs, Integer maxParallelRequests, final AsyncResultSetHandler<T> handler) { + + final SettableFuture<List<T>> settableFuture = SettableFuture.create(); + final AsyncContext<T> asyncContext = new AsyncContext<>(inputs, maxParallelRequests, settableFuture); + + for (int i = 0; i < statements.size(); i++) { + + // Acquire a slot + if (asyncContext.acquire()) { + + --- End diff -- nit: don't need the extra line
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---