Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KYUUBI #6449] Fix Gluten CI ClassNotFoundException: io.glutenproject.GlutenPlugin #6449

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/gluten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ name: Gluten CI
on:
schedule:
- cron: 0 4 * * *
pull_request:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this before merge

branches:
- master
workflow_dispatch:

env:
MVN_OPT: -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Pjdbc-shaded,gen-policy -Dmaven.plugin.download.cache.path=/tmp/engine-archives
Expand Down Expand Up @@ -64,6 +68,18 @@ jobs:
git clone https://github.com/oap-project/gluten.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this repo should be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

cd gluten
./dev/buildbundle-veloxbe.sh
THIRDPARTY_LIB="./package/target/thirdparty-lib"
LINUX_OS=$(. /etc/os-release && echo ${ID})
VERSION=$(. /etc/os-release && echo ${VERSION_ID})
ARCH=`uname -m`
mkdir -p $THIRDPARTY_LIB
cp /usr/lib/${ARCH}-linux-gnu/{libre2.so.9,libdouble-conversion.so.3,libidn.so.12,\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should we do such copy? /usr/lib/${ARCH}-linux-gnu should be included in ld.so.conf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build and test are run in different vm. Libraries only exists in build vm.

libglog.so.0,libgflags.so.2.2,libevent-2.1.so.7,libsnappy.so.1,libunwind.so.8,\
libcurl.so.4,libxml2.so.2,libgsasl.so.7,libicui18n.so.70,libicuuc.so.70,libnghttp2.so.14,\
libldap-2.5.so.0,liblber-2.5.so.0,libntlm.so.0,librtmp.so.1,libsasl2.so.2,libssh.so.4,\
libicudata.so.70,libthrift-0.16.0.so} $THIRDPARTY_LIB/
cp /usr/local/lib/{libprotobuf.so.32,libboost_context.so.1.84.0,\
libboost_regex.so.1.84.0} $THIRDPARTY_LIB/
Copy link
Contributor

@ulysses-you ulysses-you Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we send a pr to gluten to make package.sh support collect libraries only ? So that we can use that script directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let me try.

fi
- uses: actions/cache@v3
if: steps.gluten-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -115,6 +131,7 @@ jobs:
- name: Run Gluten Integration TPC-H/DS Test
run: |
TEST_MODULES="integration-tests/kyuubi-gluten-it"
export LD_LIBRARY_PATH=$(pwd)/gluten/package/target/thirdparty-lib
./build/mvn ${MVN_OPT} -Pgluten-it -Pspark-${{ matrix.spark }} -pl ${TEST_MODULES} -am clean install -DskipTests
./build/mvn ${MVN_OPT} -Pgluten-it -Pspark-${{ matrix.spark }} -pl ${TEST_MODULES} test
- name: Upload test logs
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/spark/gluten.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Add gluten jar: `copy /path/to/gluten/package/target/gluten-velox-bundle-spark3.
Add the following minimal configuration into `spark-defaults.conf`:

```properties
spark.plugins=io.glutenproject.GlutenPlugin
spark.plugins=org.apache.gluten.GlutenPlugin
spark.memory.offHeap.size=20g
spark.memory.offHeap.enabled=true
spark.shuffle.manager=org.apache.spark.shuffle.sort.ColumnarShuffleManager
Expand Down
21 changes: 18 additions & 3 deletions integration-tests/kyuubi-gluten-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@

<properties>
<gluten.version>1.2.0-SNAPSHOT</gluten.version>
<gluten.artifact.name>gluten-velox-bundle-spark${spark.binary.version}_${scala.binary.version}-ubuntu_22.04</gluten.artifact.name>
<gluten.artifact.name>gluten-velox-bundle-spark${spark.binary.version}_${scala.binary.version}</gluten.artifact.name>
</properties>

<dependencies>
<dependency>
<groupId>io.glutenproject</groupId>
<groupId>org.apache.gluten</groupId>
<artifactId>${gluten.artifact.name}</artifactId>
<version>${gluten.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/../../gluten/package/target/${gluten.artifact.name}_x86_64-${gluten.version}.jar</systemPath>
<systemPath>${project.basedir}/../../gluten/package/target/${gluten.artifact.name}-${os.detected.release}_${os.detected.release.version}_${os.detected.arch}-${gluten.version}.jar</systemPath>
</dependency>

<dependency>
Expand All @@ -57,6 +57,14 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.kyuubi</groupId>
<artifactId>kyuubi-util-scala_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.kyuubi</groupId>
<artifactId>kyuubi-spark-connector-common_${scala.binary.version}</artifactId>
Expand Down Expand Up @@ -88,6 +96,13 @@
<artifactId>spark-hive_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<!-- javax.servlet-api is required by Spark 3.x -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ import org.apache.kyuubi.tags.GlutenTest
@Slow
@GlutenTest
class GlutenTPCHQuerySuite extends KyuubiFunSuite with GlutenSuiteMixin {
// TODO: Fix the inconsistency in q9 results.
val queries: Set[String] = (1 to 22).map(i => s"q$i").toSet - "q9"
// TODO: Fix the inconsistency in q3,q9 results.
val queries: Set[String] = (1 to 22)
.map(i => s"q$i").toSet - "q3" - "q9"

lazy val sparkConf: SparkConf = {
val glutenConf = new SparkConf().setMaster("local[*]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait GlutenSuiteMixin {
}

protected def extraConfigs: Map[String, String] = Map(
"spark.plugins" -> "io.glutenproject.GlutenPlugin",
"spark.plugins" -> "org.apache.gluten.GlutenPlugin",
"spark.memory.offHeap.size" -> "4g",
"spark.memory.offHeap.enabled" -> "true",
"spark.shuffle.manager" -> "org.apache.spark.shuffle.sort.ColumnarShuffleManager",
Expand Down
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
<maven.plugin.enforcer.mojo.rules.version>1.6.1</maven.plugin.enforcer.mojo.rules.version>
<maven.plugin.flatten.version>1.6.0</maven.plugin.flatten.version>
<maven.plugin.frontend.version>1.12.1</maven.plugin.frontend.version>
<maven.plugin.os.version>1.7.1</maven.plugin.os.version>
<maven.plugin.scala.version>4.8.0</maven.plugin.scala.version>
<maven.plugin.scalatest.version>2.2.0</maven.plugin.scalatest.version>
<maven.plugin.scalatest.exclude.tags>org.scalatest.tags.Slow</maven.plugin.scalatest.exclude.tags>
Expand Down Expand Up @@ -1257,6 +1258,15 @@
</pluginRepositories>

<build>
<extensions>
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${maven.plugin.os.version}</version>
</extension>
</extensions>

<pluginManagement>
<plugins>
<plugin>
Expand Down
Loading