Skip to content

Commit

Permalink
Make Pulsar-SQL module to be a child of Pulsar main project (apache#1…
Browse files Browse the repository at this point in the history
…0728)

### Motivation

we want to use a different version sometimes, it's laborious to change `pom.xml`, and it's better to support set any version for pulsar by maven command.

### Modifications

change the parent dependency for pulsar-presto-connector, and the version could be affected by 'mvn versions:set -DnewVersion=' command.
  • Loading branch information
dockerzhang authored Jun 3, 2021
1 parent 301a764 commit 6247c57
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 63 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ flexible messaging model and an intuitive client API.</description>
<rabbitmq-client.version>5.1.1</rabbitmq-client.version>
<aws-sdk.version>1.11.774</aws-sdk.version>
<avro.version>1.10.2</avro.version>
<joda.version>2.10.1</joda.version>
<joda.version>2.10.5</joda.version>
<jclouds.version>2.3.0</jclouds.version>
<sqlite-jdbc.version>3.8.11.2</sqlite-jdbc.version>
<mysql-jdbc.version>8.0.11</mysql-jdbc.version>
Expand Down
46 changes: 17 additions & 29 deletions pulsar-sql/presto-distribution/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,23 @@ The Apache Software License, Version 2.0
- netty-transport-native-unix-common-4.1.63.Final-linux-x86_64.jar
* Joda Time
- joda-time-2.10.5.jar
- joda-time-2.10.1.jar
* Jetty
- http2-client-9.4.27.v20200227.jar
- http2-common-9.4.27.v20200227.jar
- http2-hpack-9.4.27.v20200227.jar
- http2-http-client-transport-9.4.27.v20200227.jar
- jetty-alpn-java-client-9.4.27.v20200227.jar
- http2-server-9.4.27.v20200227.jar
- jetty-alpn-client-9.4.27.v20200227.jar
- jetty-client-9.4.27.v20200227.jar
- jetty-http-9.4.27.v20200227.jar
- jetty-io-9.4.27.v20200227.jar
- jetty-jmx-9.4.27.v20200227.jar
- jetty-security-9.4.27.v20200227.jar
- jetty-server-9.4.27.v20200227.jar
- jetty-servlet-9.4.27.v20200227.jar
- jetty-util-9.4.27.v20200227.jar
* Jetty
- http2-client-9.4.39.v20210325.jar
- http2-common-9.4.39.v20210325.jar
- http2-hpack-9.4.39.v20210325.jar
- http2-http-client-transport-9.4.39.v20210325.jar
- jetty-alpn-client-9.4.39.v20210325.jar
- http2-server-9.4.39.v20210325.jar
- jetty-alpn-java-client-9.4.39.v20210325.jar
- jetty-client-9.4.39.v20210325.jar
- jetty-http-9.4.39.v20210325.jar
- jetty-io-9.4.39.v20210325.jar
- jetty-jmx-9.4.39.v20210325.jar
- jetty-security-9.4.39.v20210325.jar
- jetty-server-9.4.39.v20210325.jar
- jetty-servlet-9.4.39.v20210325.jar
- jetty-util-9.4.39.v20210325.jar
- jetty-util-ajax-9.4.39.v20210325.jar
* Apache BVal
- bval-jsr-2.0.0.jar
* Bytecode
Expand Down Expand Up @@ -364,7 +364,6 @@ The Apache Software License, Version 2.0
* Caffeine
- caffeine-2.6.2.jar
* Javax
- javax.inject-1.jar
- javax.inject-1.jar
- javax.servlet-api-3.1.0.jar
- javax.servlet-api-4.0.1.jar
Expand Down Expand Up @@ -441,17 +440,8 @@ The Apache Software License, Version 2.0
- jackson-module-parameter-names-2.12.3.jar
* Java Assist
- javassist-3.25.0-GA.jar
* Jetty
- jetty-http-9.4.39.v20210325.jar
- jetty-io-9.4.39.v20210325.jar
- jetty-security-9.4.39.v20210325.jar
- jetty-server-9.4.39.v20210325.jar
- jetty-servlet-9.4.39.v20210325.jar
- jetty-util-9.4.39.v20210325.jar
- jetty-util-ajax-9.4.39.v20210325.jar
* Java Native Access
- jna-4.2.0.jar
- jna-5.3.1.jar
* Java Object Layout: Core
- jol-core-0.2.jar
* Yahoo Datasketches
Expand Down Expand Up @@ -495,7 +485,6 @@ MIT License
- slf4j-jdk14-1.7.30.jar
* JCL 1.2 Implemented Over SLF4J
- jcl-over-slf4j-1.7.25.jar
- jcl-over-slf4j-1.7.29.jar
* JUL to SLF4J Bridge
- jul-to-slf4j-1.7.25.jar
* Checker Qual
Expand All @@ -507,7 +496,6 @@ CDDL - 1.0

CDDL-1.1 -- licenses/LICENSE-CDDL-1.1.txt
* Java Annotations API
- javax.annotation-api-1.3.2.jar
- javax.activation-1.2.0.jar
- javax.activation-api-1.2.0.jar
* HK2 - Dependency Injection Kernel
Expand Down
83 changes: 50 additions & 33 deletions pulsar-sql/presto-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,22 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>23</version>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-sql</artifactId>
<version>2.8.0-SNAPSHOT</version>
</parent>

<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-presto-distribution</artifactId>
<name>Pulsar SQL :: Pulsar Presto Distribution</name>
<version>2.8.0-SNAPSHOT</version>

<properties>
<skipBuildDistribution>false</skipBuildDistribution>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jersey.version>2.34</jersey.version>
<presto.version>332</presto.version>
<airlift.version>0.170</airlift.version>
<objenesis.version>2.6</objenesis.version>
<objectsize.version>0.0.12</objectsize.version>
<guice.version>4.2.0</guice.version>
<!-- Launcher properties -->
<main-class>io.prestosql.server.PrestoServer</main-class>
<process-name>${project.artifactId}</process-name>
<jackson.version>2.12.3</jackson.version>
<!--fix Security Vulnerabilities-->
<!--https://www.cvedetails.com/vulnerability-list/vendor_id-15866/product_id-42991/Fasterxml-Jackson-databind.html-->
Expand All @@ -54,6 +47,7 @@
<guava.version>30.1-jre</guava.version>
<asynchttpclient.version>2.12.1</asynchttpclient.version>
<errorprone.version>2.5.1</errorprone.version>
<javax.servlet-api>4.0.1</javax.servlet-api>
</properties>

<dependencies>
Expand Down Expand Up @@ -263,6 +257,51 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jmx</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -279,7 +318,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<attach>true</attach>
Expand All @@ -300,28 +339,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>filter-src</id>
<goals>
<goal>filter-sources</goal>
</goals>
<phase>package</phase>
<configuration>
<sourceDirectory>${project.build.directory}/${project.artifactId}/bin/</sourceDirectory>
<outputDirectory>${project.build.directory}/${project.artifactId}/bin/</outputDirectory>
<overwrite>true</overwrite>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions pulsar-sql/presto-distribution/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<outputDirectory>.</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>${basedir}/src/main/resources/launcher.properties</source>
<destName>launcher.properties</destName>
<outputDirectory>bin/</outputDirectory>
<fileMode>644</fileMode>
</file>
</files>
<fileSets>
<fileSet>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# 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.
#

main-class=io.prestosql.server.PrestoServer
process-name=pulsar-presto-distribution
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public PrestoWorkerContainer(String clusterName, String hostname) {

@Override
protected void afterStart() {
DockerUtils.runCommandAsyncWithLogging(this.dockerClient, this.getContainerId(),
"tail", "-f", "/pulsar/lib/presto/var/log/launcher.log");
DockerUtils.runCommandAsyncWithLogging(this.dockerClient, this.getContainerId(),
"tail", "-f", "/var/log/pulsar/presto_worker.log");
DockerUtils.runCommandAsyncWithLogging(this.dockerClient, this.getContainerId(),
Expand Down

0 comments on commit 6247c57

Please sign in to comment.