]> git.basschouten.com Git - openhab-addons.git/commitdiff
[rrd4j] Corrected the default configurations (third try) (#8708)
authorJürgen Baginski <opus42@gmx.de>
Fri, 9 Oct 2020 18:45:16 +0000 (20:45 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Oct 2020 18:45:16 +0000 (20:45 +0200)
Applied the changes found by spotless.

According the comments DEFAULT_NUMERIC, DEFAULT_QUANTIFIABLE config should have 5 archives, the 4th was missing. Additionally the ConsolFunction changed in the DEFAULT_QUANTIFIABLE.
The DEFAULT_OTHER config had false computed archives.

Signed-off-by: Jürgen Baginski <opus42@gmx.de>
bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java

index c67d3f996129230b38a5dba2f3d71063d1b89a1c..9dd09004cb488c547542476b401f61947f581293 100644 (file)
@@ -367,7 +367,8 @@ public class RRD4jPersistenceService implements QueryablePersistenceService {
         // 3. granularity of 15m for the last year
         // 4. granularity of 1h for the last 5 years
         // 5. granularity of 1d for the last 10 years
-        defaultNumeric.addArchives("LAST,0.5,1,360:LAST,0.5,6,10080:LAST,0.5,90,36500:LAST,0.5,360,43800:LAST,0.5,8640,3650");
+        defaultNumeric
+                .addArchives("LAST,0.5,1,360:LAST,0.5,6,10080:LAST,0.5,90,36500:LAST,0.5,360,43800:LAST,0.5,8640,3650");
         rrdDefs.put(DEFAULT_NUMERIC, defaultNumeric);
 
         RrdDefConfig defaultQuantifiable = new RrdDefConfig(DEFAULT_QUANTIFIABLE);
@@ -379,7 +380,8 @@ public class RRD4jPersistenceService implements QueryablePersistenceService {
         // 3. granularity of 15m for the last year
         // 4. granularity of 1h for the last 5 years
         // 5. granularity of 1d for the last 10 years
-        defaultQuantifiable.addArchives("AVERAGE,0.5,1,360:AVERAGE,0.5,6,10080:AVERAGE,0.5,90,36500:AVERAGE,0.5,360,43800:AVERAGE,0.5,8640,3650");
+        defaultQuantifiable.addArchives(
+                "AVERAGE,0.5,1,360:AVERAGE,0.5,6,10080:AVERAGE,0.5,90,36500:AVERAGE,0.5,360,43800:AVERAGE,0.5,8640,3650");
         rrdDefs.put(DEFAULT_QUANTIFIABLE, defaultQuantifiable);
 
         RrdDefConfig defaultOther = new RrdDefConfig(DEFAULT_OTHER);