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] Automatically load grape_jvm_opt when create jvm instances through JNI #2327

Merged
merged 6 commits into from
Dec 14, 2022

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented Dec 13, 2022

Previously, GAE Java requires GRAPE_JVM_OPTS to create jvm instance, which shall be export to environment with source ${GRAPHSCOPE_HOME}/conf/grape_jvm_opt.

With this PR, the required env variable will be automatically loaded.

  • Pass environment variable GRAPHSCOPE_HOME to analytical engine instance.
  • Get the location of script grape_jvm_opt through GRAPHSCOPE_HOME
  • Put environment variable GRAPE_JVM_OPTS before creating jvm instance through JNI.

Update SSSPContext.java, writing result to C++ vertex array, allow the python context getting the result.

s

use with graphscope_home env var

fix-pie-java

lower logger level
std::string exec(const char* cmd) {
std::array<char, 128> buffer;
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Any idea for better way to do this?

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2022

Codecov Report

Merging #2327 (d19a36f) into main (7a3c215) will increase coverage by 1.20%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2327      +/-   ##
==========================================
+ Coverage   71.66%   72.87%   +1.20%     
==========================================
  Files          89       89              
  Lines        9956     9956              
==========================================
+ Hits         7135     7255     +120     
+ Misses       2821     2701     -120     
Impacted Files Coverage Δ
python/graphscope/framework/graph_schema.py 64.84% <0.00%> (+0.22%) ⬆️
python/graphscope/framework/utils.py 68.25% <0.00%> (+1.00%) ⬆️
python/graphscope/framework/app.py 91.70% <0.00%> (+1.38%) ⬆️
python/graphscope/client/session.py 76.70% <0.00%> (+1.51%) ⬆️
python/graphscope/framework/graph_utils.py 82.53% <0.00%> (+2.38%) ⬆️
python/graphscope/client/rpc.py 84.73% <0.00%> (+3.05%) ⬆️
python/graphscope/analytical/app/java_app.py 52.28% <0.00%> (+27.91%) ⬆️
python/graphscope/tests/unittest/test_java_app.py 100.00% <0.00%> (+46.98%) ⬆️

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 7a3c215...d19a36f. Read the comment docs.

@zhanglei1949 zhanglei1949 merged commit 3f96376 into alibaba:main Dec 14, 2022
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.

None yet

3 participants