本文整理匯總了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}