You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Daniel Haviv <da...@gmail.com> on 2018/10/04 07:36:21 UTC

Hive Metastore Hook to to fire only on success

Hi,
I'm writing a HMS hook and I noticed that the hook fires no matter if the
operation succeeded or not.
For example, if a user creates an already existing table, the operation
will fail but the the hook will fire regardless.

Is there a way to either validate that the operation succeeded or fire only
upon success?


TY.
Daniel

Re: Hive Metastore Hook to to fire only on success

Posted by Daniel Haviv <da...@gmail.com>.
Thanks.
I was using MetaStoreEventListener and wasn't aware there's another type of
HMS hook.

TY.
Daniel

On Fri, Oct 5, 2018 at 10:54 PM Alan Gates <al...@gmail.com> wrote:

> Which version of Hive are you on and which hook are you seeing fire?
> Based on looking at the master code you should only see the
> commitCreateTable hook call if the creation succeeds.
>
> Alan.
>
> On Thu, Oct 4, 2018 at 12:36 AM Daniel Haviv <da...@gmail.com>
> wrote:
>
>> Hi,
>> I'm writing a HMS hook and I noticed that the hook fires no matter if the
>> operation succeeded or not.
>> For example, if a user creates an already existing table, the operation
>> will fail but the the hook will fire regardless.
>>
>> Is there a way to either validate that the operation succeeded or fire
>> only upon success?
>>
>>
>> TY.
>> Daniel
>>
>

Re: Hive Metastore Hook to to fire only on success

Posted by Alan Gates <al...@gmail.com>.
Which version of Hive are you on and which hook are you seeing fire?  Based
on looking at the master code you should only see the commitCreateTable
hook call if the creation succeeds.

Alan.

On Thu, Oct 4, 2018 at 12:36 AM Daniel Haviv <da...@gmail.com> wrote:

> Hi,
> I'm writing a HMS hook and I noticed that the hook fires no matter if the
> operation succeeded or not.
> For example, if a user creates an already existing table, the operation
> will fail but the the hook will fire regardless.
>
> Is there a way to either validate that the operation succeeded or fire
> only upon success?
>
>
> TY.
> Daniel
>