Skip to content
Snippets Groups Projects
Commit ab8da9ff authored by Andrea Burattin's avatar Andrea Burattin
Browse files

Fixed tricky bug with events counting

parent f3fb1a24
Branches
Tags
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>beamline</groupId> <groupId>beamline</groupId>
<artifactId>framework</artifactId> <artifactId>framework</artifactId>
<version>0.2.2</version> <version>0.2.3</version>
<properties> <properties>
<maven.compiler.source>11</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
......
...@@ -81,9 +81,11 @@ public abstract class StreamMiningAlgorithm<T extends Response> extends RichFlat ...@@ -81,9 +81,11 @@ public abstract class StreamMiningAlgorithm<T extends Response> extends RichFlat
*/ */
protected T process(BEvent event) { protected T process(BEvent event) {
try { try {
long value = 1; long value = 0;
if (processedEvents != null && processedEvents.value() != null) { if (processedEvents != null) {
if (processedEvents.value() != null) {
value = processedEvents.value() + 1; value = processedEvents.value() + 1;
}
processedEvents.update(value); processedEvents.update(value);
} }
} catch (IOException e) { } catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment