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

StreamingAggregationStateManagerBaseImpl — Base State Manager for Streaming Aggregation

StreamingAggregationStateManagerBaseImpl — Base State Manager for Streaming Aggregation

StreamingAggregationStateManagerBaseImpl is the base implementation of the StreamingAggregationStateManager contract for state managers for streaming aggregations that use UnsafeProjection to getKey.

StreamingAggregationStateManagerBaseImpl uses UnsafeProjection to getKey.

Table 1. StreamingAggregationStateManagerBaseImpls
StreamingAggregationStateManagerBaseImpl Description

StreamingAggregationStateManagerImplV1

Legacy StreamingAggregationStateManager

StreamingAggregationStateManagerImplV2

Current StreamingAggregationStateManager

Creating StreamingAggregationStateManagerBaseImpl Instance

StreamingAggregationStateManagerBaseImpl takes the following when created:

  • Attribute expressions for keys (Seq[Attribute])

  • Attribute expressions of input rows (Seq[Attribute])

Note
StreamingAggregationStateManagerBaseImpl is a Scala abstract class and cannot be created directly. It is created indirectly for the concrete StreamingAggregationStateManagerBaseImpls.

Committing (Changes to) State Store — commit Method

Note
commit is part of the StreamingAggregationStateManager Contract to commit changes to a state store.

commit simply requests the state store to commit state changes.

Removing Key From State Store — remove Method

Note
remove is part of the StreamingAggregationStateManager Contract to remove a key from a state store.

remove…​FIXME

getKey Method

Note
getKey is part of the StreamingAggregationStateManager Contract to…​FIXME

getKey…​FIXME

Getting All Keys in State Store — keys Method

Note
keys is part of the StreamingAggregationStateManager Contract to get all keys in a state store (as an iterator).

keys…​FIXME

赞(0) 打赏
未经允许不得转载:spark技术分享 » StreamingAggregationStateManagerBaseImpl — Base State Manager for Streaming Aggregation
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏