Java Code Examples for org.apache.kafka.common.requests.AbstractRequest#Builder
The following examples show how to use
org.apache.kafka.common.requests.AbstractRequest#Builder .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KafkaApisTest.java From kop with Apache License 2.0 | 5 votes |
private KafkaHeaderAndRequest createFetchRequest(int maxResponseBytes, int maxPartitionBytes, List<TopicPartition> topicPartitions, Map<TopicPartition, Long> offsetMap) { AbstractRequest.Builder builder = FetchRequest.Builder .forConsumer(Integer.MAX_VALUE, 0, createPartitionMap(maxPartitionBytes, topicPartitions, offsetMap)) .setMaxBytes(maxResponseBytes); return buildRequest(builder); }
Example 2
Source File: KafkaApisTest.java From kop with Apache License 2.0 | 4 votes |
private KafkaHeaderAndRequest createTopicMetadataRequest(List<String> topics) { AbstractRequest.Builder builder = new MetadataRequest.Builder(topics, true); return buildRequest(builder); }
Example 3
Source File: KafkaApiRequest.java From kafka-utilities with Apache License 2.0 | 4 votes |
public void sendApiRequest(final Node node, final AbstractRequest.Builder<?> requestBuilder){ this.clientResponse = this.networkClient.send(node, requestBuilder); }
Example 4
Source File: KafkaNodeClient.java From feeyo-redisproxy with BSD 3-Clause "New" or "Revised" License | 3 votes |
public ClientRequest newClientRequest(AbstractRequest.Builder<?> requestBuilder) { if (client == null || node == null) return null; ClientRequest clientRequest = client.newClientRequest(node.idString(), requestBuilder, 1000L, true); return clientRequest; }