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

EpochCoordinator

EpochCoordinator

EpochCoordinator is a ThreadSafeRpcEndpoint that receive messages from…​FIXME

EpochCoordinator is created (using create factory method) when ContinuousExecution is requested to run a streaming query in continuous mode.

Table 1. EpochCoordinator RPC Endpoint’s Messages
Message Description

CommitPartitionEpoch

GetCurrentEpoch

IncrementAndGetEpoch

ReportPartitionOffset

SetReaderPartitions

SetWriterPartitions

StopContinuousExecutionWrites

Table 2. EpochCoordinator’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

queryWritesStopped

Flag that…​FIXME

Used when…​FIXME

Tip

Enable INFO logging level for org.apache.spark.sql.execution.streaming.continuous.EpochCoordinatorRef* logger to see what happens inside.

Add the following line to conf/log4j.properties:

Refer to Logging.

Receiving Messages — receive Method

Note
receive is part of the RpcEndpoint Contract in Apache Spark to receive messages.

receive…​FIXME

resolveCommitsAtEpoch Internal Method

resolveCommitsAtEpoch…​FIXME

Note
resolveCommitsAtEpoch is used exclusively when EpochCoordinator is requested to receive CommitPartitionEpoch and ReportPartitionOffset messages.

commitEpoch Internal Method

commitEpoch…​FIXME

Note
commitEpoch is used exclusively when EpochCoordinator is requested to resolveCommitsAtEpoch.

Creating EpochCoordinator Instance

EpochCoordinator takes the following to be created:

EpochCoordinator initializes the internal registries and counters.

Registering EpochCoordinator RPC Endpoint — create Factory Method

create simply creates a new EpochCoordinator and requests the RpcEnv to register a RPC endpoint as EpochCoordinator-[id] (where id is the given epochCoordinatorId).

create prints out the following INFO message to the logs:

Note
create is used exclusively when ContinuousExecution is requested to run a streaming query in continuous mode.
赞(0) 打赏
未经允许不得转载:spark技术分享 » EpochCoordinator
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏