Thanks Tanvi for your inputs. Hook is not getting called from beeline/JDBC for any queries.
I ensured that hive-site.xml is in classpath and also tried following but still hook is not getting called. beeline -u "jdbc:hive2://HYPERLINK "http://example.com:2181"example.com:2181,HYPERLINK "http://example.com:2181"example.com:2181,example:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --hiveconf hive.exec.post.hooks=<your_custom_hook_here> Regards Chetan From: Tanvi Thacker [mailto:tanvithack...@gmail.com] Sent: Wednesday, August 22, 2018 9:29 AM To: user@hive.apache.org Subject: Re: Hook is not getting called on running query from beeline Is the hook getting called from beeline/JDBC for queries other than CTAS? can you make sure that your configuration is correctly loaded by beeline or JDBC code? you may check hive-site.xml is in the classpath or add a property when requesting a connection from DriverManager or you may also try like this beeline -u "jdbc:hive2://HYPERLINK "http://example.com:2181"example.com:2181,HYPERLINK "http://example.com:2181"example.com:2181,example:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --hiveconf hive.exec.post.hooks=<your_custom_hook_here> Regards, Tanvi Thacker On Tue, Aug 21, 2018 at 9:00 AM Chetan Kothari <HYPERLINK "mailto:chetan.koth...@oracle.com"chetan.koth...@oracle.com> wrote: Any inputs on following issue will be helpful Regards Chetan From: Chetan Kothari Sent: Tuesday, August 21, 2018 6:27 PM To: HYPERLINK "mailto:user@hive.apache.org"user@hive.apache.org Subject: Hook is not getting called on running query from beeline Hi I have written custom PostExecutionHook which implements org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext to capture lineage of hive queries like create table as select etc. This hook get's called when I run CTAS query o Hive Shell. But it is not getting called when I run same query from beeline or programmatically using JDBC Code. Any inputs on why hook is not getting called when I run query from beeline or programmatically using JDBC Code. Regards Chetan