public void addTrigger(final Trigger t) { synchronized (TriggerManager.this.syncObj) { t.updateNextCheckTime(); this.triggers.add(t); } }
public void resetTriggerConditions() { this.triggerCondition.resetCheckers(); updateNextCheckTime(); }
public void resetExpireCondition() { this.expireCondition.resetCheckers(); updateNextCheckTime(); }
private void checkAllTriggers() throws TriggerManagerException { // sweep through the rest of them for (final Trigger t : this.triggers) { try { TriggerManager.this.scannerStage = "Checking for trigger " + t.getTriggerId(); if (t.getStatus().equals(TriggerStatus.READY)) { /** * Prior to this change, expiration condition should never be called though * we have some related code here. ExpireCondition used the same BasicTimeChecker * as triggerCondition do. As a consequence, we need to figure out a way to distinguish * the previous ExpireCondition and this commit's ExpireCondition. */ if (t.getExpireCondition().getExpression().contains("EndTimeChecker") && t .expireConditionMet()) { onTriggerPause(t); } else if (t.triggerConditionMet()) { onTriggerTrigger(t); } } if (t.getStatus().equals(TriggerStatus.EXPIRED) && t.getSource().equals("azkaban")) { removeTrigger(t); } else { t.updateNextCheckTime(); } } catch (final Throwable th) { //skip this trigger, moving on to the next one logger.error("Failed to process trigger with id : " + t, th); } } }
public void addTrigger(final Trigger t) { synchronized (TriggerManager.this.syncObj) { t.updateNextCheckTime(); this.triggers.add(t); } }
public void addTrigger(Trigger t) { synchronized (syncObj) { t.updateNextCheckTime(); triggers.add(t); } }
public void resetExpireCondition() { this.expireCondition.resetCheckers(); updateNextCheckTime(); }
public void resetTriggerConditions() { this.triggerCondition.resetCheckers(); updateNextCheckTime(); }
public void resetTriggerConditions() { triggerCondition.resetCheckers(); updateNextCheckTime(); }
public void resetExpireCondition() { expireCondition.resetCheckers(); updateNextCheckTime(); }
removeTrigger(t); } else { t.updateNextCheckTime();
private void checkAllTriggers() throws TriggerManagerException { // sweep through the rest of them for (final Trigger t : this.triggers) { try { TriggerManager.this.scannerStage = "Checking for trigger " + t.getTriggerId(); if (t.getStatus().equals(TriggerStatus.READY)) { /** * Prior to this change, expiration condition should never be called though * we have some related code here. ExpireCondition used the same BasicTimeChecker * as triggerCondition do. As a consequence, we need to figure out a way to distinguish * the previous ExpireCondition and this commit's ExpireCondition. */ if (t.getExpireCondition().getExpression().contains("EndTimeChecker") && t .expireConditionMet()) { onTriggerPause(t); } else if (t.triggerConditionMet()) { onTriggerTrigger(t); } } if (t.getStatus().equals(TriggerStatus.EXPIRED) && t.getSource().equals("azkaban")) { removeTrigger(t); } else { t.updateNextCheckTime(); } } catch (final Throwable th) { //skip this trigger, moving on to the next one logger.error("Failed to process trigger with id : " + t, th); } } }