| 338 | } |
| 339 | |
| 340 | public Stream stateQuery(TridentState state, Fields inputFields, QueryFunction function, Fields functionFields) { |
| 341 | projectionValidation(inputFields); |
| 342 | String stateId = state.node.stateInfo.id; |
| 343 | Node n = new ProcessorNode(topology.getUniqueStreamId(), |
| 344 | name, |
| 345 | TridentUtils.fieldsConcat(getOutputFields(), functionFields), |
| 346 | functionFields, |
| 347 | new StateQueryProcessor(stateId, inputFields, function)); |
| 348 | topology.colocate.get(stateId).add(n); |
| 349 | return topology.addSourcedNode(this, n); |
| 350 | } |
| 351 | |
| 352 | public Stream stateQuery(TridentState state, QueryFunction function, Fields functionFields) { |
| 353 | return stateQuery(state, null, function, functionFields); |