Hello
I was wondering about that the property is not getting picked up from beeline;
but it looks ok to me:
$ beeline -u 'jdbc:hive2://...' --hiveconf hive.exec.post.hooks=asd -e 'select
1'
Connected to: Apache Hive (version 1.2.1000.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while processing statement: FAILED: Hive Internal Error:
java.lang.ClassNotFoundException(asd) (state=08S01,code=12)
Which version of hive are you using?
Try first with a non-existent classname. Executing the hooks usually leave some
messages in the logs as well...
cheers,
Zoltan
On 08/22/2018 11:22 AM, Chetan Kothari wrote:
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://example.com:2181 <http://example.com:2181>,example.com:2181
<http://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://example.com:2181 <http://example.com:2181>,example.com:2181
<http://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 <chetan.koth...@oracle.com
<mailto: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:* user@hive.apache.org <mailto: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