----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10569/#review20469 -----------------------------------------------------------
Comments on code apart from the test-cases trunk/client/src/main/java/org/apache/oozie/client/event/SLAEvent.java <https://reviews.apache.org/r/10569/#comment42162> what is being stored in job-data? trunk/client/src/main/resources/oozie-workflow-0.4.5.xsd <https://reviews.apache.org/r/10569/#comment42163> should we rename the file to oozie-workflow-0.5 as this has the new sla schema and chgrp functionality? trunk/core/src/main/java/org/apache/oozie/client/rest/sla/JsonSLARegistrationEvent.java <https://reviews.apache.org/r/10569/#comment42164> Instead of having alert contact, notification msg, upstream apps etc in sla config blob, can we have string columns for each of them? This will save us from one more blob! trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionMaterializeCommand.java <https://reviews.apache.org/r/10569/#comment42165> seems like SLAXoperations already makes SLACalculator add registration event to table. This seems like adding again. Wont it fail? trunk/core/src/main/java/org/apache/oozie/command/coord/CoordMaterializeTransitionXCommand.java <https://reviews.apache.org/r/10569/#comment42166> same comment as coordmaterializetransition trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSuspendXCommand.java <https://reviews.apache.org/r/10569/#comment42167> revert Update code to reflect trunk trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java <https://reviews.apache.org/r/10569/#comment42168> Remove this if generating events for wf action is not part of this patch trunk/core/src/main/java/org/apache/oozie/command/wf/ActionStartXCommand.java <https://reviews.apache.org/r/10569/#comment42170> same comment as before for generating wf actions trunk/core/src/main/java/org/apache/oozie/command/wf/KillXCommand.java <https://reviews.apache.org/r/10569/#comment42169> why remove? will this not break compatibility? trunk/core/src/main/java/org/apache/oozie/command/wf/SubmitXCommand.java <https://reviews.apache.org/r/10569/#comment42171> Registration event for workflow actions should be created only when the job is started (In signalX) trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLACalculatorGetJPAExecutor.java <https://reviews.apache.org/r/10569/#comment42172> If this returns a single record, can getSingleResult() be used trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java <https://reviews.apache.org/r/10569/#comment42173> If this returns a single record, can getSingleResult() be used trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLASummaryGetJPAExecutor.java <https://reviews.apache.org/r/10569/#comment42174> Instead of combining two JPA queries, better to have separate JPA executors as one returns list while other returns a single record trunk/core/src/main/java/org/apache/oozie/service/EventHandlerService.java <https://reviews.apache.org/r/10569/#comment42175> can we have better variable name instead of se1? trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42176> hashmap doesn't provide ordering, so I believe we are going with random ordering If this is the case, slaqueue seems a misnomer. trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42184> why should expected start be considered for duration miss? trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42185> can we move this line to common block in the if (change) block? trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42178> Instead of creating the slaCalcStatus with the entire registration bean, can we create it with only the required fields. trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42179> insertList and updateList should be local variables otherwise multiple registration events occuring during the same time will reuse them and create a mess. trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42180> no need if changed to local variables trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42182> should be synchronized. If multiple status events for the same job arrive, they may overwrite each other trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java <https://reviews.apache.org/r/10569/#comment42181> Suspend and failed shouldn't be handled in same way. Suspended jobs should be ignored for SLA's trunk/core/src/main/java/org/apache/oozie/sla/SLARegistrationBean.java <https://reviews.apache.org/r/10569/#comment42183> where is this method used? trunk/core/src/main/java/org/apache/oozie/sla/listener/SLAJobEventListener.java <https://reviews.apache.org/r/10569/#comment42186> I think we should filter suspend ones too for sla trunk/core/src/main/java/org/apache/oozie/util/SLAXOperations.java <https://reviews.apache.org/r/10569/#comment42187> if converting from float to long, why use float? same for expectedduration and expectedend - Virag Kothari On May 9, 2013, 5:45 p.m., Mona Chitnis wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10569/ > ----------------------------------------------------------- > > (Updated May 9, 2013, 5:45 p.m.) > > > Review request for oozie. > > > Description > ------- > > 1. Revisiting the SLA handling in Oozie > 2. Addition of a calculator service to process sla events in a continuous > fashion > 3. Added new oozie-sla schema v0.2, concise and relevant > > > This addresses bug OOZIE-1244. > https://issues.apache.org/jira/browse/OOZIE-1244 > > > Diffs > ----- > > trunk/client/src/main/java/org/apache/oozie/AppType.java PRE-CREATION > trunk/client/src/main/java/org/apache/oozie/client/JMSConnectionInfo.java > 1480726 > trunk/client/src/main/java/org/apache/oozie/client/SLAEvent.java 1480726 > trunk/client/src/main/java/org/apache/oozie/client/event/Event.java 1480726 > trunk/client/src/main/java/org/apache/oozie/client/event/JobEvent.java > 1480726 > trunk/client/src/main/java/org/apache/oozie/client/event/SLAEvent.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/jms/JSONMessageDeserializer.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/jms/MessageDeserializer.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/message/CoordinatorActionMessage.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/message/EventMessage.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/message/JobMessage.java > 1480726 > > trunk/client/src/main/java/org/apache/oozie/client/event/message/WorkflowJobMessage.java > 1480726 > trunk/client/src/main/java/org/apache/oozie/client/rest/JsonToBean.java > 1480726 > trunk/client/src/main/resources/oozie-sla-0.2.xsd PRE-CREATION > trunk/client/src/main/resources/oozie-workflow-0.4.5.xsd 1480726 > trunk/client/src/test/java/org/apache/oozie/client/rest/TestJsonToBean.java > 1480726 > trunk/core/pom.xml 1480726 > trunk/core/src/main/java/org/apache/oozie/ErrorCode.java 1480726 > trunk/core/src/main/java/org/apache/oozie/SLAEventBean.java 1480726 > trunk/core/src/main/java/org/apache/oozie/client/rest/JsonSLAEvent.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/client/rest/sla/JsonSLARegistrationEvent.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionCheckXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionMaterializeCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionStartXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionTimeOutXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionUpdateXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordMaterializeTransitionXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordRerunXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSuspendXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordinatorXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/coord/SLAEventsXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/ActionEndXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/wf/ActionKillXCommand.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/command/wf/ActionStartXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/KillXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/ResumeXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/SubmitXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/SuspendXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/event/BundleJobEvent.java 1480726 > trunk/core/src/main/java/org/apache/oozie/event/CoordinatorActionEvent.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/event/CoordinatorJobEvent.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/event/EventQueue.java 1480726 > trunk/core/src/main/java/org/apache/oozie/event/MemoryEventQueue.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/event/WorkflowActionEvent.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/event/WorkflowJobEvent.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/event/listener/JobEventListener.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/SLAEventInsertJPAExecutor.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/SLAEventsGetForFilterJPAExecutor.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/SLAEventsGetForSeqIdJPAExecutor.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/SLAEventsGetJPAExecutor.java > 1480726 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLACalculationInsertUpdateJPAExecutor.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLACalculatorGetJPAExecutor.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLASummaryGetJPAExecutor.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/jms/JMSJobEventListener.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/service/EventHandlerService.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/service/JMSTopicService.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1480726 > trunk/core/src/main/java/org/apache/oozie/service/SchedulerService.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/service/SchemaService.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/service/WorkflowStoreService.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/servlet/SLAServlet.java 1480726 > trunk/core/src/main/java/org/apache/oozie/sla/SLACalcStatus.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/SLACalculator.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorBean.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/SLARegistrationBean.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/SLASummaryBean.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/sla/listener/SLAEventListener.java > PRE-CREATION > > trunk/core/src/main/java/org/apache/oozie/sla/listener/SLAJobEventListener.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/sla/service/SLAService.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/store/SLAStore.java 1480726 > trunk/core/src/main/java/org/apache/oozie/util/SLAOperations.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/util/SLAXOperations.java > PRE-CREATION > trunk/core/src/main/java/org/apache/oozie/util/db/SLADbOperations.java > 1480726 > trunk/core/src/main/java/org/apache/oozie/util/db/SLADbXOperations.java > 1480726 > trunk/core/src/main/resources/META-INF/oozie-postgresql-orm.xml 1480726 > trunk/core/src/main/resources/META-INF/persistence.xml 1480726 > trunk/core/src/main/resources/oozie-default.xml 1480726 > > trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java > 1480726 > > trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionMaterializeCommand.java > 1480726 > > trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordMaterializeTransitionXCommand.java > 1480726 > trunk/core/src/test/java/org/apache/oozie/event/TestEventGeneration.java > 1480726 > trunk/core/src/test/java/org/apache/oozie/event/TestEventQueue.java 1480726 > > trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestSLACalculationJPAExecutor.java > PRE-CREATION > > trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestSLAEventsGetForSeqIdJPAExecutor.java > 1480726 > > trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestSLAEventsGetJPAExecutor.java > 1480726 > > trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestSLARegistrationGetJPAExecutor.java > PRE-CREATION > trunk/core/src/test/java/org/apache/oozie/jms/TestJMSJobEventListener.java > 1480726 > > trunk/core/src/test/java/org/apache/oozie/service/TestEventHandlerService.java > 1480726 > trunk/core/src/test/java/org/apache/oozie/service/TestJMSTopicService.java > 1480726 > trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java > PRE-CREATION > trunk/core/src/test/java/org/apache/oozie/sla/TestSLAJobEventListener.java > PRE-CREATION > trunk/core/src/test/java/org/apache/oozie/sla/TestSLAService.java > PRE-CREATION > trunk/core/src/test/java/org/apache/oozie/test/XDataTestCase.java 1480726 > trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java 1480726 > trunk/core/src/test/resources/coord-action-sla.xml PRE-CREATION > trunk/core/src/test/resources/wf-action-sla.xml PRE-CREATION > trunk/core/src/test/resources/wf-job-sla.xml PRE-CREATION > > Diff: https://reviews.apache.org/r/10569/diff/ > > > Testing > ------- > > ongoing > > > Thanks, > > Mona Chitnis > >
