[
https://issues.apache.org/jira/browse/HIVE-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747177#action_12747177
]
Ashish Thusoo commented on HIVE-788:
------------------------------------
The idea here is similar to DML triggers. If we do this as triggers on the
insert and load statements then we can address Edward's use case as well.
Basically whenever data is added to a table a trigger gets executed. Look at
DML triggers at
Look at
http://dev.mysql.com/doc/refman/5.1/en/trigger-syntax.html
The DML triggers may be before or after inserts. You can find similar examples
with Oracle.
One variation is obviously to execute a user script when the trigger fires.
A is better if the number of such scripts is low in number but if more and more
users use these mechanisms it become quickly non performant and would put a lot
of load on the metastore. Traditionally B has been the model is most RDBMSs so
when we call these triggers users would expect similar functionality perhaps.
> Triggers when a new partition is created for a table
> ----------------------------------------------------
>
> Key: HIVE-788
> URL: https://issues.apache.org/jira/browse/HIVE-788
> Project: Hadoop Hive
> Issue Type: New Feature
> Reporter: Zheng Shao
>
> One requirement for HIVE-787 is that users would like to run a command
> whenever a new partition of a Hive table gets created.
> There are several ways to achieve this functionality:
> A. Probe and wait: We can have the scripts running in a loop checking if a
> new partition is created.
> Pros: easy to write, easy to control
> Cons: will introduce another delay based on the probing interval.
> B. Triggered: The command is registered inside the hive metastore. Whenever a
> partition gets created, we run the registered command.
> Several questions around option B are:
> 1. whether to support registration of HiveQL or shell command;
> 2. which machine/environment to run the command;
> 3. what to do if the registered command failed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.