You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/19 11:19:49 UTC
[GitHub] sijie closed pull request #3212: fix up pulsar-flink and
flink-consumer-source can make the example run normally
sijie closed pull request #3212: fix up pulsar-flink and flink-consumer-source can make the example run normally
URL: https://github.com/apache/pulsar/pull/3212
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/.gitignore b/.gitignore
index d16fa61e92..bd3c93e795 100644
--- a/.gitignore
+++ b/.gitignore
@@ -79,5 +79,6 @@ docker.debug-info
**/website/i18n/*
**/website/translated_docs*
+# Avro
examples/flink-consumer-source/src/main/java/org/apache/flink/batch/connectors/pulsar/avro/generated
pulsar-flink/src/test/java/org/apache/flink/batch/connectors/pulsar/avro/generated
diff --git a/examples/flink-consumer-source/pom.xml b/examples/flink-consumer-source/pom.xml
index 0cea049616..3c08697072 100644
--- a/examples/flink-consumer-source/pom.xml
+++ b/examples/flink-consumer-source/pom.xml
@@ -19,7 +19,7 @@
-->
<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">
+ 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.pulsar.examples</groupId>
@@ -31,22 +31,39 @@
<artifactId>flink-consumer-source</artifactId>
<name>Pulsar Examples :: Flink Consumer Source</name>
+ <properties>
+ <log4j2.version>2.10.0</log4j2.version>
+ </properties>
+
<dependencies>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.flink</groupId>
- <artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
+ <artifactId>flink-scala_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-flink</artifactId>
<version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.pulsar</groupId>
- <artifactId>pulsar-client-original</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
diff --git a/examples/flink-consumer-source/src/main/resources/log4j2.xml b/examples/flink-consumer-source/src/main/resources/log4j2.xml
new file mode 100644
index 0000000000..2fdc2d05ae
--- /dev/null
+++ b/examples/flink-consumer-source/src/main/resources/log4j2.xml
@@ -0,0 +1,37 @@
+<?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.
+
+-->
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t:%C@%L] %-5level %logger{36} - %msg%n" />
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="warn">
+ <AppenderRef ref="Console" />
+ </Root>
+ <Logger name="org.eclipse.jetty" level="info"/>
+ <Logger name="org.apache.pulsar" level="info"/>
+ <Logger name="org.apache.bookkeeper" level="info"/>
+ <Logger name="org.apache.kafka" level="info"/>
+ </Loggers>
+</Configuration>
diff --git a/pulsar-flink/pom.xml b/pulsar-flink/pom.xml
index f32ca81f5a..c891005c29 100644
--- a/pulsar-flink/pom.xml
+++ b/pulsar-flink/pom.xml
@@ -19,8 +19,8 @@
-->
<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- 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"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -34,12 +34,10 @@
<name>Pulsar Flink Connectors</name>
<dependencies>
-
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
- <scope>provided</scope>
</dependency>
<dependency>
@@ -51,12 +49,6 @@
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.apache.flink</groupId>
- <artifactId>flink-scala_${scala.binary.version}</artifactId>
- <version>${flink.version}</version>
- </dependency>
-
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-avro</artifactId>
@@ -84,14 +76,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.flink</groupId>
- <artifactId>flink-tests_${scala.binary.version}</artifactId>
- <version>${flink.version}</version>
- <scope>test</scope>
- <type>test-jar</type>
- </dependency>
-
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
@@ -113,9 +97,6 @@
<version>3.20.0-GA</version>
<scope>test</scope>
</dependency>
-
-
-
</dependencies>
<build>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services