コード例 #1
0
ファイル: FlowRunner.java プロジェクト: nielubowicz/azkaban2
 private void updateFlowReference() throws ExecutorManagerException {
   logger.info("Update active reference");
   if (!executorLoader.updateExecutableReference(execId, System.currentTimeMillis())) {
     throw new ExecutorManagerException(
         "The executor reference doesn't exist. May have been killed prematurely.");
   }
 }
コード例 #2
0
ファイル: FlowRunner.java プロジェクト: nielubowicz/azkaban2
 private synchronized void updateFlow(long time) {
   try {
     flow.setUpdateTime(time);
     executorLoader.updateExecutableFlow(flow);
   } catch (ExecutorManagerException e) {
     logger.error("Error updating flow.", e);
   }
 }
コード例 #3
0
  private FlowRunner createFlowRunner(String flowName, HashMap<String, String> flowParams)
      throws Exception {
    Flow flow = flowMap.get(flowName);

    int exId = id++;
    ExecutableFlow exFlow = new ExecutableFlow(project, flow);
    exFlow.setExecutionPath(workingDir.getPath());
    exFlow.setExecutionId(exId);

    exFlow.getExecutionOptions().addAllFlowParameters(flowParams);
    fakeExecutorLoader.uploadExecutableFlow(exFlow);

    FlowRunner runner =
        new FlowRunner(
            fakeExecutorLoader.fetchExecutableFlow(exId),
            fakeExecutorLoader,
            fakeProjectLoader,
            jobtypeManager);
    return runner;
  }
コード例 #4
0
ファイル: FlowRunner.java プロジェクト: nielubowicz/azkaban2
  private void closeLogger() {
    if (logger != null) {
      logger.removeAppender(flowAppender);
      flowAppender.close();

      try {
        executorLoader.uploadLogFile(execId, "", 0, logFile);
      } catch (ExecutorManagerException e) {
        e.printStackTrace();
      }
    }
  }