> On March 31, 2013, 9:23 a.m., Mohammad Islam wrote: > > trunk/client/src/main/java/org/apache/oozie/client/event/JobEvent.java, > > line 34 > > <https://reviews.apache.org/r/9602/diff/6/?file=276275#file276275line34> > > > > so many type and status. do we need so many thing? > > it might confuse the people. Pls give a second thought in this line. > > Mona Chitnis wrote: > Consolidating event types will offload burden on each event listener > method to have a switch case and generate JMS/email notification based on > status and app-type. We wanted to keep the listener code path as small as > possible, hence the explicit enumeration of all event types at the beginning > itself. People get a chance to filter on higher level values as well such as > app-type and event-status, but each message's event-type will be specific for > their benefit. > > Mohammad Islam wrote: > Agreed from dev perspective. My concern is from user perspective. Does > he/she will need to know all these different types/status. I prefer the user > simplicity over code simplicity. If we have to write complex code to provide > easiness to user, i think it is ok. > > For example, I want events for all WF jobs or I want all WF job that > failed or all job that failed, it is beautiful if user doesn't need to where > it is apptype or messagetype or eventtype or event status. > > Please consider from that philosophy. > > > Virag Kothari wrote: > All this different types are for better filtering of events and more > selector options for the consumer > > For. e.g > If the user wants all job notification but no sla, then he will do > messageType='job' > If the user cares about notifications only for workflow job, he can have > 'appType=workflow_job' > If the user cares only about notifications for failed jobs, he will have > 'eventStatus=FAILURE' > If the user cares about a particular event status for a particular job > type, he can have 'eventType = appType + eventStatus (Workflow_job_failure) > > If we remove any one of this, the user can still use a combination of > selectors but I dont think it is very flexible for the user. > For. e.g if we remove appType and the user cares about notification only > on workflow job, then he has to have > eventtype='Workflow_job_start' or eventtype='workflow_job_failure' or > eventtype='workflow_job_suspend' or eventtype='workflow_job_succeed' > instead of just doing 'apptype=workflow_job' > > If we have proper documenation and examples related to the different > selector options, do you think it may still be confusing for the user? > >
So many terminologies might confuse the user. In another extreme, if user specifies only one thing such as job or workflow_job or FAILURE or workflow_job_failure. It will be the oozie's internal responsibility how to convert/map them to reply. In other words, there will be only one type and mapping will be internal. I was/am basically confused about so many types. None of them is pretty obvious from a new user. May be you are discussing those many times and make sense to you. I want to give user the similar filtration while maintaining the simplicity (if possible) as much as possible. Providing documentation might not be a good sell. Because it will demand a very stiff learning curve. We already have that criticism against Oozie. - Mohammad ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9602/#review18566 ----------------------------------------------------------- On April 3, 2013, 3:35 a.m., Mona Chitnis wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9602/ > ----------------------------------------------------------- > > (Updated April 3, 2013, 3:35 a.m.) > > > Review request for oozie. > > > Description > ------- > > https://issues.apache.org/jira/browse/OOZIE-1209 > WIP patch > > > This addresses bug OOZIE-1209. > https://issues.apache.org/jira/browse/OOZIE-1209 > > > Diffs > ----- > > trunk/client/src/main/java/org/apache/oozie/client/SLAEvent.java 1463328 > trunk/client/src/main/java/org/apache/oozie/client/event/Event.java > PRE-CREATION > trunk/client/src/main/java/org/apache/oozie/client/event/JobEvent.java > PRE-CREATION > trunk/client/src/main/java/org/apache/oozie/client/event/SLAEvent.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/CoordinatorJobBean.java 1463328 > > trunk/core/src/main/java/org/apache/oozie/client/rest/JsonCoordinatorAction.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/XCommand.java 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionCheckXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionReadyXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionStartXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionTimeOutXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionUpdateXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordMaterializeTransitionXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordRerunXCommand.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordinatorXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/wf/KillXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/wf/ResumeXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/wf/SuspendXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java > 1463328 > trunk/core/src/main/java/org/apache/oozie/event/BundleJobEvent.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/CoordinatorActionEvent.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/CoordinatorJobEvent.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/EventQueue.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/MemoryEventQueue.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/WorkflowActionEvent.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/event/WorkflowJobEvent.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/event/listener/JobEventListener.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/CoordinatorJobGetForUserAppnameJPAExecutor.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/service/EventHandlerService.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/service/RecoveryService.java > 1463328 > > trunk/core/src/main/java/org/apache/oozie/sla/event/listener/SLAEventListener.java > PRE-CREATION > trunk/core/src/main/resources/oozie-default.xml 1463328 > > trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionStartXCommand.java > 1463328 > trunk/core/src/test/java/org/apache/oozie/event/TestEventGeneration.java > PRE-CREATION > trunk/core/src/test/java/org/apache/oozie/event/TestEventQueue.java > PRE-CREATION > > trunk/core/src/test/java/org/apache/oozie/service/TestEventHandlerService.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/9602/diff/ > > > Testing > ------- > > unit tests added > > > Thanks, > > Mona Chitnis > >
