Hello.
First of all, thanks Nathan and your team for storm. :)
Got a question about partitionPersist for trident topology.
In fact, I don't know where is the best place to update the DB with the
topology result.
Besides, the TestStateFactory seems to be useless. What I didn't saw ?
My first prototype is by using a code like:
topology processings
...
topology.join(streams, joinFields, JOIN_RESULT)
.partitionPersist(new TestStateFactory(), JOIN_RESULT, new
TestStateUpdater())
In the updateState of TestStateUpdater, I do the batch update to the DB.
The code in TestStateFactory:
public class TestStateFactory implements StateFactory {
private static final long serialVersionUID = 12345L;
public State makeState(@SuppressWarnings("rawtypes") Map conf, int
partitionIndex, int numPartitions) {
return new TestState(null, null);
}
}
TestState:
public class TestState extends TridentState implements State {
protected TestState(TridentTopology topology, Node node) {
super(topology, node);
}
}
Thanks for the answers.
JF