問題文
A developer new to Structured Streaming asks how a streaming query relates to a batch query in Apache Spark. Which description matches the programming model?
選択肢
- The developer writes a callback that is invoked for each individual record as it arrives, and the engine guarantees that the callbacks for one key are executed in arrival order on a single thread so that per-key state can be kept in a local variable.
- New data is treated as rows appended to an unbounded input table, and the query is run incrementally so that the result table is kept up to date.
- The query is re-run over the whole input from the beginning on each trigger.
- The developer must convert the stream to a DataFrame manually before each aggregation.