'How to fetch or view executed hive queries on hive metadata

I have configured mysql as metastore to hive and i am able to view hive tables,columns,partitions in sql . Simillarly,i need to view the hive queries executed on hive data.

When i run the hive query in hive shell, the query is stored in hive history file at default location.Since my metastore is mysql for hive whenever i create a table with some columns in hive shell,it gets populated in sql metastore database.

I want to view the hive queries over a period of time populated in a sql table, but not through the web browser. I found cloudera navigator where they show hive queries on lineage diagram.

Can anyone suggest me some idea on this scenario. I mean can i fetch those executed sql queries using java/jdbc.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source