@ThreadSafe public final class BlockManagerMaster extends Object
Modifier and Type | Class and Description |
---|---|
class |
BlockManagerMaster.PartitionManagerMasterControlMessageReceiver
Handler for control messages received.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<String> |
getBlockLocationFuture(String blockId)
Returns a
CompletableFuture of block location, which is not yet resolved in SCHEDULED state. |
Set<String> |
getProducerTaskGroupIds(String blockId)
Gets the ids of the task groups which already produced or will produce data for a specific block.
|
void |
initializeState(String blockId,
String producerTaskGroupId)
Initializes the states of a block which will be produced by producer task(s).
|
void |
onBlockStateChanged(String blockId,
BlockState.State newState,
String location)
Deals with state change of a block.
|
void |
onProducerTaskGroupFailed(String failedTaskGroupId)
To be called when a potential producer task group fails.
|
void |
onProducerTaskGroupScheduled(String scheduledTaskGroupId)
To be called when a potential producer task group is scheduled.
|
Set<String> |
removeWorker(String executorId)
Manages the block information when a executor is removed.
|
public void initializeState(String blockId, String producerTaskGroupId)
blockId
- the id of the block to initialize.producerTaskGroupId
- the id of the producer task group.public Set<String> removeWorker(String executorId)
executorId
- the id of removed executor.public CompletableFuture<String> getBlockLocationFuture(String blockId)
CompletableFuture
of block location, which is not yet resolved in SCHEDULED
state.blockId
- id of the specified block.CompletableFuture
of block location, which completes exceptionally when the block
is not SCHEDULED
or COMMITTED
.public Set<String> getProducerTaskGroupIds(String blockId)
blockId
- the id of the block.public void onProducerTaskGroupScheduled(String scheduledTaskGroupId)
PendingTaskGroupQueue
.scheduledTaskGroupId
- the ID of the scheduled task group.public void onProducerTaskGroupFailed(String failedTaskGroupId)
failedTaskGroupId
- the ID of the task group that failed.public void onBlockStateChanged(String blockId, BlockState.State newState, @Nullable String location)
blockId
- the id of the block.newState
- the new state of the block.location
- the location of the block (e.g., worker id, remote store).
null
if not committed or lost.Copyright © 2018. All rights reserved.