Skip to content
Snippets Groups Projects
Commit a21b77ad authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Add null check for beam ActivePowerReader

parent b554b04c
No related branches found
No related tags found
1 merge request!187Migrate Beam benchmark implementation
......@@ -28,11 +28,20 @@ public class KafkaActivePowerRecordReader extends
final Map<String, Object> consumerConfig) {
super();
if (bootstrapServer == null) {
throw new IllegalArgumentException("bootstrapServer is null");
}
if (inputTopic == null) {
throw new IllegalArgumentException("inputTopic is null");
}
// Check if boostrap server and inputTopic are defined
if (bootstrapServer.isEmpty() || inputTopic.isEmpty()) {
throw new IllegalArgumentException("bootstrapServer or inputTopic missing");
}
reader =
KafkaIO.<String, ActivePowerRecord>read()
.withBootstrapServers(bootstrapServer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment