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.
| Message | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description |
|---|---|
|
|
Used when…FIXME |
|
Tip
|
Enable Add the following line to
Refer to Logging. |
Receiving Messages — receive Method
|
1 2 3 4 5 |
receive: PartialFunction[Any, Unit] |
|
Note
|
receive is part of the RpcEndpoint Contract in Apache Spark to receive messages.
|
receive…FIXME
resolveCommitsAtEpoch Internal Method
|
1 2 3 4 5 |
resolveCommitsAtEpoch(epoch: Long): Unit |
resolveCommitsAtEpoch…FIXME
|
Note
|
resolveCommitsAtEpoch is used exclusively when EpochCoordinator is requested to receive CommitPartitionEpoch and ReportPartitionOffset messages.
|
commitEpoch Internal Method
|
1 2 3 4 5 6 7 |
commitEpoch( epoch: Long, messages: Iterable[WriterCommitMessage]): Unit |
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
|
1 2 3 4 5 6 7 8 9 10 11 12 |
create( writer: StreamWriter, reader: ContinuousReader, query: ContinuousExecution, epochCoordinatorId: String, startEpoch: Long, session: SparkSession, env: SparkEnv): RpcEndpointRef |
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:
|
1 2 3 4 5 |
Registered EpochCoordinator endpoint |
|
Note
|
create is used exclusively when ContinuousExecution is requested to run a streaming query in continuous mode.
|
spark技术分享