qfel
qfel
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
is there demo that focuses on loading efficiently some data?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
~70 seconds
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
thanks for your help :goodgremlin:
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
how long should it take normally?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
okay so i think that index works fine and it's loaded in python but it takes long to insert those verticies D:
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
oohh okay :goodgremlin:
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.gephi
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
gremlin> graph
No such property: graph for class: groovysh_evaluate
Type ':help' or ':h' for help.
Display stack trace? [yN]n
gremlin> g
No such property: g for class: groovysh_evaluate
Type ':help' or ':h' for help.
Display stack trace? [yN]n
gremlin>
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.gephi
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
gremlin> graph
No such property: graph for class: groovysh_evaluate
Type ':help' or ':h' for help.
Display stack trace? [yN]n
gremlin> g
No such property: g for class: groovysh_evaluate
Type ':help' or ':h' for help.
Display stack trace? [yN]n
gremlin>
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
how to get them?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
and there is no graph or g exported directly from server
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
I think that there is other way to open graph that i prepared in server script - connecting to server and doing TinkerGraph.open() opens new graph, where there is no modern graph nor indexes (TinkerGraph.open().getIndexedKeys(Vertex) doesn't return anything)
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
Yet it doesn't find index when openning graph
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
it is only for testing purpose, ultimately i want to load wiki votes in Python and not in Groovy script
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
also i can't locate remote.yaml
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
it is confusing that such script does globals << [g : traversal().withEmbedded(graph)] yet client (console or other connection) still needs to assign g
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
graph.getIndexedKeys(Vertex) doesn't return anything D:
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
Okay i created conf/gremlin-server-votes.yaml
...
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/sample-votes.groovy]}}}}
...
...
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/sample-votes.groovy]}}}}
...
and scripts/sample-votes.groovy
...
globals << [hook : [
onStartUp: { ctx ->
ctx.logger.info("Loading 'VOTES' graph data.")
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.generateModern(graph)
graph.createIndex('userId', Vertex.class)
}
] as LifeCycleHook]
...
...
globals << [hook : [
onStartUp: { ctx ->
ctx.logger.info("Loading 'VOTES' graph data.")
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.generateModern(graph)
graph.createIndex('userId', Vertex.class)
}
] as LifeCycleHook]
...
I call it using gremlin-server conf/gremlin-server-votes.yaml and now - how do i connect to such server from Gremlin Console? Is it
gremlin> :remote connect tinkerpop.server conf/remote.yaml
gremlin> :remote connect tinkerpop.server conf/remote.yaml
and then
graph = TinkerGraph.open()
graph = TinkerGraph.open()
?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
but afaik Python can only connect via .with_remote(), so i can't call with_graph() directly from Python - is with_remote(conn) aware of index on graph?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
Hmm
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
in other words: how do i expose such graph remotely assigned to Python?
54 replies
ATApache TinkerPop
Created by qfel on 6/15/2024 in #questions
Setting index in gremlin-python
Second approach was my goal but i am not sure if client.submit(...) from first code fragment worked correctly, creating index that is used later in Python's traversal. Do i need to assign g the same way i assigned TinkerGraph to graph?
54 replies