gpt4 book ai didi

co.cask.cdap.api.workflow.WorkflowSpecification.getNodeIdMap()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 05:01:05 31 4
gpt4 key购买 nike

本文整理了Java中co.cask.cdap.api.workflow.WorkflowSpecification.getNodeIdMap()方法的一些代码示例,展示了WorkflowSpecification.getNodeIdMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowSpecification.getNodeIdMap()方法的具体详情如下:
包路径:co.cask.cdap.api.workflow.WorkflowSpecification
类名称:WorkflowSpecification
方法名:getNodeIdMap

WorkflowSpecification.getNodeIdMap介绍

[英]Return the map of the node id to the WorkflowNode.
[中]将节点id的映射返回到WorkflowNode。

代码示例

代码示例来源:origin: co.cask.cdap/cdap-data-fabric

private Iterable<String> getWorkflowNodes() {
  if (ProgramType.WORKFLOW != programId.getType()) {
   return ImmutableSet.of();
  }
  Preconditions.checkArgument(programSpec instanceof WorkflowSpecification,
                "Expected programSpec %s to be of type WorkflowSpecification", programSpec);
  WorkflowSpecification workflowSpec = (WorkflowSpecification) this.programSpec;
  Set<String> workflowNodeNames = new HashSet<>();
  for (Map.Entry<String, WorkflowNode> entry : workflowSpec.getNodeIdMap().entrySet()) {
   WorkflowNode workflowNode = entry.getValue();
   WorkflowNodeType type = workflowNode.getType();
   // Fork nodes have integers as node ids. Ignore them in system metadata.
   if (WorkflowNodeType.FORK == type) {
    continue;
   }
   workflowNodeNames.add(entry.getKey());
  }
  return workflowNodeNames;
 }
}

代码示例来源:origin: cdapio/cdap

private Iterable<String> getWorkflowNodes() {
  if (ProgramType.WORKFLOW != programId.getType()) {
   return ImmutableSet.of();
  }
  Preconditions.checkArgument(programSpec instanceof WorkflowSpecification,
                "Expected programSpec %s to be of type WorkflowSpecification", programSpec);
  WorkflowSpecification workflowSpec = (WorkflowSpecification) this.programSpec;
  Set<String> workflowNodeNames = new HashSet<>();
  for (Map.Entry<String, WorkflowNode> entry : workflowSpec.getNodeIdMap().entrySet()) {
   WorkflowNode workflowNode = entry.getValue();
   WorkflowNodeType type = workflowNode.getType();
   // Fork nodes have integers as node ids. Ignore them in system metadata.
   if (WorkflowNodeType.FORK == type) {
    continue;
   }
   workflowNodeNames.add(entry.getKey());
  }
  return workflowNodeNames;
 }
}

代码示例来源:origin: cdapio/cdap

private Set<String> getWorkflowForkNodes(WorkflowSpecification workflowSpec) {
  ImmutableSet.Builder<String> nodes = new ImmutableSet.Builder<>();
  for (Map.Entry<String, WorkflowNode> entry : workflowSpec.getNodeIdMap().entrySet()) {
   if (WorkflowNodeType.FORK == entry.getValue().getType()) {
    nodes.add(entry.getKey());
   }
  }
  return nodes.build();
 }
}

代码示例来源:origin: cdapio/cdap

Map<String, WorkflowNode> nodeIdMap = workflowSpec.getNodeIdMap();
List<WorkflowDataset.ProgramRun> programRunsList = new ArrayList<>();
for (Map.Entry<String, String> entry : runRecord.getProperties().entrySet()) {

代码示例来源:origin: co.cask.cdap/cdap-app-fabric

Map<String, WorkflowNode> nodeIdMap = workflowSpec.getNodeIdMap();
List<WorkflowDataset.ProgramRun> programRunsList = new ArrayList<>();
for (Map.Entry<String, String> entry : runRecord.getProperties().entrySet()) {

代码示例来源:origin: cdapio/cdap

SchedulableProgramType.SPARK);
Iterable<ScheduleProgramInfo> programInfos = spec.getNodeIdMap().values().stream()
 .filter(WorkflowActionNode.class::isInstance)
 .map(WorkflowActionNode.class::cast)

代码示例来源:origin: co.cask.cdap/cdap-app-fabric

SchedulableProgramType.SPARK);
Iterable<ScheduleProgramInfo> programInfos = spec.getNodeIdMap().values().stream()
 .filter(WorkflowActionNode.class::isInstance)
 .map(WorkflowActionNode.class::cast)

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com