This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch 1423-update-archetypes-and-remove-unused-flink-archetypes in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 9b37775dfae88168b828ac592c21550907b69f14 Author: Dominik Riemer <[email protected]> AuthorDate: Fri Mar 17 21:52:18 2023 +0100 Remoce flink archetypes, fix imports of extensions archetype (#1423) --- .../archetype-resources/src/main/java/Init.java | 6 +- .../README.md | 38 ---- .../pom.xml | 58 ------ .../META-INF/maven/archetype-metadata.xml | 72 ------- .../main/resources/archetype-resources/Dockerfile | 20 -- .../resources/archetype-resources/development/env | 20 -- .../src/main/resources/archetype-resources/pom.xml | 215 --------------------- .../archetype-resources/src/main/java/Init.java | 71 ------- .../src/main/java/config/ConfigKeys.java | 33 ---- .../__packageName__/__classNamePrefix__.java | 42 ---- .../__classNamePrefix__Controller.java | 76 -------- .../__classNamePrefix__Parameters.java | 41 ---- .../__classNamePrefix__Program.java | 70 ------- .../documentation.md | 42 ---- .../icon.png | Bin 13563 -> 0 bytes .../strings.en | 5 - .../streampipes-archetype-pe-sinks-flink/README.md | 38 ---- .../streampipes-archetype-pe-sinks-flink/pom.xml | 57 ------ .../META-INF/maven/archetype-metadata.xml | 72 ------- .../main/resources/archetype-resources/Dockerfile | 20 -- .../resources/archetype-resources/development/env | 20 -- .../src/main/resources/archetype-resources/pom.xml | 215 --------------------- .../archetype-resources/src/main/java/Init.java | 56 ------ .../src/main/java/config/Config.java | 76 -------- .../src/main/java/config/ConfigKeys.java | 31 --- .../__classNamePrefix__Controller.java | 71 ------- .../__classNamePrefix__Parameters.java | 52 ----- .../__classNamePrefix__Program.java | 59 ------ .../documentation.md | 39 ---- .../__package__.pe.sink.__packageName__/icon.png | Bin 13563 -> 0 bytes .../__package__.pe.sink.__packageName__/strings.en | 11 -- pom.xml | 8 +- 32 files changed, 4 insertions(+), 1630 deletions(-) diff --git a/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java index 4863966d1..777e6dc31 100644 --- a/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java +++ b/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java @@ -21,16 +21,16 @@ #set( $symbol_escape = '\' ) package ${package}; -import org.apache.streampipes.container.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.container.model.SpServiceDefinition; -import org.apache.streampipes.container.model.SpServiceDefinitionBuilder; import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; +import org.apache.streampipes.extensions.management.model.SpServiceDefinition; +import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; +import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; import ${package}.pe.${packageName}.${classNamePrefix}DataProcessor; import ${package}.pe.${packageName}.${classNamePrefix}DataSink; diff --git a/archetypes/streampipes-archetype-pe-processors-flink/README.md b/archetypes/streampipes-archetype-pe-processors-flink/README.md deleted file mode 100644 index 93e150805..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/README.md +++ /dev/null @@ -1,38 +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. - ~ - --> - -## StreamPipes Maven Archetype for Flink-based Data Processors - -### Usage - -```bash -mvn archetype:generate \ - -DarchetypeGroupId=org.apache.streampipes \ - -DarchetypeArtifactId=streampipes-archetype-pe-processors-flink \ - -DarchetypeVersion=<VERSION> \ - -DgroupId=org.myorga \ - -DclassNamePrefix=MyFlinkProcessor \ - -DartifactId=my-processor-flink \ - -Dversion=<VERSION> -``` - -### Variables - -* classNamePrefix: Will be used as a prefix to name your controller & parameter classes -* packageName: Will be used as the package name - diff --git a/archetypes/streampipes-archetype-pe-processors-flink/pom.xml b/archetypes/streampipes-archetype-pe-processors-flink/pom.xml deleted file mode 100644 index 9358e3758..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-parent</artifactId> - <version>0.92.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>streampipes-archetype-pe-processors-flink</artifactId> - <packaging>maven-archetype</packaging> - - <name>streampipes-archetype-pe-processors-flink</name> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - <version>3.2.1</version> - </extension> - </extensions> - - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-archetype-plugin</artifactId> - <version>3.2.1</version> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - </plugin> - </plugins> - </build> - -</project> diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/META-INF/maven/archetype-metadata.xml deleted file mode 100644 index 8b8a6946c..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/META-INF/maven/archetype-metadata.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<archetype-descriptor - xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" - name="streampipes-pe-sinks-standalone" - xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <fileSets> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory/> - <includes> - <include>Dockerfile</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory>src/main/resources</directory> - <includes> - <include>**/*.en</include> - <include>**/*.md</include> - </includes> - </fileSet> - <fileSet filtered="false" packaged="false" > - <directory>src/main/resources</directory> - <includes> - <include>**/*.png</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory/> - <includes> - <include>development/env</include> - </includes> - </fileSet> - </fileSets> - <requiredProperties> - <requiredProperty key="classNamePrefix"> - <defaultValue>Example</defaultValue> - </requiredProperty> - <requiredProperty key="packageName"> - <defaultValue>example</defaultValue> - </requiredProperty> - </requiredProperties> -</archetype-descriptor> diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/Dockerfile b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/Dockerfile deleted file mode 100644 index 448b6d3ae..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/Dockerfile +++ /dev/null @@ -1,20 +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. - -FROM adoptopenjdk/openjdk8-openj9:alpine - -COPY ./target/${artifactId}.jar /streampipes-processing-element-container.jar - -ENTRYPOINT ["java", "-jar", "/streampipes-processing-element-container.jar"] diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/development/env b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/development/env deleted file mode 100644 index 2eaca6f67..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/development/env +++ /dev/null @@ -1,20 +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. - -# Those parameters are used by IntelliJ to set the default consul parameters for development -SP_PORT=8005 -SP_HOST=host.docker.internal -SP_DEBUG=true -SP_FLINK_DEBUG=true \ No newline at end of file diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/pom.xml b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 1a82a1561..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,215 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>${groupId}</groupId> - <artifactId>${artifactId}</artifactId> - <version>${version}</version> - - <properties> - <sp.version>0.92.0-SNAPSHOT</sp.version> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-container-standalone</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka_2.10</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka-clients</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-commons</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka_2.10</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka-clients</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-wrapper-flink</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.9.4</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-sdk-bundle</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-to-slf4j</artifactId> - <version>2.8.2</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.24</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-config</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-json</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-cbor</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-smile</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-fst</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-jms</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-kafka</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-mqtt</artifactId> - <version>${sp.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.4</version> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>2.4.1</version> - </dependency> - </dependencies> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <createDependencyReducedPom>false</createDependencyReducedPom> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>META-INF/spring.handlers</resource> - </transformer> - <transformer - implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer"> - <resource>META-INF/spring.factories</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>META-INF/spring.schemas</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>reference.conf</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <mainClass>${package}.Init</mainClass> - </transformer> - </transformers> - <filters> - - <filter> - <artifact>*:*</artifact> - <excludes> - <exclude>META-INF/*.SF</exclude> - <exclude>META-INF/*.DSA</exclude> - <exclude>META-INF/*.RSA</exclude> - <exclude>META-INF/maven/com.github.jsonld-java/jsonld-java/pom.xml</exclude> - <exclude>META-INF/maven/com.github.jsonld-java/jsonld-java-sesame/pom.xml - </exclude> - </excludes> - </filter> - </filters> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java deleted file mode 100644 index 8b05fdfe3..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java +++ /dev/null @@ -1,71 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}; - -import org.apache.streampipes.container.init.DeclarersSingleton; -import org.apache.streampipes.container.standalone.init.StandaloneModelSubmitter; -import org.apache.streampipes.container.model.SpServiceDefinition; -import org.apache.streampipes.container.model.SpServiceDefinitionBuilder; - -import ${package}.config.ConfigKeys; - -import ${package}.pe.processor.${packageName}.${classNamePrefix}Controller; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; - -public class Init extends StandaloneModelSubmitter { - - public static void main(String[] args) throws Exception { - new Init().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("${package}", - "Apache Flink processor", - "", - 8090) - .registerPipelineElement(new ${classNamePrefix}Controller()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory()) - .addConfig(ConfigKeys.FLINK_HOST, "jobmanager", "Hostname of the Flink Jobmanager") - .addConfig(ConfigKeys.FLINK_PORT, 8081, "Port of the Flink Jobmanager") - .addConfig(ConfigKeys.DEBUG, false, "Debug/Mini cluster mode of Flink program") - .addConfig(ConfigKeys.FLINK_JAR_FILE_LOC, "./streampipes-processing-element-container.jar", "Jar file location") - .addConfig(ConfigKeys.SERVICE_NAME, "sp fft stream analytics metrics", "Data processor service name") - .addConfig(ConfigKeys.HOST, "${artifactId}", "Data processor host") - .build(); - } -} diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java deleted file mode 100644 index 0dc3eb95c..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java +++ /dev/null @@ -1,33 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.config; - -public class ConfigKeys { - public static final String HOST = "SP_HOST"; - public static final String PORT = "SP_PORT"; - public static final String SERVICE_NAME = "SP_SERVICE_NAME"; - public static final String FLINK_HOST = "SP_FLINK_HOST"; - public static final String FLINK_PORT = "SP_FLINK_PORT"; - public static final String FLINK_DEBUG = "SP_FLINK_DEBUG"; - public static final String DEBUG = "SP_FLINK_DEBUG"; - public static final String FLINK_JAR_FILE_LOC = "SP_FLINK_JAR_FILE_LOC"; -} \ No newline at end of file diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__.java deleted file mode 100644 index f61fc83a2..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__.java +++ /dev/null @@ -1,42 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.pe.processor.${packageName}; - -import org.apache.flink.api.common.functions.FlatMapFunction; -import org.apache.flink.util.Collector; - -import org.apache.streampipes.model.runtime.Event; - -public class ${classNamePrefix} implements FlatMapFunction<Event, Event> { - - private String exampleText; - - public ${classNamePrefix}(String exampleText) { - this.exampleText = exampleText; - } - - @Override - public void flatMap(Event event, Collector<Event> out) { - event.addField("appendedText", exampleText); - out.collect(event); - } -} diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Controller.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Controller.java deleted file mode 100644 index 981a6a8c9..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Controller.java +++ /dev/null @@ -1,76 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.pe.processor.${packageName}; - -import org.apache.streampipes.sdk.builder.PrimitivePropertyBuilder; -import org.apache.streampipes.sdk.utils.Datatypes; -import org.apache.streampipes.client.StreamPipesClient; -import org.apache.streampipes.container.config.ConfigExtractor; -import org.apache.streampipes.model.DataProcessorType; -import org.apache.streampipes.model.graph.DataProcessorDescription; -import org.apache.streampipes.model.graph.DataProcessorInvocation; -import org.apache.streampipes.sdk.builder.ProcessingElementBuilder; -import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder; -import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor; -import org.apache.streampipes.sdk.helpers.EpRequirements; -import org.apache.streampipes.sdk.helpers.Labels; -import org.apache.streampipes.sdk.helpers.OutputStrategies; -import org.apache.streampipes.sdk.helpers.*; -import org.apache.streampipes.sdk.utils.Assets; -import org.apache.streampipes.wrapper.flink.FlinkDataProcessorDeclarer; -import org.apache.streampipes.wrapper.flink.FlinkDataProcessorRuntime; - -public class ${classNamePrefix}Controller extends FlinkDataProcessorDeclarer<${classNamePrefix}Parameters> { - - private static final String EXAMPLE_KEY = "example-key"; - - @Override - public DataProcessorDescription declareModel() { - return ProcessingElementBuilder.create("${package}.pe.processor.${packageName}") - .withAssets(Assets.DOCUMENTATION, Assets.ICON) - .withLocales(Locales.EN) - .category(DataProcessorType.ENRICH) - .requiredStream(StreamRequirementsBuilder - .create() - .requiredProperty(EpRequirements.anyProperty()) - .build()) - .requiredTextParameter(Labels.withId(EXAMPLE_KEY)) - .outputStrategy(OutputStrategies.append( - PrimitivePropertyBuilder.create( - Datatypes.String, "appendedText") - .build())) - .build(); - } - - @Override - public FlinkDataProcessorRuntime<${classNamePrefix}Parameters> getRuntime( - DataProcessorInvocation graph, - ProcessingElementParameterExtractor extractor, - ConfigExtractor configExtractor, - StreamPipesClient streamPipesClient) { - - String exampleText = extractor.singleValueParameter(EXAMPLE_KEY, String.class); - ${classNamePrefix}Parameters params = new ${classNamePrefix}Parameters(graph, exampleText); - - return new ${classNamePrefix}Program(params, configExtractor, streamPipesClient); - } -} diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Parameters.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Parameters.java deleted file mode 100644 index d86ea3580..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Parameters.java +++ /dev/null @@ -1,41 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.pe.processor.${packageName}; - -import org.apache.streampipes.model.graph.DataProcessorInvocation; -import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams; - -public class ${classNamePrefix}Parameters extends EventProcessorBindingParams { - - private String exampleText; - private static final long serialVersionUID = 1L; - - - public ${classNamePrefix}Parameters(DataProcessorInvocation graph, String exampleText) { - super(graph); - this.exampleText = exampleText; - } - - public String getExampleText() { - return exampleText; - } -} diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Program.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Program.java deleted file mode 100644 index 929e3a87a..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/pe/processor/__packageName__/__classNamePrefix__Program.java +++ /dev/null @@ -1,70 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.pe.processor.${packageName}; - -import ${package}.config.ConfigKeys; - -import org.apache.flink.api.common.functions.MapFunction; -import org.apache.flink.streaming.api.datastream.DataStream; -import org.apache.streampipes.client.StreamPipesClient; -import org.apache.streampipes.container.config.ConfigExtractor; -import org.apache.streampipes.model.graph.DataProcessorInvocation; -import org.apache.streampipes.model.runtime.Event; -import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor; -import org.apache.streampipes.wrapper.flink.FlinkDataProcessorRuntime; -import org.apache.streampipes.wrapper.flink.FlinkDeploymentConfig; -import org.apache.streampipes.svcdiscovery.api.SpConfig; - -import ${package}.config.ConfigKeys; - -import java.io.Serializable; - -public class ${classNamePrefix}Program extends FlinkDataProcessorRuntime<${classNamePrefix}Parameters> implements Serializable { - - private static final long serialVersionUID = 1L; - private final ${classNamePrefix}Parameters params; - - public ${classNamePrefix}Program(${classNamePrefix}Parameters params, - ConfigExtractor configExtractor, - StreamPipesClient streamPipesClient) - { - super(params, configExtractor, streamPipesClient); - this.params = params; - } - - - @Override - protected FlinkDeploymentConfig getDeploymentConfig(ConfigExtractor configExtractor) { - SpConfig config = configExtractor.getConfig(); - return new FlinkDeploymentConfig(config.getString(ConfigKeys.FLINK_JAR_FILE_LOC), - config.getString(ConfigKeys.FLINK_HOST), - config.getInteger(ConfigKeys.FLINK_PORT), - config.getBoolean(ConfigKeys.DEBUG)); - } - - @Override - protected DataStream<Event> getApplicationLogic(DataStream<Event>... dataStreams){ - - return dataStreams[0] - .flatMap(new ${classNamePrefix}(this.params.getExampleText())); - } -} diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/documentation.md b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/documentation.md deleted file mode 100644 index 1e0e266f3..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/documentation.md +++ /dev/null @@ -1,42 +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. - ~ - --> -#set( $double_pound = '##' ) - -${double_pound} ${classNamePrefix} - -<p align="center"> - <img src="icon.png" width="150px;" class="pe-image-documentation"/> -</p> - -*** - -${double_pound} Description -Describe your new data processor here! - -*** - -${double_pound} Required input -What are the input requirements of your data processor? - -*** - -${double_pound} Configuration -What are the configurations a user has to provide? - -${double_pound} Output -How do the events your data processor emits look like? diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/icon.png b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/icon.png deleted file mode 100644 index 05d4b1dee..000000000 Binary files a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/icon.png and /dev/null differ diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/strings.en b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/strings.en deleted file mode 100644 index d23ce26ca..000000000 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.processor.__packageName__/strings.en +++ /dev/null @@ -1,5 +0,0 @@ -${package}.pe.processor.${packageName}.title=${classNamePrefix} -${package}.pe.processor.${packageName}.description=Description of data processor - -example-key.title=Example Text Parameter -example-key.description=Example Text Parameter Description diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/README.md b/archetypes/streampipes-archetype-pe-sinks-flink/README.md deleted file mode 100644 index 4dfea82e6..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/README.md +++ /dev/null @@ -1,38 +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. - ~ - --> - -## StreamPipes Maven Archetype for Flink-based Sinks - -### Usage - -```bash -mvn archetype:generate \ - -DarchetypeGroupId=org.apache.streampipes \ - -DarchetypeArtifactId=streampipes-archetype-pe-sinks-flink \ - -DarchetypeVersion=<VERSION> \ - -DgroupId=org.myorga \ - -DclassNamePrefix=MyFlinkSink \ - -DartifactId=my-flink-sink\ - -Dversion=<VERSION> -``` - -### Variables - -* classNamePrefix: Will be used as a prefix to name your controller & parameter classes -* packageName: Will be used as the package name - diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/pom.xml b/archetypes/streampipes-archetype-pe-sinks-flink/pom.xml deleted file mode 100644 index 0e17b97a4..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-parent</artifactId> - <version>0.92.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>streampipes-archetype-pe-sinks-flink</artifactId> - <packaging>maven-archetype</packaging> - - <name>streampipes-archetype-pe-sinks-flink</name> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - <version>3.2.1</version> - </extension> - </extensions> - - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-archetype-plugin</artifactId> - <version>3.2.1</version> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - </plugin> - </plugins> - </build> -</project> diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/META-INF/maven/archetype-metadata.xml deleted file mode 100644 index 8b8a6946c..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/META-INF/maven/archetype-metadata.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<archetype-descriptor - xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" - name="streampipes-pe-sinks-standalone" - xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <fileSets> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory/> - <includes> - <include>Dockerfile</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory>src/main/resources</directory> - <includes> - <include>**/*.en</include> - <include>**/*.md</include> - </includes> - </fileSet> - <fileSet filtered="false" packaged="false" > - <directory>src/main/resources</directory> - <includes> - <include>**/*.png</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="false" encoding="UTF-8"> - <directory/> - <includes> - <include>development/env</include> - </includes> - </fileSet> - </fileSets> - <requiredProperties> - <requiredProperty key="classNamePrefix"> - <defaultValue>Example</defaultValue> - </requiredProperty> - <requiredProperty key="packageName"> - <defaultValue>example</defaultValue> - </requiredProperty> - </requiredProperties> -</archetype-descriptor> diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/Dockerfile b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/Dockerfile deleted file mode 100644 index 448b6d3ae..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/Dockerfile +++ /dev/null @@ -1,20 +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. - -FROM adoptopenjdk/openjdk8-openj9:alpine - -COPY ./target/${artifactId}.jar /streampipes-processing-element-container.jar - -ENTRYPOINT ["java", "-jar", "/streampipes-processing-element-container.jar"] diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/development/env b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/development/env deleted file mode 100644 index 2eaca6f67..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/development/env +++ /dev/null @@ -1,20 +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. - -# Those parameters are used by IntelliJ to set the default consul parameters for development -SP_PORT=8005 -SP_HOST=host.docker.internal -SP_DEBUG=true -SP_FLINK_DEBUG=true \ No newline at end of file diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/pom.xml b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 0c29e2aa1..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,215 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - ~ - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>${groupId}</groupId> - <artifactId>${artifactId}</artifactId> - <version>${version}</version> - - <properties> - <sp.version>0.92.0-SNAPSHOT</sp.version> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-container-standalone</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka_2.10</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka-clients</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-commons</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka_2.10</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.kafka</groupId> - <artifactId>kafka-clients</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-wrapper-flink</artifactId> - <version>${sp.version}</version> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.9.4</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-sdk</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-to-slf4j</artifactId> - <version>2.8.2</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.24</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-config</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-json</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-cbor</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-smile</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-dataformat-fst</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-jms</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-kafka</artifactId> - <version>${sp.version}</version> - </dependency> - <dependency> - <groupId>org.apache.streampipes</groupId> - <artifactId>streampipes-messaging-mqtt</artifactId> - <version>${sp.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.3</version> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>2.4.1</version> - </dependency> - </dependencies> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <createDependencyReducedPom>false</createDependencyReducedPom> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>META-INF/spring.handlers</resource> - </transformer> - <transformer - implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer"> - <resource>META-INF/spring.factories</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>META-INF/spring.schemas</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> - <transformer - implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>reference.conf</resource> - </transformer> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <mainClass>${package}.Init</mainClass> - </transformer> - </transformers> - <filters> - - <filter> - <artifact>*:*</artifact> - <excludes> - <exclude>META-INF/*.SF</exclude> - <exclude>META-INF/*.DSA</exclude> - <exclude>META-INF/*.RSA</exclude> - <exclude>META-INF/maven/com.github.jsonld-java/jsonld-java/pom.xml</exclude> - <exclude>META-INF/maven/com.github.jsonld-java/jsonld-java-sesame/pom.xml - </exclude> - </excludes> - </filter> - </filters> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java deleted file mode 100644 index 39235cb3d..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java +++ /dev/null @@ -1,56 +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. - * - */ - -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -package ${package}; - -import org.apache.streampipes.container.init.DeclarersSingleton; -import org.apache.streampipes.container.standalone.init.StandaloneModelSubmitter; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; - -import ${package}.config.Config; -import ${package}.pe.sink.${packageName}.${classNamePrefix}Controller; - -public class Init extends StandaloneModelSubmitter { - - public static void main(String[] args) { - DeclarersSingleton.getInstance() - .add(new ${classNamePrefix}Controller()); - - DeclarersSingleton.getInstance().registerDataFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()); - - DeclarersSingleton.getInstance().registerProtocols( - new SpKafkaProtocolFactory(), - new SpMqttProtocolFactory(), - new SpJmsProtocolFactory()); - - new Init().init(Config.INSTANCE); - } -} diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/Config.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/Config.java deleted file mode 100644 index 16e02a446..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/Config.java +++ /dev/null @@ -1,76 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -#set( $svc_name = $package.getClass().forName("org.apache.velocity.util.StringUtils").sub("$artifactId", "-", " ") ) -package ${package}.config; - -import org.apache.streampipes.config.SpConfig; -import org.apache.streampipes.container.model.PeConfig; - -public enum Config implements PeConfig { - INSTANCE; - - private SpConfig config; - public static final String JAR_FILE = "./streampipes-processing-element-container.jar"; - private final static String SERVICE_ID = "pe/${package}.sink.flink"; - - Config() { - config = SpConfig.getSpConfig(SERVICE_ID); - config.register(ConfigKeys.HOST, "${artifactId}", "Data sink host"); - config.register(ConfigKeys.PORT, 8090, "Data sink port"); - config.register(ConfigKeys.SERVICE_NAME, "${svc_name}", "Data sink service name"); - config.register(ConfigKeys.FLINK_HOST, "jobmanager", "Flink jobmanager host"); - config.register(ConfigKeys.FLINK_PORT, 8081, "Flink jobmanager port"); - config.register(ConfigKeys.FLINK_DEBUG, false, "When set to true programs are not deployed to cluster, but executed locally"); - } - - public String getFlinkHost() { - return config.getString(ConfigKeys.FLINK_HOST); - } - - public int getFlinkPort() { - return config.getInteger(ConfigKeys.FLINK_PORT); - } - - public boolean getFlinkDebug() { - return config.getBoolean(ConfigKeys.FLINK_DEBUG); - } - - @Override - public String getHost() { - return config.getString(ConfigKeys.HOST); - } - - @Override - public int getPort() { - return config.getInteger(ConfigKeys.PORT); - } - - @Override - public String getId() { - return SERVICE_ID; - } - - @Override - public String getName() { - return config.getString(ConfigKeys.SERVICE_NAME); - } - -} diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java deleted file mode 100644 index e307f0da9..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/config/ConfigKeys.java +++ /dev/null @@ -1,31 +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. - * - */ - -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -package ${package}.config; - -public class ConfigKeys { - final static String HOST = "SP_HOST"; - final static String PORT = "SP_PORT"; - final static String SERVICE_NAME = "SP_SERVICE_NAME"; - final static String FLINK_HOST = "SP_FLINK_HOST"; - final static String FLINK_PORT = "SP_FLINK_PORT"; - final static String FLINK_DEBUG = "SP_FLINK_DEBUG"; -} \ No newline at end of file diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Controller.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Controller.java deleted file mode 100644 index b0bf3ee6b..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Controller.java +++ /dev/null @@ -1,71 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -package ${package}.pe.sink.${packageName}; - -import ${package}.config.Config; -import org.apache.streampipes.model.DataSinkType; -import org.apache.streampipes.model.graph.DataSinkDescription; -import org.apache.streampipes.model.graph.DataSinkInvocation; -import org.apache.streampipes.sdk.builder.DataSinkBuilder; -import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder; -import org.apache.streampipes.sdk.extractor.DataSinkParameterExtractor; -import org.apache.streampipes.sdk.helpers.EpRequirements; -import org.apache.streampipes.sdk.helpers.Labels; -import org.apache.streampipes.sdk.helpers.SupportedFormats; -import org.apache.streampipes.sdk.helpers.SupportedProtocols; -import org.apache.streampipes.wrapper.flink.FlinkDataSinkDeclarer; -import org.apache.streampipes.wrapper.flink.FlinkDataSinkRuntime; -import org.apache.streampipes.sdk.helpers.*; -import org.apache.streampipes.sdk.utils.Assets; - -public class ${classNamePrefix}Controller extends FlinkDataSinkDeclarer<${classNamePrefix}Parameters> { - - private static final String HOST_KEY = "host-key"; - private static final String PORT_KEY = "port-key"; - private static final String PASSWORD_KEY = "password-key"; - - @Override - public DataSinkDescription declareModel() { - return DataSinkBuilder.create("${package}.pe.sink.${packageName}") - .category(DataSinkType.NOTIFICATION) - .withAssets(Assets.DOCUMENTATION, Assets.ICON) - .withLocales(Locales.EN) - .requiredStream(StreamRequirementsBuilder - .create() - .requiredProperty(EpRequirements.anyProperty()) - .build()) - .requiredTextParameter(Labels.withId(HOST_KEY)) - .requiredIntegerParameter(Labels.withId(PORT_KEY), 1234) - .requiredSecret(Labels.withId(PASSWORD_KEY)) - .build(); - } - - @Override - public FlinkDataSinkRuntime<${classNamePrefix}Parameters> getRuntime(DataSinkInvocation graph, DataSinkParameterExtractor extractor) { - - String host = extractor.singleValueParameter(HOST_KEY, String.class); - int port = extractor.singleValueParameter(PORT_KEY, Integer.class); - String password = extractor.secretValue(PASSWORD_KEY); - ${classNamePrefix}Parameters params = new ${classNamePrefix}Parameters(graph, host, port, password); - - return new ${classNamePrefix}Program(params, Config.INSTANCE.getFlinkDebug()); - } -} diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Parameters.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Parameters.java deleted file mode 100644 index ff464653b..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Parameters.java +++ /dev/null @@ -1,52 +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. - * - */ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - -package ${package}.pe.sink.${packageName}; - -import org.apache.streampipes.model.graph.DataSinkInvocation; -import org.apache.streampipes.wrapper.params.binding.EventSinkBindingParams; - -public class ${classNamePrefix}Parameters extends EventSinkBindingParams { - - private String host; - private int port; - private String password; - - public ${classNamePrefix}Parameters(DataSinkInvocation graph, String host, int port, String password) { - super(graph); - this.host = host; - this.port = port; - this.password = password; - } - - public String getHost() { - return host; - } - - public int getPort() { - return port; - } - - public String getPassword() { - return password; - } - -} diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Program.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Program.java deleted file mode 100644 index 3fedc44d7..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/pe/sink/__packageName__/__classNamePrefix__Program.java +++ /dev/null @@ -1,59 +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. - * - */ - -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -package ${package}.pe.sink.${packageName}; - -import ${package}.config.Config; - -import org.apache.flink.streaming.api.datastream.DataStream; -import org.apache.streampipes.model.runtime.Event; -import org.apache.streampipes.wrapper.flink.FlinkDataSinkRuntime; -import org.apache.streampipes.wrapper.flink.FlinkDeploymentConfig; - -import java.io.Serializable; - -public class ${classNamePrefix}Program extends FlinkDataSinkRuntime<${classNamePrefix}Parameters> -implements Serializable { - - private static final long serialVersionUID = 1L; - private final ${classNamePrefix}Parameters params; - - public ${classNamePrefix}Program(${classNamePrefix}Parameters params, boolean debug) { - super(params, debug); - this.params = params; - } - - @Override - protected FlinkDeploymentConfig getDeploymentConfig() { - return new FlinkDeploymentConfig(Config.JAR_FILE, - Config.INSTANCE.getFlinkHost(), Config.INSTANCE.getFlinkPort()); - } - - @Override - public void getSink( - DataStream<Event>... convertedStream) { - - // TODO add logic here - // params.getHost(); - // params.getPort(); - // params.getPassword(); - } -} diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/documentation.md b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/documentation.md deleted file mode 100644 index 2e5149706..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/documentation.md +++ /dev/null @@ -1,39 +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. - ~ - --> -#set( $double_pound = '##' ) - -${double_pound} ${classNamePrefix} - -<p align="center"> - <img src="icon.png" width="150px;" class="pe-image-documentation"/> -</p> - -*** - -${double_pound} Description -Describe your new data sink here! - -*** - -${double_pound} Required input -What are the input requirements of your data sink? - -*** - -${double_pound} Configuration -What are the configurations a user has to provide? \ No newline at end of file diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/icon.png b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/icon.png deleted file mode 100644 index 05d4b1dee..000000000 Binary files a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/icon.png and /dev/null differ diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/strings.en b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/strings.en deleted file mode 100644 index 054d02f5e..000000000 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/resources/__package__.pe.sink.__packageName__/strings.en +++ /dev/null @@ -1,11 +0,0 @@ -${package}.pe.sink.${packageName}.title=${classNamePrefix} -${package}.pe.sink.${packageName}.description=Description of data sink - -host-key.title=Host -host-key.description=IP/DNS of service - -port-key.title=Port -port-key.description=Port of service - -password-key.title=Password -password-key.description=Password to connect \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6740b4542..e29472afe 100644 --- a/pom.xml +++ b/pom.xml @@ -1381,8 +1381,6 @@ <modules> <module>archetypes/streampipes-archetype-extensions-jvm</module> - <module>archetypes/streampipes-archetype-pe-sinks-flink</module> - <module>archetypes/streampipes-archetype-pe-processors-flink</module> <module>streampipes-service-core</module> <module>streampipes-client</module> <module>streampipes-commons</module> @@ -1752,11 +1750,7 @@ <exclude>streampipes-code-generation/src/test/resources/expected_web_xml</exclude> <!-- Archetype resources should not have ASF license header --> - <exclude>archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/**</exclude> - <exclude>archetypes/streampipes-archetype-pe-processors-jvm/src/main/resources/**</exclude> - <exclude>archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/**</exclude> - <exclude>archetypes/streampipes-archetype-pe-sinks-jvm/src/main/resources/**</exclude> - <exclude>archetypes/streampipes-archetype-pe-sources/src/main/resources/**</exclude> + <exclude>archetypes/streampipes-archetype-extensions-jvm/src/main/resources/**</exclude> <!-- External files --> <exclude>
