You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/11/11 17:10:00 UTC

[pulsar-adapters] branch master updated: Fix checkstyle issue on pulsar-spark module (#2)

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

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-adapters.git


The following commit(s) were added to refs/heads/master by this push:
     new 789b152  Fix checkstyle issue on pulsar-spark module (#2)
789b152 is described below

commit 789b152b0bbeec5682c7d3ab5791f149352d6d35
Author: Sijie Guo <si...@apache.org>
AuthorDate: Wed Nov 11 09:57:58 2020 -0700

    Fix checkstyle issue on pulsar-spark module (#2)
    
    *Motivation*
    
    Enable checkstyle plugin on pulsar-spark module and fix all the issues.
---
 .github/workflows/unit-test.yaml                   | 19 +++++++++++--------
 pom.xml                                            |  2 ++
 pulsar-client-kafka-compat/pom.xml                 |  2 +-
 pulsar-flink/pom.xml                               |  2 +-
 pulsar-log4j2-appender/pom.xml                     |  2 +-
 pulsar-spark/pom.xml                               |  4 +---
 .../pulsar/spark/SparkStreamingPulsarReceiver.java |  3 +++
 .../java/org/apache/pulsar/spark/package-info.java | 22 ++++++++++++++++++++++
 pulsar-storm/pom.xml                               |  2 +-
 9 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml
index 0ac2b5a..5927731 100644
--- a/.github/workflows/unit-test.yaml
+++ b/.github/workflows/unit-test.yaml
@@ -43,6 +43,13 @@ jobs:
         with:
           access_token: ${{ github.token }}
 
+      - name: checkout
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 25
+          ref: ${{ github.event.pull_request.head.sha }}
+          path: adapters
+
       - name: Clone Pulsar
         uses: actions/checkout@v2
         with:
@@ -50,12 +57,6 @@ jobs:
           repository: apache/pulsar
           ref: master
           path: pulsar
-        
-      - name: checkout
-        uses: actions/checkout@v2
-        with:
-          fetch-depth: 25
-          ref: ${{ github.event.pull_request.head.sha }}
 
       - name: Cache local Maven repository
         uses: actions/cache@v2
@@ -78,15 +79,17 @@ jobs:
       - name: Build pulsar
         run: |
           cd pulsar
-          mvn -q -B -DskipTests -am -pl pulsar-broker install
+          mvn -B -DskipTests -Dcheckstyle.skip install
 
       - name: Build pulsar adapters
         run: |
+          cd adapters
           mvn clean license:check install
 
       - name: package surefire artifacts
         if: failure()
         run: |
+          cd adapters
           rm -rf artifacts
           mkdir artifacts
           find . -type d -name "*surefire*" -exec cp --parents -R {} artifacts/ \;
@@ -97,4 +100,4 @@ jobs:
         if: failure()
         with:
           name: surefire-artifacts
-          path: artifacts.zip
+          path: adapters/artifacts.zip
diff --git a/pom.xml b/pom.xml
index 2ed7599..3cb191a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,6 +76,8 @@
   </issueManagement>
 
   <properties>
+    <flink.version>1.6.0</flink.version>
+    <storm.version>2.0.0</storm.version>
   </properties>
 
   <modules>
diff --git a/pulsar-client-kafka-compat/pom.xml b/pulsar-client-kafka-compat/pom.xml
index 2732397..09899fa 100644
--- a/pulsar-client-kafka-compat/pom.xml
+++ b/pulsar-client-kafka-compat/pom.xml
@@ -26,7 +26,7 @@
 
   <parent>
     <groupId>org.apache.pulsar</groupId>
-    <artifactId>pulsar</artifactId>
+    <artifactId>pulsar-adapters</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
diff --git a/pulsar-flink/pom.xml b/pulsar-flink/pom.xml
index 7d8a688..3a7514c 100644
--- a/pulsar-flink/pom.xml
+++ b/pulsar-flink/pom.xml
@@ -25,7 +25,7 @@
 
   <parent>
     <groupId>org.apache.pulsar</groupId>
-    <artifactId>pulsar</artifactId>
+    <artifactId>pulsar-adapters</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
diff --git a/pulsar-log4j2-appender/pom.xml b/pulsar-log4j2-appender/pom.xml
index 7b08f2f..2212282 100644
--- a/pulsar-log4j2-appender/pom.xml
+++ b/pulsar-log4j2-appender/pom.xml
@@ -23,7 +23,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.pulsar</groupId>
-    <artifactId>pulsar</artifactId>
+    <artifactId>pulsar-adapters</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
diff --git a/pulsar-spark/pom.xml b/pulsar-spark/pom.xml
index 898b460..4a580bb 100644
--- a/pulsar-spark/pom.xml
+++ b/pulsar-spark/pom.xml
@@ -25,7 +25,7 @@
 
   <parent>
     <groupId>org.apache.pulsar</groupId>
-    <artifactId>pulsar</artifactId>
+    <artifactId>pulsar-adapters</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
@@ -101,7 +101,6 @@
           </execution>
         </executions>
       </plugin>
-      <!--
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
@@ -120,7 +119,6 @@
           </execution>
         </executions>
       </plugin>
-      -->
     </plugins>
   </build>
 </project>
diff --git a/pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java b/pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java
index 833d42e..f9e7d6c 100644
--- a/pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java
+++ b/pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java
@@ -35,6 +35,9 @@ import org.apache.spark.streaming.receiver.Receiver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * A spark streaming receiver for pulsar.
+ */
 public class SparkStreamingPulsarReceiver extends Receiver<byte[]> {
 
     private static final Logger LOG = LoggerFactory.getLogger(SparkStreamingPulsarReceiver.class);
diff --git a/pulsar-spark/src/main/java/org/apache/pulsar/spark/package-info.java b/pulsar-spark/src/main/java/org/apache/pulsar/spark/package-info.java
new file mode 100644
index 0000000..a8f04d7
--- /dev/null
+++ b/pulsar-spark/src/main/java/org/apache/pulsar/spark/package-info.java
@@ -0,0 +1,22 @@
+/**
+ * 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.
+ */
+/**
+ * Spark streaming integrations for Pulsar.
+ */
+package org.apache.pulsar.spark;
\ No newline at end of file
diff --git a/pulsar-storm/pom.xml b/pulsar-storm/pom.xml
index 0618e91..a45658c 100644
--- a/pulsar-storm/pom.xml
+++ b/pulsar-storm/pom.xml
@@ -25,7 +25,7 @@
 
   <parent>
     <groupId>org.apache.pulsar</groupId>
-    <artifactId>pulsar</artifactId>
+    <artifactId>pulsar-adapters</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>