public interface PushManager
Modifier and Type | Method and Description |
---|---|
ReplicationState |
getReplicationState(org.apache.kafka.common.TopicIdPartition topicPartition,
Integer replicaId)
Returns the current replication state for the given partition replica.
|
void |
onLeaderAppend(org.apache.kafka.common.TopicIdPartition topicPartition,
Set<Integer> replicaIds,
long messageOffset,
org.apache.kafka.common.record.AbstractRecords records)
Callback invoked initially with file records as part of transitioning to push replication and
every time after this broker as the leader of the given partition appends memory records to
its log (if the corresponding partition replica is transitioning or has already transitioned
to push replication).
|
Set<Integer> |
tryStartPush(org.apache.kafka.common.TopicIdPartition topicPartition,
Set<Integer> replicaIds)
Starts push replication for the given partition replicas.
|
Set<Integer> |
tryStartTransition(org.apache.kafka.common.TopicIdPartition topicPartition,
Map<Integer,Long> transitionOffsetsByReplicaId)
Moves the given partition replicas to the transitional state preparing them for push
replication.
|
Set<Integer> |
tryStopPush(org.apache.kafka.common.TopicIdPartition topicPartition,
Set<Integer> replicaIds)
Stops push replication or transitioning to push replication for the given partition replicas.
|
ReplicationState getReplicationState(org.apache.kafka.common.TopicIdPartition topicPartition, Integer replicaId)
void onLeaderAppend(org.apache.kafka.common.TopicIdPartition topicPartition, Set<Integer> replicaIds, long messageOffset, org.apache.kafka.common.record.AbstractRecords records)
Set<Integer> tryStartTransition(org.apache.kafka.common.TopicIdPartition topicPartition, Map<Integer,Long> transitionOffsetsByReplicaId)
ReplicationState.Mode.TRANSITION_TO_PUSH
.Set<Integer> tryStartPush(org.apache.kafka.common.TopicIdPartition topicPartition, Set<Integer> replicaIds)
ReplicationState.Mode.PUSH
.Set<Integer> tryStopPush(org.apache.kafka.common.TopicIdPartition topicPartition, Set<Integer> replicaIds)
ReplicationState.Mode.PULL
.