Skip to content

Commit c157f0d

Browse files
authored
[cleanup]Remove Trino/PrestoDB Pulsar plugin from main repo (#21795)
1 parent 840f87c commit c157f0d

File tree

123 files changed

+26
-22205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+26
-22205
lines changed

.github/workflows/ci-owasp-dependency-check.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ jobs:
8484
- name: run OWASP Dependency Check for distribution/server (-DfailBuildOnAnyVulnerability=true)
8585
run: mvn -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -pl distribution/server -DfailBuildOnAnyVulnerability=true
8686

87-
- name: run OWASP Dependency Check for distribution/offloaders, distribution/io and pulsar-sql/presto-distribution
88-
run: mvn -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -pl distribution/offloaders,distribution/io,pulsar-sql/presto-distribution
89-
9087
- name: Upload OWASP Dependency Check reports
9188
uses: actions/upload-artifact@v3
9289
if: always()
@@ -96,4 +93,3 @@ jobs:
9693
distribution/server/target/dependency-check-report.html
9794
distribution/offloaders/target/dependency-check-report.html
9895
distribution/io/target/dependency-check-report.html
99-
pulsar-sql/presto-distribution/target/dependency-check-report.html

.github/workflows/ci-semantic-pull-request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
# io -> Pulsar Connectors
5454
# offload -> tiered storage
5555
# sec -> security
56-
# sql -> Pulsar Trino Plugin
5756
# txn -> transaction
5857
# ws -> websocket
5958
# ml -> managed ledger
@@ -79,7 +78,6 @@ jobs:
7978
schema
8079
sec
8180
site
82-
sql
8381
storage
8482
test
8583
txn

.github/workflows/pulsar-ci.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ jobs:
871871
- name: Build latest-version-image docker image
872872
run: |
873873
# build docker image
874-
# include building of Pulsar SQL, Connectors, Offloaders and server distros
875-
mvn -B -am -pl pulsar-sql/presto-distribution,distribution/io,distribution/offloaders,distribution/server,distribution/shell,tests/docker-images/latest-version-image install \
874+
# include building of Connectors, Offloaders and server distros
875+
mvn -B -am -pl distribution/io,distribution/offloaders,distribution/server,distribution/shell,tests/docker-images/latest-version-image install \
876876
-DUBUNTU_MIRROR="${UBUNTU_MIRROR}" -DUBUNTU_SECURITY_MIRROR="${UBUNTU_SECURITY_MIRROR}" -DIMAGE_JDK_MAJOR_VERSION="${IMAGE_JDK_MAJOR_VERSION}" \
877877
-Pmain,docker -Dmaven.test.skip=true -Ddocker.squash=true \
878878
-Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true -Drat.skip=true
@@ -954,9 +954,6 @@ jobs:
954954
group: PULSAR_IO
955955
clean_disk: true
956956

957-
- name: Sql
958-
group: SQL
959-
960957
steps:
961958
- name: checkout
962959
uses: actions/checkout@v3
@@ -1381,11 +1378,11 @@ jobs:
13811378
run: |
13821379
cd $HOME
13831380
$GITHUB_WORKSPACE/build/pulsar_ci_tool.sh restore_tar_from_github_actions_artifacts pulsar-maven-repository-binaries
1384-
# Projects dependent on flume, hdfs, hbase, and presto currently excluded from the scan.
1381+
# Projects dependent on flume, hdfs, and hbase currently excluded from the scan.
13851382
- name: trigger dependency check
13861383
run: |
13871384
mvn -B -ntp verify -PskipDocker,skip-all,owasp-dependency-check -Dcheckstyle.skip=true -DskipTests \
1388-
-pl '!pulsar-sql,!distribution/server,!distribution/io,!distribution/offloaders,!pulsar-sql/presto-distribution,!tiered-storage/file-system,!pulsar-io/flume,!pulsar-io/hbase,!pulsar-io/hdfs2,!pulsar-io/hdfs3,!pulsar-io/docs,!pulsar-io/jdbc/openmldb'
1385+
-pl '!distribution/server,!distribution/io,!distribution/offloaders,!tiered-storage/file-system,!pulsar-io/flume,!pulsar-io/hbase,!pulsar-io/hdfs2,!pulsar-io/hdfs3,!pulsar-io/docs,!pulsar-io/jdbc/openmldb'
13891386
13901387
- name: Upload report
13911388
uses: actions/upload-artifact@v3

.idea/vcs.xml

Lines changed: 14 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/pulsar

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ DEFAULT_PY_INSTANCE_FILE=$PULSAR_HOME/instances/python-instance/python_instance_
4444
PY_INSTANCE_FILE=${PULSAR_PY_INSTANCE_FILE:-"${DEFAULT_PY_INSTANCE_FILE}"}
4545
DEFAULT_FUNCTIONS_EXTRA_DEPS_DIR=$PULSAR_HOME/instances/deps
4646
FUNCTIONS_EXTRA_DEPS_DIR=${PULSAR_FUNCTIONS_EXTRA_DEPS_DIR:-"${DEFAULT_FUNCTIONS_EXTRA_DEPS_DIR}"}
47-
SQL_HOME=$PULSAR_HOME/pulsar-sql
48-
TRINO_HOME=${PULSAR_HOME}/trino
49-
DEFAULT_PULSAR_TRINO_CONF=${TRINO_HOME}/conf
5047

5148
pulsar_help() {
5249
cat <<EOF
@@ -60,8 +57,6 @@ where command is one of:
6057
proxy Run a pulsar proxy
6158
websocket Run a web socket proxy server
6259
functions-worker Run a functions worker server
63-
sql-worker Run a sql worker server
64-
sql Run sql CLI
6560
standalone Run a broker server with local bookies and local zookeeper
6661
autorecovery Run an autorecovery service
6762
@@ -90,7 +85,6 @@ Environment variables:
9085
PULSAR_PROXY_CONF Configuration file for Pulsar proxy (default: $DEFAULT_PROXY_CONF)
9186
PULSAR_WORKER_CONF Configuration file for functions worker (default: $DEFAULT_WORKER_CONF)
9287
PULSAR_STANDALONE_CONF Configuration file for standalone (default: $DEFAULT_STANDALONE_CONF)
93-
PULSAR_TRINO_CONF Configuration directory for Pulsar SQL (default: $DEFAULT_PULSAR_TRINO_CONF)
9488
PULSAR_EXTRA_OPTS Extra options to be passed to the jvm
9589
PULSAR_EXTRA_CLASSPATH Add extra paths to the pulsar classpath
9690
PULSAR_PID_DIR Folder where the pulsar server PID file should be stored
@@ -179,20 +173,6 @@ if [ ! -f "${PY_INSTANCE_FILE}" ]; then
179173
PY_INSTANCE_FILE=${BUILT_PY_INSTANCE_FILE}
180174
fi
181175

182-
# find pulsar sql trino distribution location
183-
check_trino_libraries() {
184-
if [ ! -d "${TRINO_HOME}" ]; then
185-
BUILT_TRINO_HOME="${SQL_HOME}/presto-distribution/target/pulsar-presto-distribution"
186-
if [ ! -d "${BUILT_TRINO_HOME}" ]; then
187-
echo "\nCouldn't find trino distribution.";
188-
echo "Make sure you've run 'mvn package'\n";
189-
exit 1;
190-
fi
191-
TRINO_HOME=${BUILT_TRINO_HOME}
192-
PULSAR_TRINO_CONF=${BUILT_TRINO_HOME}/conf
193-
fi
194-
}
195-
196176
add_maven_deps_to_classpath() {
197177
MVN="mvn"
198178
if [ "$MAVEN_HOME" != "" ]; then
@@ -259,21 +239,6 @@ if [ -z "$PULSAR_LOG_CONF" ]; then
259239
PULSAR_LOG_CONF=$DEFAULT_LOG_CONF
260240
fi
261241

262-
if [ -z "$PULSAR_TRINO_CONF" ]; then
263-
# TODO: As PIP-200 accepted, this compatibility is not promised. Refactor when we drop this b/w compatibility.
264-
if [ -z "$PULSAR_PRESTO_CONF" ]; then
265-
PULSAR_TRINO_CONF=$DEFAULT_PULSAR_TRINO_CONF
266-
else
267-
PULSAR_TRINO_CONF=$PULSAR_PRESTO_CONF
268-
fi
269-
if [ ! -d "${PULSAR_TRINO_CONF}" ]; then
270-
FALLBACK_PULSAR_PRESTO_CONF=${PULSAR_HOME}/conf/presto
271-
if [ -d "${FALLBACK_PULSAR_PRESTO_CONF}" ]; then
272-
PULSAR_TRINO_CONF=$FALLBACK_PULSAR_PRESTO_CONF
273-
fi
274-
fi
275-
fi
276-
277242
if [ -z "$FUNCTIONS_LOG_CONF" ]; then
278243
FUNCTIONS_LOG_CONF=$DEFAULT_FUNCTIONS_LOG_CONF
279244
fi
@@ -410,12 +375,6 @@ elif [ $COMMAND == "broker-tool" ]; then
410375
exec $JAVA $OPTS org.apache.pulsar.broker.tools.BrokerTool $@
411376
elif [ $COMMAND == "compact-topic" ]; then
412377
exec $JAVA $OPTS org.apache.pulsar.compaction.CompactorTool --broker-conf $PULSAR_BROKER_CONF $@
413-
elif [ $COMMAND == "sql" ]; then
414-
check_trino_libraries
415-
exec $JAVA -cp "${TRINO_HOME}/lib/*" io.trino.cli.Trino --server localhost:8081 "${@}"
416-
elif [ $COMMAND == "sql-worker" ]; then
417-
check_trino_libraries
418-
exec python3 ${TRINO_HOME}/bin/launcher.py --etc-dir ${PULSAR_TRINO_CONF} "${@}"
419378
elif [ $COMMAND == "tokens" ]; then
420379
exec $JAVA $OPTS org.apache.pulsar.utils.auth.tokens.TokensCliUtils $@
421380
elif [ $COMMAND == "version" ]; then

build/run_unit_group.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function test_group_proxy() {
160160
function test_group_other() {
161161
mvn_test --clean --install \
162162
-pl '!org.apache.pulsar:distribution,!org.apache.pulsar:pulsar-offloader-distribution,!org.apache.pulsar:pulsar-server-distribution,!org.apache.pulsar:pulsar-io-distribution,!org.apache.pulsar:pulsar-all-docker-image' \
163-
-PskipTestsForUnitGroupOther -DdisableIoMainProfile=true -DdisableSqlMainProfile=true -DskipIntegrationTests \
163+
-PskipTestsForUnitGroupOther -DdisableIoMainProfile=true -DskipIntegrationTests \
164164
-Dexclude='**/ManagedLedgerTest.java,
165165
**/OffloadersCacheTest.java
166166
**/PrimitiveSchemaTest.java,
@@ -175,7 +175,7 @@ function test_group_other() {
175175

176176
echo "::endgroup::"
177177
local modules_with_quarantined_tests=$(git grep -l '@Test.*"quarantine"' | grep '/src/test/java/' | \
178-
awk -F '/src/test/java/' '{ print $1 }' | grep -v -E 'pulsar-broker|pulsar-proxy|pulsar-io|pulsar-sql|pulsar-client' | sort | uniq | \
178+
awk -F '/src/test/java/' '{ print $1 }' | grep -v -E 'pulsar-broker|pulsar-proxy|pulsar-io|pulsar-client' | sort | uniq | \
179179
perl -0777 -p -e 's/\n(\S)/,$1/g')
180180
if [ -n "${modules_with_quarantined_tests}" ]; then
181181
echo "::group::Running quarantined tests outside of pulsar-broker & pulsar-proxy (if any)"
@@ -190,10 +190,6 @@ function test_group_pulsar_io() {
190190
echo "::group::Running pulsar-io tests"
191191
mvn_test --install -Ppulsar-io-tests,-main
192192
echo "::endgroup::"
193-
194-
echo "::group::Running pulsar-sql tests"
195-
mvn_test --install -Ppulsar-sql-tests,-main -DtestForkCount=1
196-
echo "::endgroup::"
197193
}
198194

199195
function test_group_pulsar_io_elastic() {

distribution/server/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -378,22 +378,6 @@
378378
<activation>
379379
<activeByDefault>true</activeByDefault>
380380
</activation>
381-
<!-- depend on pulsar-presto-distribution by default, unless core-modules profile is active -->
382-
<dependencies>
383-
<dependency>
384-
<groupId>${project.groupId}</groupId>
385-
<artifactId>pulsar-presto-distribution</artifactId>
386-
<version>${project.version}</version>
387-
<type>tar.gz</type>
388-
<scope>provided</scope>
389-
<exclusions>
390-
<exclusion>
391-
<groupId>*</groupId>
392-
<artifactId>*</artifactId>
393-
</exclusion>
394-
</exclusions>
395-
</dependency>
396-
</dependencies>
397381
</profile>
398382
</profiles>
399383
</project>

distribution/server/src/assemble/bin.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@
6060
<directory>${basedir}/../../pulsar-functions/python-examples</directory>
6161
<outputDirectory>examples/python-examples</outputDirectory>
6262
</fileSet>
63-
<fileSet>
64-
<directory>${basedir}/../../pulsar-sql/presto-distribution/target/pulsar-presto-distribution</directory>
65-
<outputDirectory>trino</outputDirectory>
66-
<excludes>
67-
<exclude>bin</exclude>
68-
<exclude>bin/**</exclude>
69-
</excludes>
70-
</fileSet>
71-
<fileSet>
72-
<directory>${basedir}/../../pulsar-sql/presto-distribution/target/pulsar-presto-distribution</directory>
73-
<outputDirectory>trino</outputDirectory>
74-
<includes>
75-
<include>bin/**</include>
76-
</includes>
77-
<fileMode>755</fileMode>
78-
</fileSet>
7963
</fileSets>
8064
<files>
8165
<file>

docker-compose/kitchen-sink/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ services:
368368
image: apachepulsar/pulsar-all:latest
369369
restart: on-failure
370370
command: >
371-
bash -c "bin/apply-config-from-env-with-prefix.py SQL_PREFIX_ trino/conf/catalog/pulsar.properties && \
372-
bin/apply-config-from-env.py conf/pulsar_env.sh && \
371+
bash -c "bin/apply-config-from-env.py conf/pulsar_env.sh && \
373372
bin/watch-znode.py -z $$zookeeperServers -p /initialized-$$clusterName -w && \
374373
exec bin/pulsar sql-worker run"
375374
environment:

docker/pulsar/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ RUN for SUBDIRECTORY in conf data download logs; do \
4242
chmod -R g+w /pulsar/$SUBDIRECTORY; \
4343
done
4444

45-
# Trino writes logs to this directory (at least during tests), so we need to give the process permission
46-
# to create those log directories. This should be removed when Trino is removed.
47-
RUN chmod g+w /pulsar/trino
48-
4945
### Create 2nd stage from Ubuntu image
5046
### and add OpenJDK and Python dependencies (for Pulsar functions)
5147

managed-ledger/src/main/java/org/apache/bookkeeper/mledger/offload/OffloaderUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ static Pair<NarClassLoader, LedgerOffloaderFactory> getOffloaderFactory(String n
5353
throws IOException {
5454
// need to load offloader NAR to the classloader that also loaded LedgerOffloaderFactory in case
5555
// LedgerOffloaderFactory is loaded by a classloader that is not the default classloader
56-
// as is the case for the pulsar presto plugin
5756
NarClassLoader ncl = NarClassLoaderBuilder.builder()
5857
.narFile(new File(narPath))
5958
.parentClassLoader(LedgerOffloaderFactory.class.getClassLoader())

pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ flexible messaging model and an intuitive client API.</description>
191191
<json-smart.version>2.4.10</json-smart.version>
192192
<opensearch.version>1.2.4</opensearch.version>
193193
<elasticsearch-java.version>8.5.2</elasticsearch-java.version>
194-
<trino.version>368</trino.version>
195194
<debezium.version>1.9.7.Final</debezium.version>
196195
<debezium.postgresql.version>42.5.0</debezium.postgresql.version>
197196
<debezium.mysql.version>8.0.30</debezium.mysql.version>
@@ -1776,7 +1775,6 @@ flexible messaging model and an intuitive client API.</description>
17761775

17771776
<!-- This is a text property file that contains just a class name -->
17781777
<exclude>**/META-INF/services/com.scurrilous.circe.HashProvider</exclude>
1779-
<exclude>**/META-INF/services/io.trino.spi.Plugin</exclude>
17801778

17811779
<!-- Django generated code -->
17821780
<exclude>**/django/stats/migrations/*.py</exclude>
@@ -2214,7 +2212,6 @@ flexible messaging model and an intuitive client API.</description>
22142212
<module>pulsar-testclient</module>
22152213
<module>pulsar-broker-auth-athenz</module>
22162214
<module>pulsar-client-auth-athenz</module>
2217-
<module>pulsar-sql</module>
22182215
<module>pulsar-broker-auth-oidc</module>
22192216
<module>pulsar-broker-auth-sasl</module>
22202217
<module>pulsar-client-auth-sasl</module>
@@ -2500,13 +2497,6 @@ flexible messaging model and an intuitive client API.</description>
25002497
</modules>
25012498
</profile>
25022499

2503-
<profile>
2504-
<id>pulsar-sql-tests</id>
2505-
<modules>
2506-
<module>pulsar-sql</module>
2507-
</modules>
2508-
</profile>
2509-
25102500
<profile>
25112501
<id>microbench</id>
25122502
<modules>

0 commit comments

Comments
 (0)