Skip to content

Commit d09c71b

Browse files
committed
Rever changes on Jenkinsfile + Fix druid-handler shade ASM error by removing Calcite relocation
1 parent fcbfdee commit d09c71b

2 files changed

Lines changed: 8 additions & 46 deletions

File tree

Jenkinsfile

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -96,41 +96,14 @@ export -n HIVE_CONF_DIR
9696
sw java 21 && . /etc/profile.d/java.sh
9797
mkdir -p .m2/repository
9898
cp $SETTINGS .m2/settings.xml
99-
# TEMP: wipe workspace cache for asm/calcite-core to force re-resolve (Track 1)
100-
echo "@@@ Wiping asm and calcite-core from workspace .m2 to force re-resolve"
101-
rm -rf $PWD/.m2/repository/org/ow2/asm
102-
rm -rf $PWD/.m2/repository/org/apache/calcite/calcite-core
103-
# TEMP: diagnostic - record what ASM and calcite-core end up looking like in the workspace cache
104-
record_artifact_fingerprints() {
105-
echo "@@@ ASM in workspace .m2:"
106-
find $PWD/.m2/repository/org/ow2/asm -type f \\( -name '*.jar' -o -name '*.pom' \\) -exec ls -l {} \\; -exec md5sum {} \\; 2>/dev/null || true
107-
echo "@@@ calcite-core jar fingerprint:"
108-
CALCITE_CORE_JAR=$PWD/.m2/repository/org/apache/calcite/calcite-core/1.42.0/calcite-core-1.42.0.jar
109-
if [ -f "$CALCITE_CORE_JAR" ]; then
110-
ls -l "$CALCITE_CORE_JAR"
111-
md5sum "$CALCITE_CORE_JAR"
112-
echo "@@@ SqlFunctions.class size and md5 (inside calcite-core-1.42.0.jar):"
113-
unzip -p "$CALCITE_CORE_JAR" org/apache/calcite/runtime/SqlFunctions.class | wc -c
114-
unzip -p "$CALCITE_CORE_JAR" org/apache/calcite/runtime/SqlFunctions.class | md5sum
115-
else
116-
echo "@@@ calcite-core-1.42.0.jar not yet present in workspace .m2"
117-
fi
118-
}
119-
record_artifact_fingerprints
12099
OPTS=" -s $PWD/.m2/settings.xml -B -Dtest.groups= "
121100
OPTS+=" -Pitests,qsplits,dist,errorProne"
122101
OPTS+=" -Dmaven.repo.local=$PWD/.m2/repository"
123102
git config extra.mavenOpts "$OPTS"
124103
OPTS=" $M_OPTS -Dmaven.test.failure.ignore "
125104
if [ -s inclusions.txt ]; then OPTS+=" -Dsurefire.includesFile=$PWD/inclusions.txt";fi
126105
if [ -s exclusions.txt ]; then OPTS+=" -Dsurefire.excludesFile=$PWD/exclusions.txt";fi
127-
set +e
128106
mvn $OPTS '''+args+'''
129-
MVN_RC=$?
130-
set -e
131-
# TEMP: diagnostic - record fingerprints after mvn ran (runs even if mvn failed)
132-
record_artifact_fingerprints
133-
exit $MVN_RC
134107
du -h --max-depth=1
135108
df -h
136109
'''

druid-handler/pom.xml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,15 @@
353353
<pattern>io.netty</pattern>
354354
<shadedPattern>org.apache.hive.druid.io.netty</shadedPattern>
355355
</relocation>
356+
<!-- Calcite is intentionally NOT included or relocated here. Druid 0.17.1 uses Calcite APIs
357+
that are compatible with Hive's Calcite 1.42+. Including calcite-core in the shade caused
358+
SqlFunctions.class to exceed the JVM 64KB method limit after relocation. If Druid is upgraded
359+
to a version with an incompatible Calcite, this relocation must be restored (excluding SqlFunctions,
360+
or splitting the class via a source-level patch to Calcite).
356361
<relocation>
357362
<pattern>org.apache.calcite</pattern>
358363
<shadedPattern>org.apache.hive.druid.org.apache.calcite</shadedPattern>
359-
</relocation>
364+
</relocation> -->
360365
<relocation>
361366
<pattern>org.jboss.netty</pattern>
362367
<shadedPattern>org.apache.hive.druid.org.jboss.netty</shadedPattern>
@@ -379,7 +384,8 @@
379384
<include>org.apache.druid:*</include>
380385
<include>org.apache.druid.extensions:*</include>
381386
<include>io.netty:*</include>
382-
<include>org.apache.calcite:*</include>
387+
<!-- See comment above about Calcite not being relocated & included -->
388+
<!-- <include>org.apache.calcite:*</include> -->
383389
<include>com.fasterxml.jackson.core:*</include>
384390
<include>com.fasterxml.jackson.datatype:*</include>
385391
<include>com.fasterxml.jackson.dataformat:*</include>
@@ -409,23 +415,6 @@
409415
</configuration>
410416
</execution>
411417
</executions>
412-
<dependencies>
413-
<dependency>
414-
<groupId>org.ow2.asm</groupId>
415-
<artifactId>asm</artifactId>
416-
<version>9.9.1</version>
417-
</dependency>
418-
<dependency>
419-
<groupId>org.ow2.asm</groupId>
420-
<artifactId>asm-commons</artifactId>
421-
<version>9.9.1</version>
422-
</dependency>
423-
<dependency>
424-
<groupId>org.ow2.asm</groupId>
425-
<artifactId>asm-tree</artifactId>
426-
<version>9.9.1</version>
427-
</dependency>
428-
</dependencies>
429418
</plugin>
430419
</plugins>
431420
</build>

0 commit comments

Comments
 (0)