diff --git a/drkafka/src/main/java/com/pinterest/doctorkafka/replicastats/ReplicaStatsManager.java b/drkafka/src/main/java/com/pinterest/doctorkafka/replicastats/ReplicaStatsManager.java index c6801250..527a24d3 100644 --- a/drkafka/src/main/java/com/pinterest/doctorkafka/replicastats/ReplicaStatsManager.java +++ b/drkafka/src/main/java/com/pinterest/doctorkafka/replicastats/ReplicaStatsManager.java @@ -190,7 +190,12 @@ public static Map getProcessingStartOffsets(KafkaConsumer< Map offsetsForTimes = kafkaConsumer .offsetsForTimes(partitionMap); for (Entry entry : offsetsForTimes.entrySet()) { - partitionMap.put(entry.getKey(), entry.getValue().offset()); + if (entry.getValue() == null) { + LOG.info("Faking a zero for {}", entry.getKey()); + partitionMap.put(entry.getKey(), 0L); + } else { + partitionMap.put(entry.getKey(), entry.getValue().offset()); + } } return partitionMap; }