當前位置: 首頁>>代碼示例>>Java>>正文


Java Flow.flowFromObject方法代碼示例

本文整理匯總了Java中azkaban.flow.Flow.flowFromObject方法的典型用法代碼示例。如果您正苦於以下問題:Java Flow.flowFromObject方法的具體用法?Java Flow.flowFromObject怎麽用?Java Flow.flowFromObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在azkaban.flow.Flow的用法示例。


在下文中一共展示了Flow.flowFromObject方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createExecutableFlow

import azkaban.flow.Flow; //導入方法依賴的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.flow.Flow; //導入方法依賴的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: prepareExecDir

import azkaban.flow.Flow; //導入方法依賴的package包/類
private ExecutableFlow prepareExecDir(File execDir, String flowName,
    int execId) throws IOException {
  synchronized (this) {
    FileUtils.copyDirectory(execDir, workingDir);
  }

  File jsonFlowFile = new File(workingDir, flowName + ".flow");
  @SuppressWarnings("unchecked")
  HashMap<String, Object> flowObj =
      (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);

  Project project = new Project(1, "myproject");
  project.setVersion(2);

  Flow flow = Flow.flowFromObject(flowObj);
  ExecutableFlow execFlow = new ExecutableFlow(project, flow);
  execFlow.setExecutionId(execId);
  execFlow.setExecutionPath(workingDir.getPath());
  return execFlow;
}
 
開發者ID:JasonBian,項目名稱:azkaban,代碼行數:21,代碼來源:FlowRunnerTest.java

示例4: prepareExecDir

import azkaban.flow.Flow; //導入方法依賴的package包/類
private ExecutableFlow prepareExecDir(File workingDir, File execDir,
    String flowName, int execId) throws IOException {
  FileUtils.copyDirectory(execDir, workingDir);

  File jsonFlowFile = new File(workingDir, flowName + ".flow");
  @SuppressWarnings("unchecked")
  HashMap<String, Object> flowObj =
      (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);

  Project project = new Project(1, "test");
  Flow flow = Flow.flowFromObject(flowObj);
  ExecutableFlow execFlow = new ExecutableFlow(project, flow);
  execFlow.setExecutionId(execId);
  execFlow.setExecutionPath(workingDir.getPath());
  return execFlow;
}
 
開發者ID:JasonBian,項目名稱:azkaban,代碼行數:17,代碼來源:RemoteFlowWatcherTest.java

示例5: prepareExecDir

import azkaban.flow.Flow; //導入方法依賴的package包/類
private ExecutableFlow prepareExecDir(File execDir, String flowName, int execId) throws IOException {
	synchronized ( this) {
		FileUtils.copyDirectory(execDir, workingDir);
	}
	
	File jsonFlowFile = new File(workingDir, flowName + ".flow");
	@SuppressWarnings("unchecked")
	HashMap<String, Object> flowObj = (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);
	
	Project project = new Project(1, "myproject");
	project.setVersion(2);

	Flow flow = Flow.flowFromObject(flowObj);
	ExecutableFlow execFlow = new ExecutableFlow(project, flow);
	execFlow.setExecutionId(execId);
	execFlow.setExecutionPath(workingDir.getPath());
	return execFlow;
}
 
開發者ID:zhizhounq,項目名稱:azkaban-customization,代碼行數:19,代碼來源:FlowRunnerTest.java

示例6: prepareExecDir

import azkaban.flow.Flow; //導入方法依賴的package包/類
private ExecutableFlow prepareExecDir(File workingDir, File execDir, String flowName, int execId) throws IOException {
	FileUtils.copyDirectory(execDir, workingDir);
	
	File jsonFlowFile = new File(workingDir, flowName + ".flow");
	@SuppressWarnings("unchecked")
	HashMap<String, Object> flowObj = (HashMap<String, Object>) JSONUtils.parseJSONFromFile(jsonFlowFile);
	
	Project project = new Project(1, "test");
	Flow flow = Flow.flowFromObject(flowObj);
	ExecutableFlow execFlow = new ExecutableFlow(project, flow);
	execFlow.setExecutionId(execId);
	execFlow.setExecutionPath(workingDir.getPath());
	return execFlow;
}
 
開發者ID:zhizhounq,項目名稱:azkaban-customization,代碼行數:15,代碼來源:RemoteFlowWatcherTest.java

示例7: createExecutableFlow

import azkaban.flow.Flow; //導入方法依賴的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


注:本文中的azkaban.flow.Flow.flowFromObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。