THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
package org.apache.kafka.server;
public interface ReplicaAssignor {
/**
* Assigns the specified partitions to brokers.
* If an assignment can't be computed, for example if the state of the cluster does not statify a requirement,
* implementations can throw an exception to prevent the topic/partition creation.
* @param topicName The name of the topic
* @param partitions The list of partitionIds that need an assignment
* @param replicationFactor The replication factor of the topic
* @param cluster The cluster metadata
* @param principal The principal of the user initiating the request
* @return A map of partitionId to list of assigned brokers
*/
public Map<Integer, List<Integer>> assignReplicasToBrokers(
String topicName,
List<Integer> partitions,
int replicationFactor,
Cluster cluster,
KafkaPrincipal principal);
} |
...