You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by siva kumar <si...@gmail.com> on 2014/09/19 12:31:06 UTC

audit hive query

Hi All,
          I have a requirement to view the recently executed Hive queries
in sql. I have configured sql as metastore to hive and im able to view hive
tables,columns,partitions in sql . Simillarly,i need to view the hive
queries executed on hive data.



Any help is appreciated,
sivakumar.c

Re: audit hive query

Posted by Devopam Mittra <de...@gmail.com>.
hi Siva,
If I were to address your problem, I will create a table in hive metastore
DB , and load the Hive query text + timing in it , by writing my own custom
shell script.

And I will need to do this on all hive client machines (not just one) ,
maybe by suitably adding $HOSTNAME as another variable.

If I have Java programs calling Hive SQL queries , I may need to suitably
log it separately as well.

Hope it helps.

regards
Dev


On Mon, Sep 22, 2014 at 6:15 PM, siva kumar <si...@gmail.com> wrote:

> Hi Dev,
>             When i run the hive query in hive shell, the query is stored
> in hive history file at default location.Since my metastore is sql for hive
> whenever i create a table with some columns in hive shell,it gets populated
> in sql metastore database.Simillarly,all the queries should be popoulated
> in a sql table. I want to view the hive queries over a period of
> time populated in a sql table, but not through the web browser. Can
> u suggest me some idea on dis scenario.
>
>
> Thanks and regards,
> siva
> On Mon, Sep 22, 2014 at 9:18 AM, Devopam Mittra <de...@gmail.com> wrote:
>
>> Please check .hivehistory settings and it might be of easy / simple good
>> help .
>> If you are on Ambari based installation then simply looking into Resource
>> Manager UI should suffice the need.
>> If you are on native hadoop, then you can access the Yarn log through web
>> browser as well.
>>
>> Hope this helps
>>
>> regards
>> Dev
>>
>>
>> On Fri, Sep 19, 2014 at 4:01 PM, siva kumar <si...@gmail.com> wrote:
>>
>>> Hi All,
>>>           I have a requirement to view the recently executed Hive
>>> queries in sql. I have configured sql as metastore to hive and im able to
>>> view hive tables,columns,partitions in sql . Simillarly,i need to view
>>> the hive queries executed on hive data.
>>>
>>>
>>>
>>> Any help is appreciated,
>>> sivakumar.c
>>>
>>
>>
>>
>> --
>> Devopam Mittra
>> Life and Relations are not binary
>>
>
>


-- 
Devopam Mittra
Life and Relations are not binary

Re: audit hive query

Posted by siva kumar <si...@gmail.com>.
Hi Dev,
            When i run the hive query in hive shell, the query is stored in
hive history file at default location.Since my metastore is sql for hive
whenever i create a table with some columns in hive shell,it gets populated
in sql metastore database.Simillarly,all the queries should be popoulated
in a sql table. I want to view the hive queries over a period of
time populated in a sql table, but not through the web browser. Can
u suggest me some idea on dis scenario.


Thanks and regards,
siva
On Mon, Sep 22, 2014 at 9:18 AM, Devopam Mittra <de...@gmail.com> wrote:

> Please check .hivehistory settings and it might be of easy / simple good
> help .
> If you are on Ambari based installation then simply looking into Resource
> Manager UI should suffice the need.
> If you are on native hadoop, then you can access the Yarn log through web
> browser as well.
>
> Hope this helps
>
> regards
> Dev
>
>
> On Fri, Sep 19, 2014 at 4:01 PM, siva kumar <si...@gmail.com> wrote:
>
>> Hi All,
>>           I have a requirement to view the recently executed Hive queries
>> in sql. I have configured sql as metastore to hive and im able to view hive
>> tables,columns,partitions in sql . Simillarly,i need to view the hive
>> queries executed on hive data.
>>
>>
>>
>> Any help is appreciated,
>> sivakumar.c
>>
>
>
>
> --
> Devopam Mittra
> Life and Relations are not binary
>

Re: audit hive query

Posted by Devopam Mittra <de...@gmail.com>.
Please check .hivehistory settings and it might be of easy / simple good
help .
If you are on Ambari based installation then simply looking into Resource
Manager UI should suffice the need.
If you are on native hadoop, then you can access the Yarn log through web
browser as well.

Hope this helps

regards
Dev


On Fri, Sep 19, 2014 at 4:01 PM, siva kumar <si...@gmail.com> wrote:

> Hi All,
>           I have a requirement to view the recently executed Hive queries
> in sql. I have configured sql as metastore to hive and im able to view hive
> tables,columns,partitions in sql . Simillarly,i need to view the hive
> queries executed on hive data.
>
>
>
> Any help is appreciated,
> sivakumar.c
>



-- 
Devopam Mittra
Life and Relations are not binary