关注 spark技术分享,
撸spark源码 玩spark最佳实践

StateStoreWriter Contract — Stateful Physical Operators That Write to StateStore

StateStoreWriter Contract — Stateful Physical Operators That Write to StateStore

StateStoreWriter is the extension of the StatefulOperator Contract for physical operators that write to a state store and collect the write metrics for execution progress reporting.

Table 1. StateStoreWriter’s Performance Metrics
Key Name (in web UI) Description

numOutputRows

number of output rows

numTotalStateRows

number of total state rows

numUpdatedStateRows

number of updated state rows

allUpdatesTimeMs

total time to update rows

allRemovalsTimeMs

total time to remove rows

commitTimeMs

time to commit changes

stateMemory

memory used by state

Table 2. StateStoreWriters
StateStoreWriter Description

FlatMapGroupsWithStateExec

StateStoreSaveExec

StreamingDeduplicateExec

StreamingGlobalLimitExec

StreamingSymmetricHashJoinExec

Setting StateStore-Specific Metrics for Stateful Physical Operator — setStoreMetrics Method

setStoreMetrics requests store for metrics to use them to record the following metrics of a physical operator:

  • numTotalStateRows as StateStore.numKeys

  • stateMemory as StateStore.memoryUsedBytes

setStoreMetrics records the implementation-specific metrics.

Note

setStoreMetrics is used when the following physical operators are executed:

getProgress Method

getProgress…​FIXME

Note
getProgress is used exclusively when ProgressReporter is requested to extractStateOperatorMetrics (when MicroBatchExecution is requested to run the activated streaming query).

shouldRunAnotherBatch Method

shouldRunAnotherBatch is disabled by default.

Note
shouldRunAnotherBatch is used exclusively when IncrementalExecution is requested to shouldRunAnotherBatch (when MicroBatchExecution is requested to run the activated streaming query).

stateStoreCustomMetrics Internal Method

stateStoreCustomMetrics…​FIXME

Note
stateStoreCustomMetrics is used when StateStoreWriter is requested for the metrics and getProgress.

timeTakenMs Method

timeTakenMs…​FIXME

Note
timeTakenMs is used when…​FIXME
赞(0) 打赏
未经允许不得转载:spark技术分享 » StateStoreWriter Contract — Stateful Physical Operators That Write to StateStore
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏