Skip to content

Commit

Permalink
Fix identention
Browse files Browse the repository at this point in the history
  • Loading branch information
f0nZ committed Sep 8, 2023
1 parent 571247a commit fb7d3c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public Collection<TopicListing> getTopics() throws InterruptedException, Executi

public Collection<ConsumerGroupDescription> getConsumerGroups() throws InterruptedException, ExecutionException {
var consumerGroupIds = client.listConsumerGroups().all().get().stream()
.map(ConsumerGroupListing::groupId)
.collect(Collectors.toList());
.map(ConsumerGroupListing::groupId)
.collect(Collectors.toList());
return client.describeConsumerGroups(consumerGroupIds).all().get()
.values();
.values();
}

public boolean deleteTopic(final String name) {
Expand Down Expand Up @@ -88,9 +88,9 @@ public Collection<AclBinding> getAclInfo() throws InterruptedException, Executio
}

public Map<String, TopicDescription> describeTopics(final Collection<String> topicNames)
throws InterruptedException, ExecutionException {
throws InterruptedException, ExecutionException {
return client.describeTopics(topicNames)
.allTopicNames()
.get();
.allTopicNames()
.get();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ public List<KafkaTopic> getTopics() throws InterruptedException, ExecutionExcept
return kafkaUiUtils.getTopics();
}

public List<KafkaTopic> createTopic(final String topicName, final int partitions, final int replications, Map<String, String> configs)
throws InterruptedException, ExecutionException {
public List<KafkaTopic> createTopic(final String topicName, final int partitions, final int replications,
Map<String, String> configs)
throws InterruptedException, ExecutionException {

KafkaCreateTopicRequest createTopicRequest = new KafkaCreateTopicRequest(topicName, partitions, (short) replications,
configs);
configs);
boolean created = kafkaAdminClient.createTopic(createTopicRequest);
if (created) {
return kafkaUiUtils.getTopics();
Expand All @@ -59,8 +60,8 @@ public KafkaMessagePage topicMessages(final String topicName) throws ExecutionEx
}

public KafkaMessagePage createMessage(String topicName, Integer partition, String key, String value,
Map<String, String> headers)
throws ExecutionException, InterruptedException {
Map<String, String> headers)
throws ExecutionException, InterruptedException {

if (partition < 0)
partition = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public KafkaCreateTopicRequest() {
}

public KafkaCreateTopicRequest(final String topicName, final Integer partitions, final Short replications,
final Map<String, String> configs) {
final Map<String, String> configs) {
this.topicName = topicName;
this.partitions = partitions;
this.replications = replications;
Expand Down

0 comments on commit fb7d3c2

Please sign in to comment.