Search in sources :

Example 1 with StateQueryProcessor

use of org.apache.storm.trident.planner.processor.StateQueryProcessor in project storm by apache.

the class Stream method stateQuery.

public Stream stateQuery(TridentState state, Fields inputFields, QueryFunction function, Fields functionFields) {
    projectionValidation(inputFields);
    String stateId = state._node.stateInfo.id;
    Node n = new ProcessorNode(_topology.getUniqueStreamId(), _name, TridentUtils.fieldsConcat(getOutputFields(), functionFields), functionFields, new StateQueryProcessor(stateId, inputFields, function));
    _topology._colocate.get(stateId).add(n);
    return _topology.addSourcedNode(this, n);
}
Also used : ProcessorNode(org.apache.storm.trident.planner.ProcessorNode) ProcessorNode(org.apache.storm.trident.planner.ProcessorNode) Node(org.apache.storm.trident.planner.Node) PartitionNode(org.apache.storm.trident.planner.PartitionNode) StateQueryProcessor(org.apache.storm.trident.planner.processor.StateQueryProcessor)

Aggregations

Node (org.apache.storm.trident.planner.Node)1 PartitionNode (org.apache.storm.trident.planner.PartitionNode)1 ProcessorNode (org.apache.storm.trident.planner.ProcessorNode)1 StateQueryProcessor (org.apache.storm.trident.planner.processor.StateQueryProcessor)1