[ https://issues.apache.org/jira/browse/OOZIE-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980762#comment-13980762 ]
Rohini Palaniswamy commented on OOZIE-1807: ------------------------------------------- Few comments: - We don't need to return String. Just throw exception with all the coord change exception messages appended together similar to other commands. If we are returning a json, it should be proper json with list of (action id, operation status (success or failure) and error message if failure). - Pending should have been set before coord changex command is called. If there is an exception pending should be decremented. {code} new CoordChangeXCommand(action.getCoordId(), changeValue).call(); + action.setPending(action.getPending() + 1); {code} - Condition for coordJob.getStartTime().after(newEndTime) should process look ahead actions. {code} if ((coordJob.getStatus() == CoordinatorJob.Status.PREP || + coordJob.getStatus() == CoordinatorJob.Status.RUNNING) + && coordJob.getStartTime().after(newEndTime)) { + LOG.info("Changing coord status to SUCCEEDED, because it's in " + coordJob.getStatus() + + " and new end time is before start time. Startime is " + coordJob.getStartTime() + + " and new end time is " + newEndTime); {code} should be {code} if (coordJob.getStartTime().after(newEndTime)) { if (coordJob.getStatus() != CoordinatorJob.Status.PREP) { processLookaheadActions(coordJob, coordJob.getStartTime()); } LOG.info("Changing coord status to SUCCEEDED, because it's in " + coordJob.getStatusStr() + " and new end time is before start time. " + "Startime is " + coordJob.getStartTime() + " and new end time is " + newEndTime); coordJob.setStatus(CoordinatorJob.Status.SUCCEEDED); coordJob.setDoneMaterialization(); coordJob.resetPending(); } {code} - Should not throw exception ""Didn't change endtime. Endtime is in between coord end time and next materialization time." . We don't change end time because we think it is a no_op. Should not be a error for user. E1025 can be removed. - System.getProperty("line.separator") is not required. "\n" is fine. > Make bundle change command synchronous > -------------------------------------- > > Key: OOZIE-1807 > URL: https://issues.apache.org/jira/browse/OOZIE-1807 > Project: Oozie > Issue Type: Bug > Reporter: Ryota Egashira > Assignee: Purshotam Shah > Attachments: OOZIE-1807-V2.patch, OOZIE-1807.patch > > > It confusion for user when they issue change command and they are not sure if > changes are applied to all coords jobs. > Fix is to call synchronously all coord from bundle and display error message > (if any) to user. > purushah$ > /Users/purushah/views/sysc_command/oozie/distro/target/oozie-4.1.0-SNAPSHOT-distro/oozie-4.1.0-SNAPSHOT/bin/oozie > job -change 0000002-140424165425407-oozie-puru-B -value > endtime=2013-01-01T00:00Z -oozie http://localhost:11000/oozie > Change command for coord job : 0000004-140424165425407-oozie-puru-C failed. > Reason : Coord is in killed state > Change command for coord job : 0000003-140424165425407-oozie-puru-C failed. > Reason : Coord is in killed state > purushah$ -- This message was sent by Atlassian JIRA (v6.2#6252)