You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/06/29 18:21:46 UTC

[incubator-streampipes] branch dev updated (57cf63153 -> 7d81a22ad)

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


    from 57cf63153 [STREAMPIPES-549] Add Dockerfile
     new 8ddffb519 [test] Add new test for boolean counter
     new 7d81a22ad [hotfix] Improve error message of guess schema result

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../connect/container/master/management/GuessManagement.java   |  9 +--------
 .../execution/endpoint/ExtensionsServiceEndpointGenerator.java |  2 +-
 .../apache/streampipes/rest/impl/connect/GuessResource.java    |  2 +-
 .../pipelineElement/filters-siddhi/increase3/input.csv         |  1 +
 .../booleanCounter2}/description.json                          | 10 +++++-----
 .../transformation-jvm/booleanCounter2/expected.csv            |  8 ++++++++
 .../booleanCounter2}/input.csv                                 |  0
 ui/cypress/tests/pipelineElement/SinglePipelineElement.ts      |  2 +-
 8 files changed, 18 insertions(+), 16 deletions(-)
 copy ui/cypress/fixtures/pipelineElement/{filters-jvm/booleanFilter1 => transformation-jvm/booleanCounter2}/description.json (52%)
 create mode 100644 ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
 copy ui/cypress/fixtures/pipelineElement/{filters-jvm/booleanFilter1 => transformation-jvm/booleanCounter2}/input.csv (100%)


[incubator-streampipes] 02/02: [hotfix] Improve error message of guess schema result

Posted by ri...@apache.org.
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

commit 7d81a22ad3ade37c94e835a8d255eeba1c68c11c
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jun 29 20:21:38 2022 +0200

    [hotfix] Improve error message of guess schema result
---
 .../connect/container/master/management/GuessManagement.java     | 9 +--------
 .../execution/endpoint/ExtensionsServiceEndpointGenerator.java   | 2 +-
 .../org/apache/streampipes/rest/impl/connect/GuessResource.java  | 2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/GuessManagement.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/GuessManagement.java
index 0d867bbd3..f5385e317 100644
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/GuessManagement.java
+++ b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/GuessManagement.java
@@ -26,7 +26,6 @@ import org.apache.http.client.fluent.Response;
 import org.apache.http.entity.ContentType;
 import org.apache.http.util.EntityUtils;
 import org.apache.streampipes.commons.exceptions.NoServiceEndpointsAvailableException;
-import org.apache.streampipes.connect.api.exception.AdapterException;
 import org.apache.streampipes.connect.api.exception.ParseException;
 import org.apache.streampipes.connect.api.exception.WorkerAdapterException;
 import org.apache.streampipes.connect.container.master.util.WorkerPaths;
@@ -48,8 +47,7 @@ public class GuessManagement {
         this.workerUrlProvider = new WorkerUrlProvider();
     }
 
-    public GuessSchema guessSchema(AdapterDescription adapterDescription) throws AdapterException, ParseException, WorkerAdapterException {
-        try {
+    public GuessSchema guessSchema(AdapterDescription adapterDescription) throws ParseException, WorkerAdapterException, NoServiceEndpointsAvailableException, IOException {
             String workerUrl = workerUrlProvider.getWorkerBaseUrl(adapterDescription.getAppId());
 
             workerUrl = workerUrl + WorkerPaths.getGuessSchemaPath();
@@ -74,11 +72,6 @@ public class GuessManagement {
                     LOG.error(errorMessage.getElementName());
                     throw new WorkerAdapterException(errorMessage);
             }
-
-        } catch (IOException | NoServiceEndpointsAvailableException e) {
-            LOG.error(e.getMessage());
-            throw new AdapterException("Error in connect worker: ", e);
-        }
     }
 
 }
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/endpoint/ExtensionsServiceEndpointGenerator.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/endpoint/ExtensionsServiceEndpointGenerator.java
index b3feb3bee..8d430e46c 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/endpoint/ExtensionsServiceEndpointGenerator.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/endpoint/ExtensionsServiceEndpointGenerator.java
@@ -65,7 +65,7 @@ public class ExtensionsServiceEndpointGenerator {
       return getServiceEndpoints().get(0);
     } else {
       LOG.error("Could not find any service endpoints for appId {}, serviceTag {}", appId, this.spServiceUrlProvider.getServiceTag(appId).asString());
-      throw new NoServiceEndpointsAvailableException("Could not find any matching service endpoints");
+      throw new NoServiceEndpointsAvailableException("Could not find any matching service endpoints - are all software components running?");
     }
   }
 }
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/GuessResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/GuessResource.java
index 474c119a0..6593be344 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/GuessResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/GuessResource.java
@@ -60,7 +60,7 @@ public class GuessResource extends AbstractAdapterResource<GuessManagement> {
       } catch (WorkerAdapterException e) {
           return serverError(e.getContent());
       } catch (Exception e) {
-          LOG.error("Error while guess schema for AdapterDescription: ", e);
+          LOG.error("Error while guessing the schema for AdapterDescription: {}", e.getMessage());
           return serverError(Notifications.error(e.getMessage()));
       }
   }


[incubator-streampipes] 01/02: [test] Add new test for boolean counter

Posted by ri...@apache.org.
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

commit 8ddffb5195ee3f8e9e8d7c063d27e2332f5284bf
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jun 29 20:20:54 2022 +0200

    [test] Add new test for boolean counter
---
 .../pipelineElement/filters-siddhi/increase3/input.csv    |  1 +
 .../transformation-jvm/booleanCounter2/description.json   | 15 +++++++++++++++
 .../transformation-jvm/booleanCounter2/expected.csv       |  8 ++++++++
 .../transformation-jvm/booleanCounter2/input.csv          | 11 +++++++++++
 ui/cypress/tests/pipelineElement/SinglePipelineElement.ts |  2 +-
 5 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
index 73ccb343b..b881d671c 100644
--- a/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/increase3/input.csv
@@ -2,3 +2,4 @@ timestamp;sensorValue
 1623871499055;1.0
 1623871503078;10
 1623871503085;11
+1623871503086;15
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
new file mode 100644
index 000000000..81ca935dd
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
@@ -0,0 +1,15 @@
+{
+  "name": "boolean_counter",
+  "config": [
+    {
+      "type": "drop-down",
+      "selector": "field",
+      "value": "randomboolean"
+    },
+    {
+      "type": "radio",
+      "selector": "flank",
+      "value": "BOTH"
+    }
+  ]
+}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
new file mode 100644
index 000000000..1eaabc8b2
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
@@ -0,0 +1,8 @@
+time;counter;randomboolean
+1623871501064;1;true
+1623871502070;2;false
+1623871503078;3;true
+1623871504082;4;false
+1623871505084;5;true
+1623871506086;6;false
+1623871507091;7;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
new file mode 100644
index 000000000..691d57416
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
@@ -0,0 +1,11 @@
+timestamp;randomboolean
+1623871499055;false
+1623871500059;false
+1623871501064;true
+1623871502070;false
+1623871503078;true
+1623871504082;false
+1623871505084;true
+1623871506086;false
+1623871507091;true
+1623871508093;true
diff --git a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
index 635d22228..40dc62333 100644
--- a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
+++ b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
@@ -22,7 +22,7 @@ import { ProcessorTest } from '../../support/model/ProcessorTest';
 const allTests = Cypress.env('processingElements');
 
 allTests.forEach(test => {
-  const testNames = ['countArray1'];
+  const testNames = ['booleanCounter1'];
 
   const processorTest = test as ProcessorTest;