This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 48b57469d [hotfix] Reduce logging output
new a9a00162b Merge branch 'dev' of
github.com:apache/incubator-streampipes into dev
48b57469d is described below
commit 48b57469d69d7bb5578d5b0215738e0b0f59c0a8
Author: Dominik Riemer <[email protected]>
AuthorDate: Fri Nov 4 09:03:52 2022 +0100
[hotfix] Reduce logging output
---
.../streampipes/dataexplorer/commons/influx/InfluxStore.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/streampipes-data-explorer-commons/src/main/java/org/apache/streampipes/dataexplorer/commons/influx/InfluxStore.java
b/streampipes-data-explorer-commons/src/main/java/org/apache/streampipes/dataexplorer/commons/influx/InfluxStore.java
index c8f1c7b7b..afee4fa08 100644
---
a/streampipes-data-explorer-commons/src/main/java/org/apache/streampipes/dataexplorer/commons/influx/InfluxStore.java
+++
b/streampipes-data-explorer-commons/src/main/java/org/apache/streampipes/dataexplorer/commons/influx/InfluxStore.java
@@ -131,6 +131,7 @@ public class InfluxStore {
*/
public void onEvent(Event event) throws SpRuntimeException {
var missingFields = new ArrayList<String>();
+ var nullFields = new ArrayList<String>();
if (event == null) {
throw new SpRuntimeException("event is null");
}
@@ -152,7 +153,7 @@ public class InfluxStore {
if (field.isPresent()) {
PrimitiveField eventPropertyPrimitiveField =
field.get().getAsPrimitive();
if (eventPropertyPrimitiveField.getRawValue() == null) {
- LOG.warn("Field value for {} is null, ignoring value.",
sanitizedRuntimeName);
+ nullFields.add(sanitizedRuntimeName);
} else {
// store property as tag when the field is a dimension property
@@ -182,6 +183,10 @@ public class InfluxStore {
String.join(", ", missingFields));
}
+ if (nullFields.size() > 0) {
+ LOG.warn("Ignored {} fields which had a value 'null': {}",
nullFields.size(), String.join(", ", nullFields));
+ }
+
influxDb.write(point.build());
}