[ 
https://issues.apache.org/jira/browse/HIVE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012293#comment-13012293
 ] 

Krishna Kumar commented on HIVE-2071:
-------------------------------------

Namit,

 While we can read the config variable "hive.exec.pre.hooks", parse it and 
prune specific entries from it (hard-coded? driven by yet another config?) on 
entry to createSources in QTestUtil, and then restore the original value before 
exit from createSources, there are two other possibilities apart from the 
temporary config entry method I went with in the original patch.

1. Use the sessionstate instance to record that we are in initialization phase. 
The rest of the code including hooks can make use of this (since they all have 
access to the thread-local object) in any which way they want.
2. Add specific methods to the Driver to inform that we are in test 
initialization phase. The driver can use this info to prune the hooks invoked 
(all/specific? again another config?)

I myself prefer the temporary config method or the sessionstate method, since 
it gives the freedom to shape the behavior of the system in the future during 
test initialization - for instance to avoid authentication checks, concurrency 
lock acquisitions at al. 

Your thoughts?
 

> enforcereadonlytables hook should not check a configuration variable
> --------------------------------------------------------------------
>
>                 Key: HIVE-2071
>                 URL: https://issues.apache.org/jira/browse/HIVE-2071
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Namit Jain
>            Assignee: Krishna Kumar
>
> Instead of adding a new configuration parameter which is being checked in
> EnforceReadOnlyTables, it might be easier to remove EnforceReadOnlyTables
> from the hive.exec.pre.hooks at creation time.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to