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 2021/10/11 18:16:53 UTC

[incubator-streampipes] branch dev updated: [hotfix] Add unique id for data stream

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


The following commit(s) were added to refs/heads/dev by this push:
     new b554d3b  [hotfix] Add unique id for data stream
b554d3b is described below

commit b554d3be8057dfd2ec825b8d38a1b0d320b06dc6
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Oct 11 20:16:33 2021 +0200

    [hotfix] Add unique id for data stream
---
 .../connect/container/master/management/SourcesManagement.java          | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/SourcesManagement.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/SourcesManagement.java
index 1a71453..ce0450e 100644
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/SourcesManagement.java
+++ b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/SourcesManagement.java
@@ -18,6 +18,7 @@
 
 package org.apache.streampipes.connect.container.master.management;
 
+import org.apache.commons.lang.RandomStringUtils;
 import org.apache.streampipes.commons.exceptions.NoServiceEndpointsAvailableException;
 import org.apache.streampipes.connect.adapter.util.TransportFormatGenerator;
 import org.apache.streampipes.connect.api.exception.AdapterException;
@@ -99,6 +100,7 @@ public class SourcesManagement {
             ds.setEventGrounding(new EventGrounding(adapterDescription.getEventGrounding()));
         }
 
+        ds.setElementId("urn:fzi.de:eventstream:" + RandomStringUtils.randomAlphabetic(6));
         ds.setName(adapterDescription.getName());
         ds.setDescription(adapterDescription.getDescription());
         ds.setCorrespondingAdapterId(adapterDescription.getElementId());