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 2021/07/20 13:23:34 UTC

[incubator-streampipes-extensions] branch STREAMPIPES-319 updated: [STREAMPIPES-319] Remove obsolete config

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

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


The following commit(s) were added to refs/heads/STREAMPIPES-319 by this push:
     new 528b2f7  [STREAMPIPES-319] Remove obsolete config
     new 2569742  Merge branch 'STREAMPIPES-319' of github.com:apache/incubator-streampipes-extensions into STREAMPIPES-319
528b2f7 is described below

commit 528b2f74ddab258580e9ace68e944ecc4159409a
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Mon Jul 19 19:27:17 2021 +0200

    [STREAMPIPES-319] Remove obsolete config
---
 .../all/jvm/config/AllExtensionsConfig.java        | 78 ----------------------
 .../extensions/all/jvm/config/ConfigKeys.java      | 30 ---------
 2 files changed, 108 deletions(-)

diff --git a/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/AllExtensionsConfig.java b/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/AllExtensionsConfig.java
deleted file mode 100644
index db90c2e..0000000
--- a/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/AllExtensionsConfig.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.streampipes.extensions.all.jvm.config;
-
-import org.apache.streampipes.svcdiscovery.api.SpConfig;
-import org.apache.streampipes.container.model.ExtensionsConfig;
-
-public enum AllExtensionsConfig implements ExtensionsConfig {
-    INSTANCE;
-
-    private final SpConfig peConfig;
-    private final SpConfig adapterConfig;
-    private final static String PE_ID = "pe/org.apache.streampipes.extensions.all.jvm";
-    private final static String SERVICE_NAME = "StreamPipes Extensions (JVM)";
-    private final static String SERVICE_CONTAINER_NAME = "extensions-all-jvm";
-
-    AllExtensionsConfig() {
-        // TODO: harmonize config
-        peConfig = SpConfig.getSpConfig(PE_ID);
-        adapterConfig = SpConfig.getSpConfig("connect-worker-main");
-
-        peConfig.register(ConfigKeys.HOST, SERVICE_CONTAINER_NAME, "Host for extensions");
-        peConfig.register(ConfigKeys.PORT, 8090, "Port for extensions");
-        peConfig.register(ConfigKeys.SERVICE_NAME_KEY, SERVICE_NAME, "Service name");
-
-        adapterConfig.register(ConfigKeys.KAFKA_HOST, "kafka", "Hostname for backend service for kafka");
-        adapterConfig.register(ConfigKeys.KAFKA_PORT, 9092, "Port for backend service for kafka");
-        adapterConfig.register(ConfigKeys.CONNECT_CONTAINER_WORKER_PORT, 8090, "The port of the connect container");
-        adapterConfig.register(ConfigKeys.CONNECT_CONTAINER_WORKER_HOST, SERVICE_CONTAINER_NAME, "The hostname of the connect container");
-        adapterConfig.register(ConfigKeys.BACKEND_HOST, "backend", "The host of the backend to register the worker");
-        adapterConfig.register(ConfigKeys.BACKEND_PORT, 8030, "The port of the backend to register the worker");
-    }
-
-    @Override
-    public String getHost() {
-        return peConfig.getString(ConfigKeys.HOST);
-    }
-
-    @Override
-    public int getPort() {
-        return peConfig.getInteger(ConfigKeys.PORT);
-    }
-
-    @Override
-    public String getId() {
-        return PE_ID;
-    }
-
-    @Override
-    public String getName() {
-        return peConfig.getString(ConfigKeys.SERVICE_NAME_KEY);
-    }
-
-    @Override
-    public String getBackendHost() {
-        return adapterConfig.getString(ConfigKeys.BACKEND_HOST);
-    }
-
-    @Override
-    public int getBackendPort() {
-        return adapterConfig.getInteger(ConfigKeys.BACKEND_PORT);
-    }
-}
diff --git a/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/ConfigKeys.java b/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/ConfigKeys.java
deleted file mode 100644
index 6728212..0000000
--- a/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/config/ConfigKeys.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.streampipes.extensions.all.jvm.config;
-
-public class ConfigKeys {
-    final static String HOST = "SP_HOST";
-    final static String PORT = "SP_PORT";
-    final static String SERVICE_NAME_KEY = "SP_SERVICE_NAME";
-    final static String KAFKA_HOST = "SP_KAFKA_HOST";
-    final static String KAFKA_PORT = "SP_KAFKA_PORT";
-    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 BACKEND_HOST = "SP_BACKEND_HOST";
-    final static String BACKEND_PORT = "SP_BACKEND_PORT";
-}