Skip to content
Snippets Groups Projects
Commit 912abf3a authored by Sören Henning's avatar Sören Henning
Browse files

Rename env variable and add logging

parent 1fd275a6
No related branches found
No related tags found
No related merge requests found
Pipeline #6088 passed
......@@ -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() {}
......
......@@ -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.");
......
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