From 3d7c3072055af2dc7b14b60e44986471a575c8aa Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Sun, 5 Jun 2022 22:51:26 +0200
Subject: [PATCH] Adjust uc3 new impl names

---
 .../uc3/hazelcastjet/NewHistoryService.java   |  8 ++++----
 .../uc3/hazelcastjet/Uc3PipelineFactory.java  | 20 +++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/NewHistoryService.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/NewHistoryService.java
index 0da94bafe..6b8a35c35 100644
--- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/NewHistoryService.java
+++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/NewHistoryService.java
@@ -37,10 +37,10 @@ public class NewHistoryService extends HazelcastJetService {
     final String kafkaOutputTopic =
         config.getProperty(ConfigurationKeys.KAFKA_OUTPUT_TOPIC).toString();
 
-    final int windowSizeInSecondsNumber = Integer.parseInt(
+    final int windowSizeInDaysNumber = Integer.parseInt(
         config.getProperty(ConfigurationKeys.AGGREGATION_DURATION_DAYS).toString());
 
-    final int hoppingSizeInSecondsNumber = Integer.parseInt(
+    final int hoppingSizeInDaysNumber = Integer.parseInt(
         config.getProperty(ConfigurationKeys.AGGREGATION_ADVANCE_DAYS).toString());
 
     this.pipelineFactory = new Uc3PipelineFactory(
@@ -48,8 +48,8 @@ public class NewHistoryService extends HazelcastJetService {
         kafkaInputTopic,
         kafkaWriteProps,
         kafkaOutputTopic,
-        windowSizeInSecondsNumber,
-        hoppingSizeInSecondsNumber);
+        windowSizeInDaysNumber,
+        hoppingSizeInDaysNumber);
   }
 
   @Override
diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/Uc3PipelineFactory.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/Uc3PipelineFactory.java
index 09198393b..eeea4f2b7 100644
--- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/Uc3PipelineFactory.java
+++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/rocks/theodolite/benchmarks/uc3/hazelcastjet/Uc3PipelineFactory.java
@@ -23,8 +23,8 @@ import titan.ccp.model.records.ActivePowerRecord;
 
 public class Uc3PipelineFactory extends PipelineFactory {
 
-  private final int hoppingSizeInSeconds;
-  private final int windowSizeInSeconds;
+  private final int hoppingSizeInDays;
+  private final int windowSizeInDays;
 
   /**
    * Build a new Pipeline.
@@ -34,21 +34,21 @@ public class Uc3PipelineFactory extends PipelineFactory {
    *        attributes.
    * @param kafkaInputTopic The name of the input topic used for the pipeline.
    * @param kafkaOutputTopic The name of the output topic used for the pipeline.
-   * @param hoppingSizeInSeconds The hop length of the sliding window used in the aggregation of
+   * @param hoppingSizeInDays The hop length of the sliding window used in the aggregation of
    *        this pipeline.
-   * @param windowSizeInSeconds The window length of the sliding window used in the aggregation of
+   * @param windowSizeInDays The window length of the sliding window used in the aggregation of
    *        this pipeline.
    */
   public Uc3PipelineFactory(final Properties kafkaReadPropsForPipeline,
                             final String kafkaInputTopic,
                             final Properties kafkaWritePropsForPipeline,
                             final String kafkaOutputTopic,
-                            final int windowSizeInSeconds,
-                            final int hoppingSizeInSeconds) {
+                            final int windowSizeInDays,
+                            final int hoppingSizeInDays) {
     super(kafkaReadPropsForPipeline, kafkaInputTopic,
         kafkaWritePropsForPipeline,kafkaOutputTopic);
-    this.windowSizeInSeconds = windowSizeInSeconds;
-    this.hoppingSizeInSeconds = hoppingSizeInSeconds;
+    this.windowSizeInDays = windowSizeInDays;
+    this.hoppingSizeInDays = hoppingSizeInDays;
   }
 
 
@@ -116,8 +116,8 @@ public class Uc3PipelineFactory extends PipelineFactory {
         // group by new keys
         .groupingKey(Map.Entry::getKey)
         // Sliding/Hopping Window
-        .window(WindowDefinition.sliding(TimeUnit.DAYS.toMillis(windowSizeInSeconds),
-            TimeUnit.DAYS.toMillis(hoppingSizeInSeconds)))
+        .window(WindowDefinition.sliding(TimeUnit.DAYS.toMillis(windowSizeInDays),
+            TimeUnit.DAYS.toMillis(hoppingSizeInDays)))
         // get average value of group (sensoreId,hourOfDay)
         .aggregate(
             AggregateOperations.averagingDouble(record -> record.getValue().getValueInW()))
-- 
GitLab