If you want to retrieve the STDOUT logs from the HiveServer2 Thrift server,
you can see how beeline does it here:

https://github.com/apache/hive/blob/master/beeline/src/java/org/apache/hive/beeline/Commands.java#L958-L963

I used this as an example of how to pull the query logs for a recent
project.

Nicholas Szandor Hakobian
Data Scientist
Rally Health
nicholas.hakob...@rallyhealth.com


On Mon, Oct 19, 2015 at 10:30 PM, Jerrick Hoang <jerrickho...@gmail.com>
wrote:

> Right, with beeline CLI, I can see logs just fine. But with the java JDBC
> client code (
> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients) I
> can't see stdout logs
>
> On Mon, Oct 19, 2015 at 10:26 PM, r7raul1...@163.com <r7raul1...@163.com>
> wrote:
>
>> You can check more option from
>> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients .
>>
>>
>> *--showWarnings=*[true/false]
>>
>> Display warnings that are reported on the connection after issuing any
>> HiveQL commands. Default is false.
>>
>> Usage: beeline --showWarnings=true
>> *--showNestedErrs=*[true/false]
>>
>> Display nested errors. Default is false.
>>
>> Usage: beeline --showNestedErrs=true
>>
>> ------------------------------
>> r7raul1...@163.com
>>
>>
>> *From:* Jerrick Hoang <jerrickho...@gmail.com>
>> *Date:* 2015-10-20 11:55
>> *To:* user <user@hive.apache.org>
>> *Subject:* Re: Hiveserver2 client stdout
>> That would just increase the log level on the server side right? I want
>> the stdout log sent to the jdbc client.
>>
>> On Mon, Oct 19, 2015 at 6:49 PM, r7raul1...@163.com <r7raul1...@163.com>
>> wrote:
>>
>>> start hiveserver2 with  --hiveconf hive.root.logger=DEBUG,console    .
>>> Then check hiveserver2 log.
>>>
>>> ------------------------------
>>> r7raul1...@163.com
>>>
>>>
>>> *From:* Jerrick Hoang <jerrickho...@gmail.com>
>>> *Date:* 2015-10-20 09:03
>>> *To:* user <user@hive.apache.org>
>>> *Subject:* Hiveserver2 client stdout
>>> Hi all,
>>>
>>>
>>> I have a hiveserver2 client running on a remote server. I'm able to
>>> connect to it via beeline CLI and everything works fine but when I try to
>>> query via a JDBC client, the stdout is not there. For example, if the
>>> server side throws an exception, beeline can show the exception but all the
>>> JDBC client can do is giving me ` Error while processing statement: FAILED:
>>> Execution Error, return code 2 from
>>> org.apache.hadoop.hive.ql.exec.mr.MapRedTask` which is not very helpful. Is
>>> there a way to capture all stdout stderr using a JDBC? I figure if beeline
>>> is able to do it then I should be able to write a jdbc client to do it too,
>>>
>>> THanks,
>>> J
>>>
>>>
>>
>

Reply via email to