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/01/06 21:16:33 UTC
[incubator-streampipes] branch dev updated (9e70c1b -> 26c6169)
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 9e70c1b [hotfix] Improve exception handling of messaging system
new b620cb1 [hotfix] Modify button style in pipeline notifications dialog
new c77f00b [hotfix] Minor improvement of exception handling
new 26c6169 [hotfix] Properly select transport format based on priority
The 3 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:
.../manager/execution/http/HttpRequestBuilder.java | 6 ++----
.../manager/matching/FormatSelector.java | 23 +++++++++++++++-------
.../pipeline-notifications.component.html | 2 +-
3 files changed, 19 insertions(+), 12 deletions(-)
[incubator-streampipes] 03/03: [hotfix] Properly select transport format based on priority
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 26c6169361e05958c9f2ca5fda7c59a88ee855d6
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jan 6 22:16:21 2022 +0100
[hotfix] Properly select transport format based on priority
---
.../manager/matching/FormatSelector.java | 23 +++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/matching/FormatSelector.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/matching/FormatSelector.java
index fce4b8a..1616805 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/matching/FormatSelector.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/matching/FormatSelector.java
@@ -20,14 +20,16 @@ package org.apache.streampipes.manager.matching;
import org.apache.streampipes.config.backend.BackendConfig;
import org.apache.streampipes.config.backend.SpDataFormat;
+import org.apache.streampipes.model.SpDataStream;
import org.apache.streampipes.model.base.InvocableStreamPipesEntity;
import org.apache.streampipes.model.base.NamedStreamPipesEntity;
-import org.apache.streampipes.model.SpDataStream;
import org.apache.streampipes.model.grounding.TransportFormat;
import org.apache.streampipes.vocabulary.MessageFormat;
+import java.net.URI;
import java.util.List;
import java.util.Set;
+import java.util.stream.Collectors;
public class FormatSelector extends GroundingSelector {
@@ -46,12 +48,15 @@ public class FormatSelector extends GroundingSelector {
List<SpDataFormat> prioritizedFormats =
BackendConfig.INSTANCE.getMessagingSettings().getPrioritizedFormats();
- return prioritizedFormats
+ List<SpDataFormat> supportedFormats = prioritizedFormats
.stream()
- .filter(pf -> supportsFormat(pf.getMessageFormat()))
- .findFirst()
- .map(pf -> new TransportFormat(pf.getMessageFormat()))
- .orElse(new TransportFormat(MessageFormat.Json));
+ .filter(pf -> supportsFormat(pf.getMessageFormat())).collect(Collectors.toList());
+
+ if (supportedFormats.size() > 0) {
+ return new TransportFormat(supportedFormats.get(0).getMessageFormat());
+ } else {
+ return new TransportFormat(MessageFormat.Json);
+ }
}
}
@@ -63,6 +68,10 @@ public class FormatSelector extends GroundingSelector {
.getSupportedGrounding()
.getTransportFormats()
.stream()
- .anyMatch(s -> s.getRdfType().contains(format)));
+ .anyMatch(s -> rdfTypesAsString(s.getRdfType()).contains(format)));
+ }
+
+ private List<String> rdfTypesAsString(List<URI> uri) {
+ return uri.stream().map(URI::toString).collect(Collectors.toList());
}
}
[incubator-streampipes] 02/03: [hotfix] Minor improvement of exception handling
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 c77f00bc20b9a2ae809c37e48ee2500844be3c71
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jan 6 21:35:45 2022 +0100
[hotfix] Minor improvement of exception handling
---
.../streampipes/manager/execution/http/HttpRequestBuilder.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
index 671235a..ddd771f 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
@@ -22,7 +22,6 @@ import com.google.gson.JsonSyntaxException;
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.Response;
import org.apache.http.entity.ContentType;
-import org.apache.streampipes.manager.storage.UserService;
import org.apache.streampipes.model.base.NamedStreamPipesEntity;
import org.apache.streampipes.model.client.user.Permission;
import org.apache.streampipes.model.client.user.Principal;
@@ -65,8 +64,7 @@ public class HttpRequestBuilder {
.execute();
return handleResponse(httpResp);
} catch (Exception e) {
- e.printStackTrace();
- LOG.error(e.getMessage());
+ LOG.error("Could not perform invocation request", e);
return new PipelineElementStatus(endpointUrl, payload.getName(), false, e.getMessage());
}
}
@@ -76,7 +74,7 @@ public class HttpRequestBuilder {
Response httpResp = Request.Delete(endpointUrl).connectTimeout(10000).execute();
return handleResponse(httpResp);
} catch (Exception e) {
- LOG.error("Could not stop pipeline " + endpointUrl, e.getMessage());
+ LOG.error("Could not stop pipeline {}", endpointUrl, e);
return new PipelineElementStatus(endpointUrl, payload.getName(), false, e.getMessage());
}
}
[incubator-streampipes] 01/03: [hotfix] Modify button style in pipeline notifications dialog
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 b620cb146f3a66e1f0dae8d26fa793be062ffd58
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jan 6 21:23:23 2022 +0100
[hotfix] Modify button style in pipeline notifications dialog
---
.../dialog/pipeline-notifications/pipeline-notifications.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.html b/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.html
index 7610b51..65fdce4 100644
--- a/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.html
+++ b/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.html
@@ -28,7 +28,7 @@
</div>
<mat-divider></mat-divider>
<div class="sp-dialog-actions actions-align-right">
- <button mat-button mat-raised-button color="primary" (click)="acknowledgeAndClose()">
+ <button mat-button mat-raised-button color="accent" (click)="acknowledgeAndClose()">
Acknowledge
</button>
</div>