-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Make ShardingSphere Proxy in GraalVM Native Image form available #21347
Comments
|
|
|
|
|
|
|
|
|
Warning: Could not resolve class com.github.luben.zstd.ZstdCompressCtx for reflection configuration. Reason: java.lang.ClassNotFoundException: com.github.luben.zstd.ZstdCompressCtx.
Warning: Could not resolve class org.conscrypt.ConscryptEngine for reflection configuration. Reason: java.lang.ClassNotFoundException: org.conscrypt.ConscryptEngine.
Warning: Could not resolve class org.conscrypt.ConscryptEngine for reflection configuration. Reason: java.lang.ClassNotFoundException: org.conscrypt.ConscryptEngine.
Warning: Could not resolve class org.conscrypt.ConscryptEngine for reflection configuration. Reason: java.lang.ClassNotFoundException: org.conscrypt.ConscryptEngine.
Warning: Method ch.qos.logback.core.encoder.LayoutWrappingEncoder.setParent(Appender) not found.
Warning: Could not resolve class com.aayushatharva.brotli4j.Brotli4jLoader for reflection configuration. Reason: java.lang.ClassNotFoundException: com.aayushatharva.brotli4j.Brotli4jLoader.
Warning: Could not resolve class com.github.luben.zstd.Zstd for reflection configuration. Reason: java.lang.ClassNotFoundException: com.github.luben.zstd.Zstd.
Warning: Could not resolve class com.ning.compress.lzf.impl.UnsafeChunkDecoder for reflection configuration. Reason: java.lang.ClassNotFoundException: com.ning.compress.lzf.impl.UnsafeChunkDecoder.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register method org.apache.commons.logging.impl.Log4JLogger.<init>(String) for reflection. Reason: java.lang.NoClassDefFoundError: org/apache/log4j/Category.
Warning: Could not resolve class org.apache.log4j.Level for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.log4j.Level.
Warning: Could not resolve class org.apache.log4j.Priority for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.log4j.Priority.
Warning: Could not resolve class org.apache.logging.log4j.Logger for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger.
Warning: Could not resolve class org.apache.logging.log4j.core.LoggerContext for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.logging.log4j.core.LoggerContext.
Warning: Could not resolve class org.apache.logging.log4j.message.DefaultFlowMessageFactory for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.logging.log4j.message.DefaultFlowMessageFactory.
Warning: Could not resolve class org.apache.logging.log4j.message.ReusableMessageFactory for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.logging.log4j.message.ReusableMessageFactory.
Warning: Could not resolve class org.conscrypt.Conscrypt for reflection configuration. Reason: java.lang.ClassNotFoundException: org.conscrypt.Conscrypt.
Warning: Could not resolve class org.conscrypt.OpenSSLContextImpl$TLSv13 for reflection configuration. Reason: java.lang.ClassNotFoundException: org.conscrypt.OpenSSLContextImpl$TLSv13.
Warning: Could not resolve class org.hamcrest.number.OrderingComparison for reflection configuration. Reason: java.lang.ClassNotFoundException: org.hamcrest.number.OrderingComparison.
Warning: Method com.zaxxer.hikari.HikariConfig.getScheduledExecutorService() not found.
Warning: Method com.zaxxer.hikari.HikariConfig.isInitializationFailFast() not found.
Warning: Method com.zaxxer.hikari.HikariConfig.isJdbc4ConnectionTest() not found.
Warning: Method com.zaxxer.hikari.HikariConfig.setInitializationFailFast(boolean) not found.
Warning: Method com.zaxxer.hikari.HikariConfig.setJdbc4ConnectionTest(boolean) not found.
Warning: Method com.zaxxer.hikari.HikariConfig.setScheduledExecutorService(ScheduledThreadPoolExecutor) not found.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput. |
|
|
|
|
Great work 👍 |
Thanks @linghengqian and it is really very nice work! Do you have any plan to write a simple application to compare the performance between the |
|
Well, |
|
OK, thank for clarifying. |
|
Feature Request
For English only, other languages will not accept.
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Is your feature request related to a problem?
Describe the feature you would like.
There is currently a nightly build of ShardingSphere Proxy at https://github.com/orgs/apache/packages/container/package/shardingsphere-proxy-native. But it didn't reach usable status because it wasn't ready yet. For some related error logs, please refer to the logs of https://github.com/apache/shardingsphere/actions/runs/3185102779/jobs/5194279014 .
This issue aims to do the following to bring the nightly build to a usable state.
Add nightly builds of GitHub Action Job and corresponding documentation.
Introduces
JUnit Platform
andJUnit Vintage
to replaceJUnit 4
to provide the ability to unit test insideGraalVM Native Image
. Reference Support JUnit 4 via the VintageTestEngine graalvm/native-build-tools#53 . This issue may need to wait for Migrate certain aspects of JUnit support to the JUnit 5 project graalvm/native-build-tools#313 to be closed before it is actually resolved.Update most of the dependencies to match the metadata provided by https://github.com/oracle/graalvm-reachability-metadata , including but not limited to
com.zaxxer:HikariCP:3.4.2
. This also involves submitting metadata for new third-party dependencies to https://github.com/oracle/graalvm-reachability-metadata . Of course, this problem may also be alleviated by Introduce adefault-for
attribute oracle/graalvm-reachability-metadata#62 .Introduce GraalVM
Agent
inGraalVM Native Build Tools
. I hope to wait for Add agent modes to Maven plugin graalvm/native-build-tools#260 to be resolved. But if the problem mentioned in Maven agent modes support work graalvm/native-build-tools#315 is still not solved, I will follow what I mentioned in https://twitter.com/linghengqian/status/1575865141198934016?s=20&t=iVsRyWdOhmXeAMt_bnXRyg operation to introduce it.Update the GraalVM CE version used by GitHub Actions to
22.3.0
or higher to resolve an issue involvingserver.yaml
inShardingSphere Proxy
not being scanned from the classpath. Refer to Cannot resolve FileSystem root resource in Native Image oracle/graal#5020 and Native Image FileSystem is trailing slash sensitive oracle/graal#5080 .Works with Groovy 4 specific issues. Its GraalVM Reachability Metadata seems very special that we shouldn't commit metadata to Oracle's Git repository. It's metadata looks like what is mentioned in Update Groovy version to fix the problem about IndyInterface #18175 and Can't build Groovy Application graalvm/native-build-tools#324 (comment) dynamically.
Working on a fix for Apache Calcite, due to [CALCITE-4882] Introduce new Lambda-based Metadata framework calcite#2603 being closed, may need to be introduced in a unique way https://twitter.com/intjesus/status/1567276748257259520?s=20&t=nUlN7LI8e9_2KO9lPwCqaw, Implement Calcite native library that parses sql and returns a binary substrait representation substrait-io/substrait#21 and a component of https://github.com/substrait-io/substrait-java/tree/main/isthmus . This allowed us to finally get rid of https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/util/javac/JaninoCompiler.java like this, Janino related classes .
The PRs involved in this issue are as follows:
distribution/proxy-native
#21657com.github.luben:zstd-jni:1.5.2-5
oracle/graalvm-reachability-metadata#121java.sql.Date
in IntervalShardingAlgorithm #22495com.google.protobuf:protobuf-java-util:3.21.12
oracle/graalvm-reachability-metadata#167org.opengauss:opengauss-jdbc:3.1.0-og
oracle/graalvm-reachability-metadata#168com.hazelcast:hazelcast:5.2.1
oracle/graalvm-reachability-metadata#169io.etcd:jetcd-core:0.7.5
oracle/graalvm-reachability-metadata#170user-code-filter.json
for unit tests oforg.opengauss:opengauss-jdbc
oracle/graalvm-reachability-metadata#174javax.cache:cache-api:1.1.1
oracle/graalvm-reachability-metadata#176com.github.ben-manes.caffeine:caffeine:3.1.2
oracle/graalvm-reachability-metadata#193OutOfMemoryError
unique to building GraalVM Native Image on Github Actions devices #28213shardingsphere-infra-expr
to expose the use of Row Value Expressions SPI #28340org.apache.commons:commons-dbcp2:2.9.0
oracle/graalvm-reachability-metadata#380com.github.ben-manes.caffeine:caffeine:2.9.3
oracle/graalvm-reachability-metadata#388org.junit.jupiter.api.condition.EnabledOnOs
in NativeTest graalvm/native-build-tools#504org.apache.shardingsphere.elasticjob:elasticjob-lite-core:3.0.3
oracle/graalvm-reachability-metadata#390infra-expr-espresso
module related GraalVM CE version to 23.1.1 #28609infra-expr-espresso
module #28610plexus-xml
andplexus-utils
graalvm/native-build-tools#484org.junit.jupiter.api.condition.EnabledOnOs
in NativeTest graalvm/native-build-tools#504resource:/
related FileSystem for JDBCRepositorySQLLoader in the GraalVM Native Image environment #29009com.sun.xml.bind:jaxb-impl
toorg.glassfish.jaxb:jaxb-runtime
#29013Path#toFile
in GraalVM Native Image #29014The text was updated successfully, but these errors were encountered: