当前位置: 首页>>代码示例>>Java>>正文


Java Project.setFlows方法代码示例

本文整理汇总了Java中azkaban.project.Project.setFlows方法的典型用法代码示例。如果您正苦于以下问题:Java Project.setFlows方法的具体用法?Java Project.setFlows怎么用?Java Project.setFlows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在azkaban.project.Project的用法示例。


在下文中一共展示了Project.setFlows方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createExecutableFlow

import azkaban.project.Project; //导入方法依赖的package包/类
public static ExecutableFlow createExecutableFlow(String projectName,
  String flowName) throws IOException {
  File jsonFlowFile = getFlowDir(projectName, flowName);
  @SuppressWarnings("unchecked")
  HashMap<String, Object> flowObj =
    (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);

  Flow flow = Flow.flowFromObject(flowObj);
  Project project = new Project(1, "flow");
  HashMap<String, Flow> flowMap = new HashMap<String, Flow>();
  flowMap.put(flow.getId(), flow);
  project.setFlows(flowMap);
  ExecutableFlow execFlow = new ExecutableFlow(project, flow);

  return execFlow;
}
 
开发者ID:JasonBian,项目名称:azkaban,代码行数:17,代码来源:TestUtils.java

示例2: createExecutablePair

import azkaban.project.Project; //导入方法依赖的package包/类
private Pair<ExecutionReference, ExecutableFlow> createExecutablePair(
  String flowName, int execId) throws IOException {
  File jsonFlowFile = getFlowDir(flowName);
  @SuppressWarnings("unchecked")
  HashMap<String, Object> flowObj =
    (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);

  Flow flow = Flow.flowFromObject(flowObj);
  Project project = new Project(1, "flow");
  HashMap<String, Flow> flowMap = new HashMap<String, Flow>();
  flowMap.put(flow.getId(), flow);
  project.setFlows(flowMap);
  ExecutableFlow execFlow = new ExecutableFlow(project, flow);
  execFlow.setExecutionId(execId);
  ExecutionReference ref = new ExecutionReference(execId);
  return new Pair<ExecutionReference, ExecutableFlow>(ref, execFlow);
}
 
开发者ID:JasonBian,项目名称:azkaban,代码行数:18,代码来源:QueuedExecutionsTest.java

示例3: prepareProject

import azkaban.project.Project; //导入方法依赖的package包/类
private void prepareProject(Project project, File directory)
    throws ProjectManagerException, IOException {
  DirectoryFlowLoader loader = new DirectoryFlowLoader(new Props(), logger);
  loader.loadProjectFlow(project, directory);
  if (!loader.getErrors().isEmpty()) {
    for (String error: loader.getErrors()) {
      System.out.println(error);
    }

    throw new RuntimeException("Errors found in setup");
  }

  flowMap = loader.getFlowMap();
  project.setFlows(flowMap);
  FileUtils.copyDirectory(directory, workingDir);
}
 
开发者ID:JasonBian,项目名称:azkaban,代码行数:17,代码来源:FlowRunnerTest2.java

示例4: prepareProject

import azkaban.project.Project; //导入方法依赖的package包/类
private void prepareProject(Project project, File directory) throws ProjectManagerException,
    IOException {
  DirectoryFlowLoader loader = new DirectoryFlowLoader(new Props(), logger);
  loader.loadProjectFlow(project, directory);
  if (!loader.getErrors().isEmpty()) {
    for (String error : loader.getErrors()) {
      System.out.println(error);
    }

    throw new RuntimeException("Errors found in setup");
  }

  flowMap = loader.getFlowMap();
  project.setFlows(flowMap);
  FileUtils.copyDirectory(directory, workingDir);
}
 
开发者ID:JasonBian,项目名称:azkaban,代码行数:17,代码来源:FlowRunnerPropertyResolutionTest.java

示例5: setUp

import azkaban.project.Project; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
  project = new Project(11, "myTestProject");

  Logger logger = Logger.getLogger(this.getClass());
  DirectoryFlowLoader loader = new DirectoryFlowLoader(new Props(), logger);

  loader.loadProjectFlow(project, TestExecutions.getFlowDir("embedded"));
  Assert.assertEquals(0, loader.getErrors().size());

  project.setFlows(loader.getFlowMap());
  project.setVersion(123);
}
 
开发者ID:JasonBian,项目名称:azkaban,代码行数:14,代码来源:ExecutableFlowTest.java

示例6: createExecutableFlow

import azkaban.project.Project; //导入方法依赖的package包/类
private ExecutableFlow createExecutableFlow(int executionId, String flowName) throws IOException {
	File jsonFlowFile = new File(flowDir, flowName + ".flow");
	@SuppressWarnings("unchecked")
	HashMap<String, Object> flowObj = (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);
	
	Flow flow = Flow.flowFromObject(flowObj);
	Project project = new Project(1, "flow");
	HashMap<String, Flow> flowMap = new HashMap<String, Flow>();
	flowMap.put(flow.getId(), flow);
	project.setFlows(flowMap);
	ExecutableFlow execFlow = new ExecutableFlow(project, flow);
	execFlow.setExecutionId(executionId);

	return execFlow;
}
 
开发者ID:zhizhounq,项目名称:azkaban-customization,代码行数:16,代码来源:JdbcExecutorLoaderTest.java

示例7: setUp

import azkaban.project.Project; //导入方法依赖的package包/类
@Before
  public void setUp() throws Exception {
Logger logger = Logger.getLogger(this.getClass());
  	DirectoryFlowLoader loader = new DirectoryFlowLoader(logger);
  	loader.loadProjectFlow(new File("unit/executions/embedded"));
  	Assert.assertEquals(0, loader.getErrors().size());
  	
  	project = new Project(11, "myTestProject");
  	project.setFlows(loader.getFlowMap());
  	project.setVersion(123);
  }
 
开发者ID:zhizhounq,项目名称:azkaban-customization,代码行数:12,代码来源:ExecutableFlowTest.java


注:本文中的azkaban.project.Project.setFlows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。