当前位置: 首页>>代码示例>>Java>>正文


Java InputOperator类代码示例

本文整理汇总了Java中com.datatorrent.api.InputOperator的典型用法代码示例。如果您正苦于以下问题:Java InputOperator类的具体用法?Java InputOperator怎么用?Java InputOperator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


InputOperator类属于com.datatorrent.api包,在下文中一共展示了InputOperator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAllDTInstantiableGenericOperators

import com.datatorrent.api.InputOperator; //导入依赖的package包/类
public Set<String> getAllDTInstantiableGenericOperators()
{
  TypeGraphVertex tgv = typeGraph.get(GenericOperator.class.getName());
  if (tgv == null) {
    return null;
  }
  Set<String> result = new TreeSet<>();
  for (TypeGraphVertex node : tgv.allInstantiableDescendants) {
    if ((isAncestor(InputOperator.class.getName(), node.typeName) || isAncestor(Module.class.getName(), node.typeName)
        || !getAllInputPorts(node).isEmpty())) {
      result.add(node.typeName);
    }
  }

  return result;
}
 
开发者ID:apache,项目名称:apex-core,代码行数:17,代码来源:TypeGraph.java

示例2: retrieveNode

import com.datatorrent.api.InputOperator; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static Node<?> retrieveNode(Object operator, OperatorContext context, OperatorDeployInfo.OperatorType type)
{
  logger.debug("type={}, operator class={}", type, operator.getClass());

  Node<?> node;
  if (operator instanceof InputOperator && type == OperatorDeployInfo.OperatorType.INPUT) {
    node = new InputNode((InputOperator)operator, context);
  } else if (operator instanceof Unifier && type == OperatorDeployInfo.OperatorType.UNIFIER) {
    node = new UnifierNode((Unifier<Object>)operator, context);
  } else if (type == OperatorDeployInfo.OperatorType.OIO) {
    node = new OiONode((Operator)operator, context);
  } else {
    node = new GenericNode((Operator)operator, context);
  }

  return node;
}
 
开发者ID:apache,项目名称:apex-core,代码行数:19,代码来源:Node.java

示例3: emitTuples

import com.datatorrent.api.InputOperator; //导入依赖的package包/类
@Override
public void emitTuples()
{
  if (operator instanceof InputOperator) {
    ((InputOperator)operator).emitTuples();
  }
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:8,代码来源:TupleWrapperOperator.java

示例4: InputNode

import com.datatorrent.api.InputOperator; //导入依赖的package包/类
public InputNode(InputOperator operator, OperatorContext context)
{
  super(operator, context);
}
 
开发者ID:apache,项目名称:apex-core,代码行数:5,代码来源:InputNode.java

示例5: fromInput

import com.datatorrent.api.InputOperator; //导入依赖的package包/类
/**
 * Create a stream with any input operator
 * @param operator
 * @param outputPort
 * @param opts
 * @param <T>
 * @return
 */
public static <T> ApexStream<T> fromInput(InputOperator operator, Operator.OutputPort<T> outputPort, Option... opts)
{
  ApexStreamImpl<T> newStream = new ApexStreamImpl<>();
  return newStream.addOperator(operator, null, outputPort, opts);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:14,代码来源:StreamFactory.java


注:本文中的com.datatorrent.api.InputOperator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。