From 912abf3aac7e9a722ac327c39ab832632cba7c8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de>
Date: Wed, 19 Jan 2022 13:46:17 +0100
Subject: [PATCH] Rename env variable and add logging

---
 .../commons/workloadgeneration/ConfigurationKeys.java  |  2 +-
 .../commons/workloadgeneration/LoadGenerator.java      | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java b/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java
index e4787db04..7a60e271f 100644
--- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java
+++ b/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java
@@ -37,7 +37,7 @@ public final class ConfigurationKeys {
 
   public static final String KAFKA_BUFFER_MEMORY = "KAFKA_BUFFER_MEMORY";
 
-  public static final String HTTP_URI = "HTTP_URI";
+  public static final String HTTP_URL = "HTTP_URL";
 
   private ConfigurationKeys() {}
 
diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java b/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java
index 9e467864f..e1ef55887 100644
--- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java
+++ b/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java
@@ -164,12 +164,16 @@ public final class LoadGenerator {
           kafkaBootstrapServers,
           kafkaInputTopic,
           schemaRegistryUrl);
+      LOGGER.info(
+          "Use Kafka as target with bootstrap server '{}', schema registry url '{}' and topic '{}'.", // NOCS
+          kafkaBootstrapServers, schemaRegistryUrl, kafkaInputTopic);
     } else if (target == LoadGeneratorTarget.HTTP) {
-      final URI uri = URI.create(
+      final URI url = URI.create(
           Objects.requireNonNullElse(
-              System.getenv(ConfigurationKeys.HTTP_URI),
+              System.getenv(ConfigurationKeys.HTTP_URL),
               HTTP_URI_DEFAULT));
-      recordSender = new HttpRecordSender<>(uri);
+      recordSender = new HttpRecordSender<>(url);
+      LOGGER.info("Use HTTP server as target with url '{}'.", url);
     } else {
       // Should never happen
       throw new IllegalStateException("Target " + target + " is not handled yet.");
-- 
GitLab