You can pass a UserResultsListener to DrillClient.runQuery(). The listener
has 2 methods that you can use to check the status after the query
completes:

if the query fails, submissionFailed(UseException ex) will be called, ex
will contain the error message

if the query completes or is cancelled, queryCompleted(QueryState state)
will be called, state will contain the final status of the query.

I am not aware of a way to get the query state before the query completes.

Thanks!

On Thu, May 14, 2015 at 4:35 PM, Matthew Hsu <[email protected]> wrote:

> Hello Abdel,
>
> Yes, I am looking for the query state for both cases (when the query is
> being executed and after query completion).
>
> Thanks,
>
> Matthew Hsu
> Computer Scientist | Simba Technologies Inc.
> +1.604.633.0008 | [email protected]
>
> 938 West 8th Avenue | Vancouver, BC | Canada | V5Z 1E5
> The Big Data Connectivity Experts | www.simba.com
>
>
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information.  Any unauthorized
> review, use, disclosure, or distribution is prohibited.  If you are not the
> intended recipient, please contact the sender by reply email and destroy
> all copies of the original message.  Thank you.
>
> -----Original Message-----
> From: Abdel Hakim Deneche [mailto:[email protected]]
> Sent: Thursday, May 14, 2015 4:15 PM
> To: [email protected]
> Subject: Re: Drill Client - Getting a Query State
>
> Hello Matthew,
>
> Are you looking for the query state after the query finishes or while it's
> being executed ?
>
>
> On Thu, May 14, 2015 at 3:18 PM, Matthew Hsu <[email protected]> wrote:
>
> >  Hello Everyone,
> >
> >
> >
> > I was following this issue a while back and noticed that it was
> > resolved
> > now: https://issues.apache.org/jira/browse/DRILL-2384
> >
> >
> >
> > The client has undergone a few changes since then with the QueryData
> > implementation. Looking at the Drill Client, I do not see a way in
> > which I can get the query state. I did notice a new function that
> > referenced
> > QueryState:
> >
> >
> >
> > @Override
> >
> > public void queryCompleted(QueryState state)
> >
> > {
> >
> > future.set(results);
> >
> > }
> >
> >
> >
> > I’m a little bit confused as to what this function is accomplishing
> > and I was wondering if there was a way in which I would be able to get
> > the QueryState for a query being executed? Any help or a point in the
> > right direction would be appreciated.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > *Matthew Hsu*
> >
> > Computer Scientist *|* Simba Technologies Inc.
> >
> > +1.604.633.0008 *|* [email protected]
> >
> >
> >
> > 938 West 8th Avenue *|* Vancouver, BC *|* Canada *| *V5Z 1E5
> >
> > *The Big Data Connectivity Experts | *www.simba.com
> >
> >
> >
> > [image: Description: Description: Description: Description: twitter]
> > <http://twitter.com/#!/simbatech>  [image: Description: Description:
> > Description: Description: youtube]
> > <http://www.youtube.com/user/SimbaTechnologies>  [image: Description:
> > Description: Description: Description: linkedin]
> > <http://www.linkedin.com/company/simba-technologies>  [image:
> > Description: Description: Description: Description: facebook]
> > <http://www.facebook.com/pages/Simba-Technologies-Inc/163133087033256>
> [image:
> > Description: Description: Description: Description: google-plus]
> > <https://plus.google.com/116908198145591559055/posts>  [image:
> > Description: Description: Description: Description: typepad]
> > <http://blogs.simba.com/>
> >
> >
> >
> > This email message is for the sole use of the intended recipient(s)
> > and may contain confidential and privileged information.  Any
> > unauthorized review, use, disclosure, or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender by
> > reply email and destroy all copies of the original message.  Thank you.
> >
> >
> >
>
>
>
> --
>
> Abdelhakim Deneche
>
> Software Engineer
>
>   <http://www.mapr.com/>
>
>
> Now Available - Free Hadoop On-Demand Training <
> http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available
> >
>



-- 

Abdelhakim Deneche

Software Engineer

  <http://www.mapr.com/>


Now Available - Free Hadoop On-Demand Training
<http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>

Reply via email to