Search in sources :

Example 1 with NodeStateInfo

use of storm.trident.planner.NodeStateInfo in project storm by nathanmarz.

the class TridentTopology method newStaticState.

public TridentState newStaticState(StateSpec spec) {
    String stateId = getUniqueStateId();
    Node n = new Node(getUniqueStreamId(), null, new Fields());
    n.stateInfo = new NodeStateInfo(stateId, spec);
    registerNode(n);
    return new TridentState(this, n);
}
Also used : Fields(backtype.storm.tuple.Fields) NodeStateInfo(storm.trident.planner.NodeStateInfo) SpoutNode(storm.trident.planner.SpoutNode) ProcessorNode(storm.trident.planner.ProcessorNode) PartitionNode(storm.trident.planner.PartitionNode) Node(storm.trident.planner.Node)

Example 2 with NodeStateInfo

use of storm.trident.planner.NodeStateInfo in project jstorm by alibaba.

the class Stream method partitionPersist.

public TridentState partitionPersist(StateSpec stateSpec, Fields inputFields, StateUpdater updater, Fields functionFields) {
    projectionValidation(inputFields);
    String id = _topology.getUniqueStateId();
    ProcessorNode n = new ProcessorNode(_topology.getUniqueStreamId(), _name, functionFields, functionFields, new PartitionPersistProcessor(id, inputFields, updater));
    n.committer = true;
    n.stateInfo = new NodeStateInfo(id, stateSpec);
    return _topology.addSourcedStateNode(this, n);
}
Also used : PartitionPersistProcessor(storm.trident.planner.processor.PartitionPersistProcessor) ProcessorNode(storm.trident.planner.ProcessorNode) NodeStateInfo(storm.trident.planner.NodeStateInfo)

Example 3 with NodeStateInfo

use of storm.trident.planner.NodeStateInfo in project jstorm by alibaba.

the class TridentTopology method newStaticState.

public TridentState newStaticState(StateSpec spec) {
    String stateId = getUniqueStateId();
    Node n = new Node(getUniqueStreamId(), null, new Fields());
    n.stateInfo = new NodeStateInfo(stateId, spec);
    registerNode(n);
    return new TridentState(this, n);
}
Also used : Fields(backtype.storm.tuple.Fields) NodeStateInfo(storm.trident.planner.NodeStateInfo) SpoutNode(storm.trident.planner.SpoutNode) ProcessorNode(storm.trident.planner.ProcessorNode) PartitionNode(storm.trident.planner.PartitionNode) Node(storm.trident.planner.Node)

Example 4 with NodeStateInfo

use of storm.trident.planner.NodeStateInfo in project storm by nathanmarz.

the class Stream method partitionPersist.

public TridentState partitionPersist(StateSpec stateSpec, Fields inputFields, StateUpdater updater, Fields functionFields) {
    projectionValidation(inputFields);
    String id = _topology.getUniqueStateId();
    ProcessorNode n = new ProcessorNode(_topology.getUniqueStreamId(), _name, functionFields, functionFields, new PartitionPersistProcessor(id, inputFields, updater));
    n.committer = true;
    n.stateInfo = new NodeStateInfo(id, stateSpec);
    return _topology.addSourcedStateNode(this, n);
}
Also used : PartitionPersistProcessor(storm.trident.planner.processor.PartitionPersistProcessor) ProcessorNode(storm.trident.planner.ProcessorNode) NodeStateInfo(storm.trident.planner.NodeStateInfo)

Aggregations

NodeStateInfo (storm.trident.planner.NodeStateInfo)4 ProcessorNode (storm.trident.planner.ProcessorNode)4 Fields (backtype.storm.tuple.Fields)2 Node (storm.trident.planner.Node)2 PartitionNode (storm.trident.planner.PartitionNode)2 SpoutNode (storm.trident.planner.SpoutNode)2 PartitionPersistProcessor (storm.trident.planner.processor.PartitionPersistProcessor)2