Search in sources :

Example 1 with SimpleApiVersionManager

use of kafka.server.SimpleApiVersionManager 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();
}
Also used : MockConfigRepository(kafka.server.metadata.MockConfigRepository) KafkaApisBuilder(kafka.server.builders.KafkaApisBuilder) ZkSupport(kafka.server.ZkSupport) SimpleApiVersionManager(kafka.server.SimpleApiVersionManager) Properties(java.util.Properties) KafkaConfig(kafka.server.KafkaConfig)

Aggregations

Properties (java.util.Properties)1 KafkaConfig (kafka.server.KafkaConfig)1 SimpleApiVersionManager (kafka.server.SimpleApiVersionManager)1 ZkSupport (kafka.server.ZkSupport)1 KafkaApisBuilder (kafka.server.builders.KafkaApisBuilder)1 MockConfigRepository (kafka.server.metadata.MockConfigRepository)1