@Override public List<ExecutableFlow> getExecutableFlows(final String flowIdContains, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(null, '%' + flowIdContains + '%', null, 0, -1, -1, skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final int projectId, final String flowId, final int from, final int length, final Status status) throws ExecutorManagerException { return this.executorLoader.fetchFlowHistory(projectId, flowId, from, length, status); }
@Override public List<ExecutableFlow> getExecutableFlows(final int projectId, final String flowId, final int from, final int length, final Status status) throws ExecutorManagerException { return this.executorLoader.fetchFlowHistory(projectId, flowId, from, length, status); }
@Override public List<ExecutableFlow> getExecutableFlows(final String projContain, final String flowContain, final String userContain, final int status, final long begin, final long end, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projContain, flowContain, userContain, status, begin, end, skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final String flowIdContains, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(null, '%' + flowIdContains + '%', null, 0, -1, -1, skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final String projContain, final String flowContain, final String userContain, final int status, final long begin, final long end, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projContain, flowContain, userContain, status, begin, end, skip, size); return flows; }
@Override public int getExecutableFlows(final int projectId, final String flowId, final int from, final int length, final List<ExecutableFlow> outputList) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projectId, flowId, from, length); outputList.addAll(flows); return this.executorLoader.fetchNumExecutableFlows(projectId, flowId); }
@Override public int getExecutableFlows(final int projectId, final String flowId, final int from, final int length, final List<ExecutableFlow> outputList) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projectId, flowId, from, length); outputList.addAll(flows); return this.executorLoader.fetchNumExecutableFlows(projectId, flowId); }
@Override public void alertOnError(final ExecutableFlow flow, final String... extraReasons) { final EmailMessage message = this.messageCreator.createMessage(); final MailCreator mailCreator = getMailCreator(flow); List<ExecutableFlow> last72hoursExecutions = new ArrayList<>(); if (flow.getStartTime() > 0) { final long startTime = flow.getStartTime() - Duration.ofHours(72).toMillis(); try { last72hoursExecutions = this.executorLoader.fetchFlowHistory(flow.getProjectId(), flow .getFlowId(), startTime); } catch (final ExecutorManagerException e) { logger.error("unable to fetch past executions", e); } } final boolean mailCreated = mailCreator.createErrorEmail(flow, last72hoursExecutions, message, this.azkabanName, this.scheme, this.clientHostname, this.clientPortNumber, extraReasons); sendEmail(message, mailCreated, "error email message for execution " + flow.getExecutionId()); }
@Override public List<ExecutableFlow> getExecutableFlows(int skip, int size) throws ExecutorManagerException { List<ExecutableFlow> flows = executorLoader.fetchFlowHistory(skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows(final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows( String projContain, String flowContain, String userContain, int status, long begin, long end, int skip, int size) throws ExecutorManagerException { List<ExecutableFlow> flows = executorLoader.fetchFlowHistory( projContain, flowContain, userContain, status, begin, end , skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows( int projectId, String flowId, int from, int length, Status status) throws ExecutorManagerException { return executorLoader.fetchFlowHistory( projectId, flowId, from, length, status); }
@Override public List<ExecutableFlow> getExecutableFlows(final String projContain, final String flowContain, final String userContain, final int status, final long begin, final long end, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projContain, flowContain, userContain, status, begin, end, skip, size); return flows; }
@Override public List<ExecutableFlow> getExecutableFlows( Project project, String flowId, int skip, int size) throws ExecutorManagerException { List<ExecutableFlow> flows = executorLoader.fetchFlowHistory( project.getId(), flowId, skip, size); return flows; }
@Override public int getExecutableFlows(final int projectId, final String flowId, final int from, final int length, final List<ExecutableFlow> outputList) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(projectId, flowId, from, length); outputList.addAll(flows); return this.executorLoader.fetchNumExecutableFlows(projectId, flowId); }
@Override public List<ExecutableFlow> getExecutableFlows(final Project project, final String flowId, final int skip, final int size) throws ExecutorManagerException { final List<ExecutableFlow> flows = this.executorLoader.fetchFlowHistory(project.getId(), flowId, skip, size); return flows; }
@Override public int getExecutableFlows( int projectId, String flowId, int from, int length, List<ExecutableFlow> outputList) throws ExecutorManagerException { List<ExecutableFlow> flows = executorLoader.fetchFlowHistory( projectId, flowId, from, length); outputList.addAll(flows); return executorLoader.fetchNumExecutableFlows(projectId, flowId); }