From 509d263eeb26f9e4cb164b2b9ffd54f0b588d5cd Mon Sep 17 00:00:00 2001 From: chaochaoc <13051077615@126.com> Date: Tue, 28 May 2024 14:56:27 +0800 Subject: chore: create app --- pom.xml | 484 +++++++++++++++++++++ .../flink/easy/application/Applications.java | 19 + src/main/resources/log4j2.properties | 32 ++ 3 files changed, 535 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/com/geedgenetworks/flink/easy/application/Applications.java create mode 100644 src/main/resources/log4j2.properties diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..72b75b7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,484 @@ + + + 4.0.0 + + com.geedgenetworks.flink.easy + easy-application + 1.0-SNAPSHOT + + + UTF-8 + 11 + ${java.version} + ${java.version} + 2.12.10 + 2.12 + 1.13.6 + + 1.2-beta2 + + 1.7.32 + 2.17.1 + 5.8.0 + + + + + + com.github.spotbugs + spotbugs-annotations + 4.4.2 + + + + + org.slf4j + slf4j-api + + + org.apache.logging.log4j + log4j-slf4j-impl + + + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + + + + + com.geedgenetworks.flink + easy-stream-common + + + com.geedgenetworks.flink + easy-stream-core + + + com.geedgenetworks.flink + easy-stream-flink-shim + + + + + com.geedgenetworks.flink + easy-stream-grouped-exec-pipeline + + + com.geedgenetworks.flink + easy-stream-filter-pipeline + + + com.geedgenetworks.flink + easy-stream-console-pipeline + + + com.geedgenetworks.flink + easy-stream-join-pipeline + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-multi-rule-pipeline + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-select-pipeline + ${easy.stream.version} + + + + + com.geedgenetworks.flink + easy-stream-kafka-connector + + + com.geedgenetworks.flink + easy-stream-socket-connector + + + com.geedgenetworks.flink + easy-stream-text-connector + ${easy.stream.version} + + + + + com.geedgenetworks.flink + easy-stream-json-format + + + com.geedgenetworks.flink + easy-stream-csv-format + + + + + org.apache.flink + flink-clients_${scala.binary.version} + + + org.apache.flink + flink-core + + + org.apache.flink + flink-streaming-java_${scala.binary.version} + + + org.apache.flink + flink-runtime_${scala.binary.version} + + + org.apache.flink + flink-runtime-web_${scala.binary.version} + + + org.apache.flink + flink-table-common + + + org.apache.flink + flink-table-api-java-bridge_${scala.binary.version} + + + org.apache.flink + flink-table-planner-blink_${scala.binary.version} + + + org.apache.flink + flink-table-runtime-blink_${scala.binary.version} + + + org.apache.flink + flink-cep_${scala.binary.version} + + + + + org.junit.jupiter + junit-jupiter-api + test + + + + + + + + com.github.spotbugs + spotbugs-annotations + 4.4.2 + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + runtime + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + runtime + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + runtime + + + + org.apache.logging.log4j + log4j-1.2-api + ${log4j.version} + runtime + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + + + com.geedgenetworks.flink + easy-stream-common + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-core + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-grouped-exec-pipeline + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-filter-pipeline + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-console-pipeline + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-kafka-connector + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-socket-connector + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-json-format + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-csv-format + ${easy.stream.version} + + + com.geedgenetworks.flink + easy-stream-flink-shim + ${easy.stream.version} + + + + + org.apache.flink + flink-core + ${flink.version} + provided + + + org.apache.flink + flink-streaming-java_${scala.binary.version} + ${flink.version} + provided + + + org.apache.flink + flink-clients_${scala.binary.version} + ${flink.version} + provided + + + org.apache.flink + flink-runtime_${scala.binary.version} + ${flink.version} + runtime + + + org.apache.flink + flink-runtime-web_${scala.binary.version} + ${flink.version} + runtime + + + + org.apache.flink + flink-connector-kafka_${scala.binary.version} + ${flink.version} + + + org.apache.flink + flink-json + ${flink.version} + + + + org.apache.flink + flink-table-common + ${flink.version} + provided + + + org.apache.flink + flink-table-api-java-bridge_${scala.binary.version} + ${flink.version} + provided + + + org.apache.flink + flink-table-runtime-blink_${scala.binary.version} + ${flink.version} + provided + + + org.apache.flink + flink-table-planner-blink_${scala.binary.version} + ${flink.version} + provided + + + org.apache.flink + flink-cep_${scala.binary.version} + ${flink.version} + provided + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.2 + + ${basedir}/dev/suppressions.xml + true + ${basedir}/dev/checkstyle.xml + true + true + + + + com.puppycrawl.tools + checkstyle + 8.40 + + + + + java-style-check + compile + + check + + + src/main/java + + + + java-test-style-check + test-compile + + check + + + src/test/java + true + + + + + + com.github.spotbugs + spotbugs-maven-plugin + 4.4.2.2 + + true + + Low + default + ${project.build.directory}/spotbugs + ${basedir}/dev/spotbugs-exclude.xml + true + + + + findbugs-main + compile + + check + + + + findbugs-test + test-compile + + check + + + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + + default-shade + package + + shade + + + false + ${project.artifactId}-${project.version} + + + org.apache.flink:force-shading + com.google.code.findbugs:jsr305 + org.slf4j:* + org.apache.logging.log4j:* + org.mockito:mockito-core + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + + + \ No newline at end of file diff --git a/src/main/java/com/geedgenetworks/flink/easy/application/Applications.java b/src/main/java/com/geedgenetworks/flink/easy/application/Applications.java new file mode 100644 index 0000000..4deb56f --- /dev/null +++ b/src/main/java/com/geedgenetworks/flink/easy/application/Applications.java @@ -0,0 +1,19 @@ +package com.geedgenetworks.flink.easy.application; + +import com.geedgenetworks.flink.easy.core.Runners; + +import java.net.URL; + +public enum Applications { + ; + + public static void run(final String name) throws Exception { + final String path = String.format("/jobs/%s.yml", name); + final URL resource = JobApplication.class.getResource(path); + if (resource == null) { + throw new IllegalArgumentException( + String.format("Not found job '%s' in path [%s].", name, path)); + } + Runners.run(resource.getPath()); + } +} diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties new file mode 100644 index 0000000..d2455b2 --- /dev/null +++ b/src/main/resources/log4j2.properties @@ -0,0 +1,32 @@ +################################################################################ +# 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. +################################################################################ + +rootLogger.level = ERROR +rootLogger.appenderRefs = console +rootLogger.appenderRef.console.ref = ConsoleAppender + +appender.console.name = ConsoleAppender +appender.console.type = CONSOLE +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-20c %x - %m%n + +logger.easy.name = com.geedgenetworks.flink.easy +logger.easy.level = DEBUG +logger.easy.appenderRefs = console +logger.easy.appenderRef.console.ref = ConsoleAppender +logger.easy.additivity = false -- cgit v1.2.3