use of kafka.server.ZkSupport in project kafka by apache.
the class MetadataRequestBenchmark method createKafkaApis.
private KafkaApis createKafkaApis() {
Properties kafkaProps = new Properties();
kafkaProps.put(KafkaConfig$.MODULE$.ZkConnectProp(), "zk");
kafkaProps.put(KafkaConfig$.MODULE$.BrokerIdProp(), brokerId + "");
KafkaConfig config = new KafkaConfig(kafkaProps);
return new KafkaApisBuilder().setRequestChannel(requestChannel).setMetadataSupport(new ZkSupport(adminManager, kafkaController, kafkaZkClient, Option.empty(), metadataCache)).setReplicaManager(replicaManager).setGroupCoordinator(groupCoordinator).setTxnCoordinator(transactionCoordinator).setAutoTopicCreationManager(autoTopicCreationManager).setBrokerId(brokerId).setConfig(config).setConfigRepository(new MockConfigRepository()).setMetadataCache(metadataCache).setMetrics(metrics).setAuthorizer(Optional.empty()).setQuotas(quotaManagers).setFetchManager(fetchManager).setBrokerTopicStats(brokerTopicStats).setClusterId("clusterId").setTime(Time.SYSTEM).setTokenManager(null).setApiVersionManager(new SimpleApiVersionManager(ApiMessageType.ListenerType.ZK_BROKER)).build();
}
Aggregations