本文整理匯總了Java中azkaban.flow.Flow.getNode方法的典型用法代碼示例。如果您正苦於以下問題:Java Flow.getNode方法的具體用法?Java Flow.getNode怎麽用?Java Flow.getNode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類azkaban.flow.Flow
的用法示例。
在下文中一共展示了Flow.getNode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ajaxSetJobOverrideProperty
import azkaban.flow.Flow; //導入方法依賴的package包/類
private void ajaxSetJobOverrideProperty(Project project, HashMap<String, Object> ret, HttpServletRequest req) throws ServletException {
String flowName = getParam(req, "flowName");
String jobName = getParam(req, "jobName");
Flow flow = project.getFlow(flowName);
if(flow == null) {
ret.put("error", "Flow " + flowName + " not found in project " + project.getName());
return;
}
Node node = flow.getNode(jobName);
if(node == null) {
ret.put("error", "Job " + jobName + " not found in flow " + flowName);
return;
}
Map<String, String> jobParamGroup = this.getParamGroup(req, "jobOverride");
@SuppressWarnings("unchecked")
Props overrideParams = new Props(null, jobParamGroup);
try {
projectManager.setJobOverrideProperty(project, overrideParams, jobName);
} catch (ProjectManagerException e) {
ret.put("error", "Failed to upload job override property");
}
}
示例2: ajaxSetJobOverrideProperty
import azkaban.flow.Flow; //導入方法依賴的package包/類
private void ajaxSetJobOverrideProperty(Project project,
HashMap<String, Object> ret, HttpServletRequest req)
throws ServletException {
String flowName = getParam(req, "flowName");
String jobName = getParam(req, "jobName");
Flow flow = project.getFlow(flowName);
if (flow == null) {
ret.put("error",
"Flow " + flowName + " not found in project " + project.getName());
return;
}
Node node = flow.getNode(jobName);
if (node == null) {
ret.put("error", "Job " + jobName + " not found in flow " + flowName);
return;
}
Map<String, String> jobParamGroup = this.getParamGroup(req, "jobOverride");
@SuppressWarnings("unchecked")
Props overrideParams = new Props(null, jobParamGroup);
try {
projectManager.setJobOverrideProperty(project, overrideParams, jobName);
} catch (ProjectManagerException e) {
ret.put("error", "Failed to upload job override property");
}
}
示例3: ajaxFetchFlowNodeData
import azkaban.flow.Flow; //導入方法依賴的package包/類
private void ajaxFetchFlowNodeData(Project project, HashMap<String, Object> ret, HttpServletRequest req) throws ServletException {
String flowId = getParam(req, "flow");
Flow flow = project.getFlow(flowId);
String nodeId = getParam(req, "node");
Node node = flow.getNode(nodeId);
if (node == null) {
ret.put("error", "Job " + nodeId + " doesn't exist.");
return;
}
ret.put("id", nodeId);
ret.put("flow", flowId);
ret.put("type", node.getType());
Props props;
try {
props = projectManager.getProperties(project, node.getJobSource());
} catch (ProjectManagerException e) {
ret.put("error", "Failed to upload job override property for " + nodeId);
return;
}
if (props == null) {
ret.put("error", "Properties for " + nodeId + " isn't found.");
return;
}
Map<String,String> properties = PropsUtils.toStringMap(props, true);
ret.put("props", properties);
if (node.getType().equals("flow")) {
if (node.getEmbeddedFlowId() != null) {
fillFlowInfo(project, node.getEmbeddedFlowId(), ret);
}
}
}
示例4: ajaxFetchFlowNodeData
import azkaban.flow.Flow; //導入方法依賴的package包/類
private void ajaxFetchFlowNodeData(Project project, HashMap<String, Object> ret, HttpServletRequest req) throws ServletException {
String flowId = getParam(req, "flow");
Flow flow = project.getFlow(flowId);
if (flow == null) {
ret.put("error", "Flow " + flowId + " doesn't exist.");
return;
}
String nodeId = getParam(req, "node");
Node node = flow.getNode(nodeId);
if (node == null) {
ret.put("error", "Job " + nodeId + " doesn't exist.");
return;
}
ret.put("id", nodeId);
ret.put("flow", flowId);
ret.put("type", node.getType());
Props props;
try {
props = projectManager.getProperties(project, node.getJobSource());
} catch (ProjectManagerException e) {
ret.put("error", "Failed to upload job override property for " + nodeId);
return;
}
if (props == null) {
ret.put("error", "Properties for " + nodeId + " isn't found.");
return;
}
Map<String, String> properties = PropsUtils.toStringMap(props, true);
ret.put("props", properties);
if (node.getType().equals("flow")) {
if (node.getEmbeddedFlowId() != null) {
fillFlowInfo(project, node.getEmbeddedFlowId(), ret);
}
}
}