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


Java Flow.getNode方法代碼示例

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

}
 
開發者ID:zhizhounq,項目名稱:azkaban-customization,代碼行數:27,代碼來源:ProjectManagerServlet.java

示例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");
    }

}
 
開發者ID:JasonBian,項目名稱:azkaban,代碼行數:30,代碼來源:ProjectManagerServlet.java

示例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);
		}
	}
}
 
開發者ID:zhizhounq,項目名稱:azkaban-customization,代碼行數:39,代碼來源:ProjectManagerServlet.java

示例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);
        }
    }
}
 
開發者ID:JasonBian,項目名稱:azkaban,代碼行數:44,代碼來源:ProjectManagerServlet.java


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