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

[GAE-Java] Pack JNI lib libgrape-jni.so into grape-runtime.jar #2330

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented Dec 14, 2022

  • Pack libgrape-jni.so into grape-runtime-shaded.jar.
  • Remove target library name in @FFIGen("grape-jni"), to avoid FastFFI generating System.loadLibrary() code.
  • Strip jni library after building, shrinking size from 500MB to <10MB
  • Fix symbol look up issue in codegen&built app as jni lib is striped.

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2022

Codecov Report

Merging #2330 (1bc9eb6) into main (6873211) will increase coverage by 2.92%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2330      +/-   ##
==========================================
+ Coverage   40.03%   42.96%   +2.92%     
==========================================
  Files          88       88              
  Lines        9714     9715       +1     
==========================================
+ Hits         3889     4174     +285     
+ Misses       5825     5541     -284     
Impacted Files Coverage Δ
python/graphscope/tests/unittest/test_java_app.py 100.00% <100.00%> (+100.00%) ⬆️
python/graphscope/framework/graph_utils.py 70.23% <0.00%> (+2.77%) ⬆️
python/graphscope/client/session.py 68.18% <0.00%> (+3.03%) ⬆️
python/graphscope/analytical/udf/utils.py 39.36% <0.00%> (+3.19%) ⬆️
python/graphscope/framework/app.py 74.19% <0.00%> (+3.68%) ⬆️
python/graphscope/tests/conftest.py 52.44% <0.00%> (+4.23%) ⬆️
python/graphscope/analytical/app/java_app.py 28.93% <0.00%> (+4.56%) ⬆️
python/graphscope/framework/graph_schema.py 59.36% <0.00%> (+6.62%) ⬆️
python/graphscope/client/rpc.py 80.59% <0.00%> (+6.71%) ⬆️
python/graphscope/framework/utils.py 57.35% <0.00%> (+13.97%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6873211...1bc9eb6. Read the comment docs.

try {
NativeLoader.loadLibrary("grape-jni");
} catch (IOException e) {
e.printStackTrace();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if the exception got swallowed is by purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we try to load jni library, but it is ok if failed.

use native loader

remove dst lib name in ffi class

fix

format

remove comment in cmakelist

try to fix graphx

s

s

f

s

s

add giraph jar to GRAPHSCOPE_HOME/lib

shade pattern

fix ci

add giraph to class path

automatically load grape_jvm_opts in java_loader_invoker

catch class version inconsistent error

fix lib loading and graph template parsing

to load compile user so, user system.load

fix python test

format

giraph jar needs when test giraph app

fix giraph test

s

fix ci

fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants