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

Eugene commented on GRIFFIN-200:
--------------------------------

[~guoyp] [~chemikadze] 

I think it's better to take advantage of existed life cycle to implement 
instead of new defined interface.

I don't know if livy job handle listener is enough to fulfill this requirement, 
but it looks good.

[https://livy.incubator.apache.org/docs/latest/api/java/org/apache/livy/JobHandle.Listener.html]

 

about life cycle listener, do we need multiple listeners? what's use case for 
multiple listeners, in my gut feeling one listener per one job is enough.

 

about synchronous or asynchronous, I prefer asynchronous on the grounds that in 
a distributed system, we cannot assure synchronous call could return 
considering networking/partition problems.

 

 

 

> Lifecycle hooks support
> -----------------------
>
>                 Key: GRIFFIN-200
>                 URL: https://issues.apache.org/jira/browse/GRIFFIN-200
>             Project: Griffin (Incubating)
>          Issue Type: New Feature
>            Reporter: Nikolay Sokolov
>            Assignee: William Guo
>            Priority: Minor
>
> In some environments, users might want to perform certain actions 
> before/after job is created, before/after job is activated, before/after job 
> is deleted, and so on.
> To fullfill that need, some hook plugin mechanism can be provided, similar to 
> what Hive is doing. User would place respective jar files into Service module 
> classpath at deployment time, and would specify class names using some 
> annotation or using property listing class names (particular mechanism is yet 
> to be determined).
> Proposed signature:
> {code:none}
> public interface JobLifecycleHook {
>     void onJobEvent(JobLifecycleEvent event) throws Exception;
> }
> public class BeforeJobCreated implements JobLifecycleEvent { ... }
> public class AfterJobCreated implements JobLifecycleEvent { ... }
> public class BeforeJobDeleted implements JobLifecycleEvent { ... }
> public class AfterJobDeleted implements JobLifecycleEvent { ... }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to