-
Notifications
You must be signed in to change notification settings - Fork 449
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 cypher query in python #2952
Conversation
@@ -232,7 +232,8 @@ def create_interactive_instance( | |||
str(num_workers), # server size | |||
str(self._interactive_port), # executor port | |||
str(self._interactive_port + 1), # executor rpc port | |||
str(self._interactive_port + 2 * num_workers), # frontend port | |||
str(self._interactive_port + 2 * num_workers), # frontend gremlin port | |||
str(self._interactive_port + 2 * num_workers + 1), # frontend cypher port |
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.
Try launch multiple interactive instance, and see if the port will conflict?
I mean, the line 240 may need to change.
coordinator/gscoordinator/utils.py
Outdated
return True | ||
|
||
with GraphDatabase.driver(f'neo4j://{endpoint}', auth=("", "")) as driver: | ||
_, _, _ = driver.execute_query( |
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.
If the server is not ready, will this line raise exception?
fi | ||
wait_period_seconds=$(($wait_period_seconds+5)) | ||
if [ ${wait_period_seconds} -gt ${timeout_seconds} ];then | ||
echo "Get cypher external ip of ${GREMLIN_EXPOSE} failed." |
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.
Consider extract this logic into a function, since they are so similar, to alleviate the maintenance overhead.
python/graphscope/__init__.py
Outdated
@@ -42,7 +42,7 @@ | |||
from graphscope.client.session import get_default_session | |||
from graphscope.client.session import get_option | |||
from graphscope.client.session import graphlearn | |||
from graphscope.client.session import gremlin | |||
from graphscope.client.session import interactive |
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.
Don't delete gremlin, make it a proxy to interactive
@@ -27,6 +27,8 @@ | |||
from graphscope.framework.dag import DAGNode | |||
from graphscope.framework.dag_utils import gremlin_to_subgraph | |||
|
|||
from neo4j import GraphDatabase |
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.
Add try except, user may not want to install neo4j if they just need gremlin.
try:
from neo4j ...
except:
pass
cypher query is disabled
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2952 +/- ##
===========================================
+ Coverage 42.37% 73.28% +30.91%
===========================================
Files 99 99
Lines 10649 10687 +38
===========================================
+ Hits 4512 7832 +3320
+ Misses 6137 2855 -3282
... and 52 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Committed-by: Diwen Zhu from Dev container
Committed-by: Diwen Zhu from Dev container Committed-by: Diwen Zhu from Dev container
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.
Please modify the docs accordingly, including:
The doc is still valid, because we keep methods like graphscope.gremlin and gives hint that they will be deprecated later. |
What do these changes do?
Related issue number
Fixes #2736