org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException

249 views
Skip to first unread message

Suny

unread,
Sep 12, 2017, 11:59:27 AM9/12/17
to JanusGraph users
I added 1000 vertices to Janusgraph. When I query for a subset of them, sometimes it returns the result, sometimes it throws this RemoteException. It is not consistent. Any thoughts why this is happening ?

Only one vertex has label and all other vertices have attributes.

When I do this query - g.V().hasLabel('root').id() , it is always giving RemoteException

David Pitera

unread,
Sep 12, 2017, 12:00:26 PM9/12/17
to Suny, JanusGraph users
What is the full request and exception? How are you connecting to the server / sending your request?

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/bc269949-a888-4da6-bd90-5c2609cf2120%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Suny

unread,
Sep 12, 2017, 12:06:32 PM9/12/17
to JanusGraph users
I run the gremlin.sh and then do a remote connect to the server hosted in aws 

I change the hostname in remote.yaml file to point to the server in aws and run 

:remote connect tinkerpop.server conf/remote.yaml


Here is the query i am doing : 


gremlin> :> g.V().hasLabel('root').id()

org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException

Type ':help' or ':h' for help.

Display stack trace? [yN]y

org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException

at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:170)

at org.apache.tinkerpop.gremlin.console.commands.SubmitCommand.execute(SubmitCommand.groovy:41)

at org.codehaus.groovy.tools.shell.Shell.execute(Shell.groovy:104)

at org.codehaus.groovy.tools.shell.Groovysh.super$2$execute(Groovysh.groovy)

at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)

at org.codehaus.groovy.tools.shell.Groovysh.executeCommand(Groovysh.groovy:259)

at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:158)

at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)

at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)

at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)

at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)

at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:124)

at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)

at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)

at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:152)

at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)

at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:455)




On Tuesday, September 12, 2017 at 12:00:26 PM UTC-4, David Pitera wrote:
What is the full request and exception? How are you connecting to the server / sending your request?
On Tue, Sep 12, 2017 at 11:59 AM, Suny <sahithiy...@gmail.com> wrote:
I added 1000 vertices to Janusgraph. When I query for a subset of them, sometimes it returns the result, sometimes it throws this RemoteException. It is not consistent. Any thoughts why this is happening ?

Only one vertex has label and all other vertices have attributes.

When I do this query - g.V().hasLabel('root').id() , it is always giving RemoteException

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.

Jason Plurad

unread,
Sep 13, 2017, 2:57:22 PM9/13/17
to JanusGraph users
g.V().hasLabel('root').id() isn't an indexed query because labels cannot be indexed right now, so the query is doing a full graph scan. This is probably causing the script evaluation to timeout.

It would be fast if you created "root" as a property and created a composite index on it.

Ankur Goel

unread,
Sep 15, 2017, 1:32:09 AM9/15/17
to JanusGraph users
By default label should be indexed or some provision to index label should be in configuration.

Else no use of label.

~AnkurG

Kelvin Lawrence

unread,
Oct 7, 2017, 4:07:08 PM10/7/17
to JanusGraph users
A lot of use cases may not want the default behavior to be that labels are indexed. While I agree it should be an optional feature, in a graph where a lot of the nodes have the same label name you may not want all of the labels cluttering up your index. My vote would be for this feature, if added, to be off by default. Imagine you have a large social graph. A lot of the nodes in the graph will be labelled "person" - it is not always the case that you want all of those labels in the index. It is sometimes better to index and key off a more granular node property.

I am not sure that labels make very good "primary keys" in a lot of cases. 

Cheers,
Kelvin
Reply all
Reply to author
Forward
0 new messages