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

Remove sysout

parent 70ba3be1
No related branches found
No related tags found
No related merge requests found
......@@ -61,13 +61,14 @@ public class LoadGenerator {
final ScheduledExecutorService executor = Executors.newScheduledThreadPool(threads);
final Random random = new Random();
LOGGER.info("Start setting up sensors.");
for (final String sensor : sensors) {
System.out.println("working");
final int initialDelay = random.nextInt(periodMs);
executor.scheduleAtFixedRate(() -> {
kafkaRecordSender.write(new ActivePowerRecord(sensor, System.currentTimeMillis(), value));
}, initialDelay, periodMs, TimeUnit.MILLISECONDS);
}
LOGGER.info("Finished setting up sensors.");
System.out.println("Wait for termination...");
executor.awaitTermination(30, TimeUnit.DAYS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment