You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/04/18 15:11:11 UTC
[incubator-streampipes] 02/03: Change Siddhi wrapper to work with
new API
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 19893436c3b248a2dbdb615a087e747c6fb2ffc6
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sat Apr 18 17:10:19 2020 +0200
Change Siddhi wrapper to work with new API
---
.../apache/streampipes/wrapper/siddhi/engine/SiddhiEventEngine.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/SiddhiEventEngine.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/SiddhiEventEngine.java
index 6bab4b8..4c35128 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/SiddhiEventEngine.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/SiddhiEventEngine.java
@@ -120,6 +120,8 @@ public abstract class SiddhiEventEngine<B extends EventProcessorBindingParams> i
});
}
+ siddhiAppRuntime.start();
+
}
private String getOutputTopicName(B parameters) {
@@ -136,7 +138,8 @@ public abstract class SiddhiEventEngine<B extends EventProcessorBindingParams> i
schemaInfo, SourceInfo sourceInfo) {
Map<String, Object> outMap = new HashMap<>();
for (int i = 0; i < sortedEventKeys.size(); i++) {
- outMap.put(sortedEventKeys.get(i), event.getData(i));
+ List<Object> tmp = (List<Object>) event.getData(i);
+ outMap.put(sortedEventKeys.get(i), tmp.get(0));
}
return EventFactory.fromMap(outMap, sourceInfo, schemaInfo);
}