Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CB8DB200C24 for ; Thu, 19 Jan 2017 04:24:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA339160B43; Thu, 19 Jan 2017 03:24:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4650E160B44 for ; Thu, 19 Jan 2017 04:24:13 +0100 (CET) Received: (qmail 91815 invoked by uid 500); 19 Jan 2017 03:24:12 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 91797 invoked by uid 99); 19 Jan 2017 03:24:11 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2017 03:24:11 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 93E69DFA43; Thu, 19 Jan 2017 03:24:11 +0000 (UTC) From: sohami To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #710: DRILL-5126: Provide simplified, unified "cluster fi... Content-Type: text/plain Message-Id: <20170119032411.93E69DFA43@git1-us-west.apache.org> Date: Thu, 19 Jan 2017 03:24:11 +0000 (UTC) archived-at: Thu, 19 Jan 2017 03:24:14 -0000 Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/710#discussion_r96785415 --- Diff: exec/java-exec/src/test/java/org/apache/drill/test/QueryBuilder.java --- @@ -49,6 +57,107 @@ public class QueryBuilder { /** + * Listener used to retrieve the query summary (only) asynchronously + * using a {@link QuerySummaryFuture}. + */ + + public class SummaryOnlyQueryEventListener implements UserResultsListener { + + private final QuerySummaryFuture future; + private QueryId queryId; + private int recordCount; + private int batchCount; + private long startTime; + + public SummaryOnlyQueryEventListener(QuerySummaryFuture future) { + this.future = future; + startTime = System.currentTimeMillis(); + } + + @Override + public void queryIdArrived(QueryId queryId) { + this.queryId = queryId; + } + + @Override + public void submissionFailed(UserException ex) { + future.completed(new QuerySummary(queryId, recordCount, batchCount, + System.currentTimeMillis() - startTime, ex)); --- End diff -- formatting --- 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. ---