-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob CoordinatorRegistryCenter
under GraalVM Native Image
#2428
Draft
linghengqian
wants to merge
1
commit into
apache:master
Choose a base branch
from
linghengqian:sasl-zookeeper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linghengqian
force-pushed
the
sasl-zookeeper
branch
3 times, most recently
from
August 13, 2024 01:17
e101206
to
0fbe704
Compare
linghengqian
changed the title
Add nativeTest that uses DIGEST-MD5 as SASL mechanism for ElasticJob ZookeeperRegistryCenter under GraalVM Native Image
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob Java API under GraalVM Native Image
Aug 13, 2024
linghengqian
changed the title
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob Java API under GraalVM Native Image
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob Aug 13, 2024
CoordinatorRegistryCenter
under GraalVM Native Image
linghengqian
force-pushed
the
sasl-zookeeper
branch
from
August 13, 2024 01:22
0fbe704
to
b6b4e82
Compare
linghengqian
force-pushed
the
sasl-zookeeper
branch
5 times, most recently
from
August 13, 2024 03:03
a9dd4ad
to
dae6ed8
Compare
linghengqian
commented
Aug 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I used the buildArg of
-H:+UnlockExperimentalVMOptions -g -O0 -H:+SourceLevelDebug -H:-DeleteLocalSymbols
to attach debug information to the GraalVM Native Image generated by nativeTest, but it seems to be useless. First of all, affected by https://youtrack.jetbrains.com/issue/IDEA-330170 , IntelliJ IDEA's prompts are not intuitive. Affected by Copy APT generated sources into the debugger cache graalvm/native-build-tools#145 ,target/source
does not carry the local Java code.
sudo apt-get install build-essential zlib1g-dev -y
sdk install java 22.0.2-graalce
cd ./shardingsphere-elasticjob/
sdk use java 22.0.2-graalce
./mvnw -PnativeTestInElasticJob -T1C -e clean test
cp -rf ./test/native/src/test/java/* ./test/native/target/sources/
./test/native/target/native-tests --xml-output-dir ./test/native/target/native-test-reports -Djunit.platform.listeners.uid.tracking.output.dir=./test/native/target/test-ids
- Interestingly, I can run
native-tests
locally in IntelliJ IDEA, but if I expect to debugnative-tests
locally in IntelliJ IDEA, IntelliJ IDEA protests. There is no straightforward description in https://www.jetbrains.com/help/idea/debug-graalvm-native.html, it's all dry text, as if assuming that what you see is what you get for the UI. - https://github.com/nativejdb/nativejdb looks like it's no longer updated and looks like it's about to enter an epic debugging hell. Of course nativejdb does not support jdk22 at all.
linghengqian
force-pushed
the
sasl-zookeeper
branch
from
August 13, 2024 05:04
dae6ed8
to
cc0eafc
Compare
linghengqian
commented
Aug 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- gdb local debugging is not available for IntelliJ IDEA, but gdb remote debugging is available for IntelliJ IDEA. IntelliJ IDEA is connected to the Native Image, but it seems that it is not possible to see the internals of variables. All we see is cluttered C++ pointers.
cd ./shardingsphere-elasticjob/
sdk use java 22.0.2-graalce
./mvnw -PnativeTestInElasticJob -T1C -e clean test
gdbserver :1234 ./test/native/target/native-tests --xml-output-dir ./test/native/target/native-test-reports -Djunit.platform.listeners.uid.tracking.output.dir=./test/native/target/test-ids
…natorRegistryCenter` under GraalVM Native Image
linghengqian
force-pushed
the
sasl-zookeeper
branch
from
August 13, 2024 08:21
cc0eafc
to
c7025ed
Compare
linghengqian
commented
Aug 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2099.
Changes proposed in this pull request:
CoordinatorRegistryCenter
under GraalVM Native Image.org.apache.curator.test.TestingServer
, a lot of system properties are set in the background, refer to https://github.com/apache/zookeeper/blob/release-3.9.2/zookeeper-server/src/test/java/org/apache/zookeeper/test/SaslDigestAuthOverSSLTest.java .Therefore, in order to test Zookeeper Server with SASL mechanism enabled under ElasticJob
CoordinatorRegistryCenter
, ElasticJob should never start Zookeeper Server throughorg.apache.curator.test.TestingServer
. Running Zookeeper Server and Curator Client in the same JVM process will pollute system properties. For more information on this unit test, refer to https://zookeeper.apache.org/doc/r3.9.2/zookeeperAdmin.html andhttps://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+and+SASL .
saslToken
of Zookeeper Quorum member is empty.