MCPcopy Create free account
hub / github.com/apache/kafka / bootstrap

Method bootstrap

clients/src/main/java/org/apache/kafka/common/Cluster.java:86–92  ·  view source on GitHub ↗

Create a "bootstrap" cluster using the given list of host/ports @param addresses The addresses @return A cluster for these hosts/ports

(List<InetSocketAddress> addresses)

Source from the content-addressed store, hash-verified

84 * @return A cluster for these hosts/ports
85 */
86 public static Cluster bootstrap(List<InetSocketAddress> addresses) {
87 List<Node> nodes = new ArrayList<Node>();
88 int nodeId = -1;
89 for (InetSocketAddress address : addresses)
90 nodes.add(new Node(nodeId--, address.getHostName(), address.getPort()));
91 return new Cluster(nodes, new ArrayList<PartitionInfo>(0));
92 }
93
94 /**
95 * @return The known set of nodes

Callers 1

KafkaProducerMethod · 0.95

Calls 2

getPortMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected