Hi Matthew,

  The drillbit sends back two messages to the client:

1)  A message with the isLastChunk flag set to true and query state is
PENDING and
 2) A terminal messge which has the query state changed to COMPLETED
(isLastChunk may be false).

I believe the JDBC driver batches these two messages so they are delivered
together (see QueryResultHandler.java:batchArrived()

  Not sure what you're trying to achieve., but HTH.


Parth

On Wed, Mar 25, 2015 at 12:54 PM, Matthew Hsu <matth...@simba.com> wrote:

>  Hello,
>
>
>
> I’m trying to get the query state from a completed query using the JDBC
> Drill Client, but I am only able to get QueryState.PENDING and I am unable
> to get QueryState.COMPLETED. I noticed the Drill Client has this in it:
>
> @Override
>
> public void resultArrived(QueryResultBatch result, ConnectionThrottle
> throttle)
>
> {
>
> results.add(result);
>
> if (result.getHeader().getIsLastChunk())
>
> {
>
> future.set(results);
>
> }
>
> }
>
>
>
> Should the conditional be testing for: if
> (result.getHeader().hasQueryState()) instead? I understand that in ODBC,
> the query state can be retrieved after the last chunk.
>
>
>
> If there another way around this?
>
>
>
> Thanks,
>
>
>
>
>
> *Matthew Hsu*
>
> Computer Scientist *|* Simba Technologies Inc.
>
> +1.604.633.0008 *|* matth...@simba.com
>
>
>
> 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.
>
>
>

Reply via email to