本文整理汇总了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;
}
示例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;
}
示例3: emitTuples
import com.datatorrent.api.InputOperator; //导入依赖的package包/类
@Override
public void emitTuples()
{
if (operator instanceof InputOperator) {
((InputOperator)operator).emitTuples();
}
}
示例4: InputNode
import com.datatorrent.api.InputOperator; //导入依赖的package包/类
public InputNode(InputOperator operator, OperatorContext context)
{
super(operator, context);
}
示例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);
}