Commit Graph

31 Commits

Author SHA1 Message Date
Wouter Born
8eb0d2c16e
[rrd4j] Use RrdDbPool to prevent ClosedByInterruptException (#13332)
Using the pool prevents exceptions like:

```
java.nio.channels.ClosedByInterruptException: null
	at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:199) ~[?:?]
	at sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:162) ~[?:?]
	at sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:388) ~[?:?]
	at org.rrd4j.core.RrdNioBackend.<init>(RrdNioBackend.java:94) ~[?:?]
	at org.rrd4j.core.RrdNioBackendFactory.open(RrdNioBackendFactory.java:163) ~[?:?]
	at org.rrd4j.core.RrdBackendFactory.getBackend(RrdBackendFactory.java:521) ~[?:?]
	at org.rrd4j.core.RrdDb.<init>(RrdDb.java:627) ~[?:?]
	at org.rrd4j.core.RrdDb.of(RrdDb.java:500) ~[?:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.getDB(RRD4jPersistenceService.java:323) ~[?:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.store(RRD4jPersistenceService.java:141) ~[?:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.lambda$0(RRD4jPersistenceService.java:211) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
```

Fixes #13297

Also includes a few code improvements.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-08-29 17:15:17 +02:00
Kai Kreuzer
440f603e88
Apply spotless and resolver (#13027)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 16:00:37 +02:00
openhab-bot
ed4858ebbb [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 18:18:40 +00:00
Wouter Born
d7d6798a97
[rrd4j] Upgrade to rrd4j 3.8.1 (#12398)
This should prevent a resource leak when generating graphs.

See: https://github.com/rrd4j/rrd4j/blob/master/changelog.txt

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-02 11:03:17 +01:00
Hilbrand Bouwkamp
da59cdd255
Update license headers to 2022 (#11973)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-01-06 18:14:47 +01:00
Marcel
0b79d87d9f
Fix pom http://maven.apache.org/xsd/maven-v4_0_0.xsd entries (#11850)
* Fix pom http://maven.apache.org/xsd/maven-v4_0_0.xsd entries
* Fix http://maven.apache.org/maven-v4_0_0.xsd entries in pom.xml

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2021-12-24 11:36:42 +01:00
Kai Kreuzer
48746f5e3f Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 09:07:55 +01:00
openhab-bot
6dc031e6cf [unleash-maven-plugin] Preparation for next development cycle. 2021-12-20 00:30:46 +00:00
Wouter Born
2b5431df00
[rrd4j] Upgrade rrd4j, improve exception handling (#11355)
* Upgrades rrd4j to 3.8
* Fixes deprecations
* Updates RRD4jChartServlet for ChartProvider API changes
* Improves RRD4jChartServlet exception handling

For the rrd4j changelog see:

https://raw.githubusercontent.com/rrd4j/rrd4j/master/changelog.txt

Related to openhab/openhab-core#2502

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 21:56:09 +02:00
Kai Kreuzer
bebab9ce29 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:25:35 +02:00
jenkins
8c5c81e256 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 17:35:01 +00:00
Wouter Born
1633c705a1
Use Collection.isEmpty (#10525)
Fixes 47 SAT UseCollectionIsEmpty findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-15 21:00:47 +02:00
Wouter Born
0c36650179
Avoid star imports and add missing braces (#10521)
Fixes the following SAT findings:

* AvoidStarImportCheck (125)
* NeedBracesCheck (39)

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-15 16:12:05 +02:00
Wouter Born
6e1119a49a
Fix broken configfile GAV with karaf:kar (#10391)
The groupId variable results in the wrong configfile GAV when building a single KAR with karaf:kar for an add-on.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-26 08:50:31 +01:00
Wouter Born
d6364aceb1
Update license headers to 2021 (#9620)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-02 22:03:14 +01:00
Wouter Born
ecac667258
Apply Spotless, update skeleton project version, resolve itest runbundles (#9459)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:37:44 +01:00
jenkins
e4554f4aa6 [unleash-maven-plugin] Preparation for next development cycle. 2020-12-21 10:36:42 +00:00
Wouter Born
c755e85281
Fix missing feature configfiles (#9324)
* Update configfile lines for renamed openhab-addons-external artifactId
* Add missing 2.5.x configfiles files which were never merged into the main branch
* Fix configfile lines not aggregated in feature.xml file

Fixes openhab/openhab-distro#1205

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-11 14:34:44 +01:00
Mike Major
9de9955c49
Support Colour item and Group item with a state (#9111)
Signed-off-by: Mike Major <mike_j_major@hotmail.com>
2020-11-23 19:15:56 +01:00
J-N-K
ba4c96d99d
[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-11-12 21:07:11 +01:00
Wouter Born
b423f93b1f
Remove Map null annotation workarounds (#8916)
These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-04 13:57:24 +01:00
Kai Kreuzer
482436328e
Return QuantityTypes for number items with dimension (#8938)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-02 00:26:21 +01:00
Wouter Born
603ceedff9
[rrd4j] Improve performance (#8929)
* [rrd4j] Improve performance

* Cache item to improve performance
* Also return DecimalType for QuantityType values

Related to #8928
Reintroduces #8809

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-01 21:28:25 +01:00
Jürgen Baginski
27480ad208
[rrd4j] Updated readme (#8822)
Changed some wordings.

-Kept "DataSource" as the term for the way data is stored in a .rrd file. Such is more inline with the used Default Datasources (-numeric, ...).
-Removed the requirement for an everyMinute Strategy, inserted a explanation for relationship between Sample Intervall and Strategy instead.

Signed-off-by: Jürgen Baginski <opus42@gmx.de>
2020-10-30 23:26:21 +01:00
Kai Kreuzer
4cd2a5b314
[rrd4j] Correctly identify Number items with dimensions and persist them in the defined unit (#8866)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-28 00:27:54 +01:00
Kai Kreuzer
90e659d8d7
[rrd4j] Ignore item types that are not supported (#8815)
Additionally:
- documentation has been updated and improved
- logging has been improved for better debugging

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-20 19:10:57 -07:00
Jürgen Baginski
8eab7b6331
[rrd4j] Corrected the default configurations (third try) (#8708)
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>
2020-10-09 20:45:16 +02:00
Jürgen Baginski
082a3c2555
Corrected the default configurations (#8698)
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>
2020-10-08 22:16:38 +02:00
Kai Kreuzer
5788ad095e
Fixed mvn reference for config files (#8572)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-24 22:45:01 +02:00
Wouter Born
7f39d01a0f
Remove/ignore Eclipse project files (#8529)
Fixes #8451

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:50:37 +02:00
Kai Kreuzer
bbf1a7fd29 Codebase as of c53e4aed26 as an initial commit for the shrunk repo
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-20 23:57:58 +02:00