Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix for UT failed
Browse files Browse the repository at this point in the history
  • Loading branch information
dockerzhang committed Feb 5, 2021
1 parent d1e196f commit 9e123db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public class KafkaRequestHandler extends KafkaCommandDecoder {
private final int defaultNumPartitions;
public final int maxReadEntriesNum;
// store the group name for current connected client.
public final ConcurrentHashMap<String, String> currentConnectedGroup;
public final String groupIdStoredPath;
private final ConcurrentHashMap<String, String> currentConnectedGroup;
private final String groupIdStoredPath;
@Getter
private final EntryFormatter entryFormatter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public void deReference(String topicName) {
public CompletableFuture<Consumer> getGroupConsumers(String groupId, TopicPartition kafkaPartition) {
// make sure internal consumer existed
CompletableFuture<Consumer> consumerFuture = new CompletableFuture<>();
if (!requestHandler.getGroupCoordinator()
if (groupId == null || groupId.isEmpty() || !requestHandler.getGroupCoordinator()
.getOffsetAcker().getConsumer(groupId, kafkaPartition).isDone()) {
log.warn("not get consumer for group {} this time", groupId);
consumerFuture.complete(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void createPath(ZooKeeper zooKeeper, String zkPath, String subPath
}

public static String getData(ZooKeeper zooKeeper, String zkPath, String subPath) {
String data = "";
String data = null;
try {
String addSubPath = zkPath + subPath;
Stat zkStat = zooKeeper.exists(addSubPath, true);
Expand Down

0 comments on commit 9e123db

Please sign in to comment.