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/11/19 22:31:16 UTC

[incubator-streampipes-extensions] branch STREAMPIPES-257 created (now 00d3c7d)

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

zehnder pushed a change to branch STREAMPIPES-257
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git.


      at 00d3c7d  Started to move connect master REST API into backend

This branch includes the following new commits:

     new 00d3c7d  Started to move connect master REST API into backend

The 1 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.



[incubator-streampipes-extensions] 01/01: Started to move connect master REST API into backend

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-257
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git

commit 00d3c7d14560b6207ea36fd21312ff885a894a9f
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Nov 19 23:30:41 2020 +0100

    Started to move connect master REST API into backend
---
 .../streampipes/connect/ConnectAdapterInit.java    |  5 +++--
 .../streampipes/connect/config/ConfigKeys.java     |  4 ++--
 .../connect/config/ConnectWorkerConfig.java        | 22 ++++++----------------
 3 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java
index 6897963..173aff1 100644
--- a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java
+++ b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java
@@ -99,10 +99,11 @@ public class ConnectAdapterInit extends AdapterWorkerContainer {
             .add(new FlicMQTTAdapter());
 
     String workerUrl = ConnectWorkerConfig.INSTANCE.getConnectContainerWorkerUrl();
-    String masterUrl = ConnectWorkerConfig.INSTANCE.getConnectContainerMasterUrl();
+//    String masterUrl = ConnectWorkerConfig.INSTANCE.getConnectContainerMasterUrl();
     Integer workerPort = ConnectWorkerConfig.INSTANCE.getConnectContainerWorkerPort();
 
-    new ConnectAdapterInit().init(workerUrl, masterUrl, workerPort);
+    // TODO
+    new ConnectAdapterInit().init(workerUrl, "http://localhost:8030/streampipes-backend/api/connect", workerPort);
 
   }
 }
diff --git a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConfigKeys.java b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConfigKeys.java
index f70b1a0..97dbf27 100644
--- a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConfigKeys.java
+++ b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConfigKeys.java
@@ -25,7 +25,7 @@ public class ConfigKeys {
     final static String CONNECT_CONTAINER_WORKER_HOST = "SP_CONNECT_CONTAINER_WORKER_HOST";
     final static String CONNECT_CONTAINER_WORKER_PORT = "SP_CONNECT_CONTAINER_WORKER_PORT";
 
-    final static String CONNECT_CONTAINER_MASTER_HOST = "SP_CONNECT_CONTAINER_MASTER_HOST";
-    final static String CONNECT_CONTAINER_MASTER_PORT = "SP_CONNECT_CONTAINER_MASTER_PORT";
+    final static String BACKEND_HOST = "SP_BACKEND_HOST";
+    final static String BACKEND_PORT = "SP_BACKEND_PORT";
 
 }
diff --git a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConnectWorkerConfig.java b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConnectWorkerConfig.java
index 919d0ac..1bd5f97 100644
--- a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConnectWorkerConfig.java
+++ b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/config/ConnectWorkerConfig.java
@@ -20,7 +20,6 @@ package org.apache.streampipes.connect.config;
 
 
 import org.apache.streampipes.config.SpConfig;
-import org.apache.streampipes.connect.init.Config;
 
 public enum ConnectWorkerConfig {
   INSTANCE;
@@ -35,11 +34,11 @@ public enum ConnectWorkerConfig {
     config.register(ConfigKeys.KAFKA_HOST, "kafka", "Hostname for backend service for kafka");
     config.register(ConfigKeys.KAFKA_PORT, 9092, "Port for backend service for kafka");
 
-    config.register(ConfigKeys.CONNECT_CONTAINER_WORKER_PORT, Config.WORKER_PORT, "The port of the connect container");
+    config.register(ConfigKeys.CONNECT_CONTAINER_WORKER_PORT, 8098, "The port of the connect container");
     config.register(ConfigKeys.CONNECT_CONTAINER_WORKER_HOST, name, "The hostname of the connect container");
 
-    config.register(ConfigKeys.CONNECT_CONTAINER_MASTER_PORT, Config.MASTER_PORT, "The port of the connect container");
-    config.register(ConfigKeys.CONNECT_CONTAINER_MASTER_HOST, Config.MASTER_HOST, "The hostname of the connect container");
+//    config.register(ConfigKeys.CONNECT_CONTAINER_MASTER_PORT, Config.MASTER_PORT, "The port of the connect container");
+//    config.register(ConfigKeys.CONNECT_CONTAINER_MASTER_HOST, Config.MASTER_HOST, "The hostname of the connect container");
 
   }
 
@@ -47,9 +46,9 @@ public enum ConnectWorkerConfig {
     return "http://" + config.getString(ConfigKeys.CONNECT_CONTAINER_WORKER_HOST) + ":" + config.getInteger(ConfigKeys.CONNECT_CONTAINER_WORKER_PORT) + "/";
   }
 
-  public String getConnectContainerMasterUrl() {
-    return "http://" + config.getString(ConfigKeys.CONNECT_CONTAINER_MASTER_HOST) + ":" + config.getInteger(ConfigKeys.CONNECT_CONTAINER_MASTER_PORT) + "/";
-  }
+//  public String getConnectContainerMasterUrl() {
+//    return "http://" + config.getString(ConfigKeys.CONNECT_CONTAINER_MASTER_HOST) + ":" + config.getInteger(ConfigKeys.CONNECT_CONTAINER_MASTER_PORT) + "/";
+//  }
 
   public String getKafkaHost() {
     return config.getString(ConfigKeys.KAFKA_HOST);
@@ -76,13 +75,4 @@ public enum ConnectWorkerConfig {
     return config.getInteger(ConfigKeys.CONNECT_CONTAINER_WORKER_PORT);
   }
 
-
-  public String getConnectContainerMasterHost() {
-    return config.getString(ConfigKeys.CONNECT_CONTAINER_MASTER_HOST);
-  }
-
-  public Integer getConnectContainerMasterPort() {
-    return config.getInteger(ConfigKeys.CONNECT_CONTAINER_MASTER_PORT);
-  }
-
 }