private static StormTopology externalState(LocalDRPC drpc, FeederBatchSpout spout) {
TridentTopology topology = new TridentTopology();
// You can reference existing data sources as well.
// Here we are mocking up a "database"
StateFactory stateFactory = new StateFactory() {
@Override
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) {
MemoryMapState<Integer> name_to_age = new MemoryMapState<Integer>("name_to_age");
// This is a bit hard to read but it's just pre-populating the state
List<List<Object>> keys = getKeys("ted", "mary", "jason", "tom", "chuck");