Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Done
-
3.1.1-incubating
-
None
-
3.1.1 with Spark 1.5.2
Also occurs with earlier versions of TinkerPop including 3.1.0 and Spark 1.5.1
Description
Issue discussed here on the mailing list:
https://groups.google.com/forum/#!topic/gremlin-users/i1cOLIkIF4Q
Queries run with SparkGraphComputer involving the properties() query sometimes produce null pointer exceptions as seen by these traces.
gremlin> g.V().propertyMap()
==>[name:[vp[name->josh]], age:[vp[age->32]]]
==>[name:[vp[name->marko]], age:[vp[age->29]]]
==>[name:[vp[name->peter]], age:[vp[age->35]]]
==>[name:[vp[name->lop]], lang:[vp[lang->java]]]
==>[name:[vp[name->ripple]], lang:[vp[lang->java]]]
==>[name:[vp[name->vadas]], age:[vp[age->27]]]
gremlin> g.V().out().out().not(__.has('name','ripple')).properties()
java.lang.NullPointerException
Display stack trace? [yN] n
gremlin> g.V().out().in().not(__.has('name','ripple')).properties()
java.lang.NullPointerException
Display stack trace? [yN] n
gremlin> g.V().out('created').in('created').not(__.has('name','ripple')).properties()
java.lang.NullPointerException
Display stack trace? [yN] n
gremlin> g.V().out('created').in('created').not(__.has('name','ripple')).propertyMap()
==>[name:[vp[name->josh]], age:[vp[age->32]]]
==>[name:[vp[name->josh]], age:[vp[age->32]]]
==>[name:[vp[name->josh]], age:[vp[age->32]]]
==>[name:[vp[name->josh]], age:[vp[age->32]]]
==>[name:[vp[name->marko]], age:[vp[age->29]]]
==>[name:[vp[name->marko]], age:[vp[age->29]]]
==>[name:[vp[name->marko]], age:[vp[age->29]]]
==>[name:[vp[name->peter]], age:[vp[age->35]]]
==>[name:[vp[name->peter]], age:[vp[age->35]]]
==>[name:[vp[name->peter]], age:[vp[age->35]]]
gremlin> g.V().out('created').in('created').not(__.has('name','ripple')).values()
==>josh
==>josh
==>josh
==>josh
==>32
==>32
==>32
==>32
==>marko
==>marko
==>marko
==>29
==>29
==>29
==>peter
==>peter
==>peter
==>35
==>35
==>35
gremlin> g.V().properties('name').count()
==>6
gremlin> graph = GraphFactory.open('conf/hadoop/hadoop-gryo.properties')
==>hadoopgraph[gryoinputformat->gryooutputformat]
gremlin> g = graph.traversal(computer(SparkGraphComputer))
==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], sparkgraphcomputer]
gremlin> g.V().out().in().not(__.has('name','ripple')).properties()
java.lang.NullPointerException
Display stack trace? [yN] y
java.lang.NullPointerException
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.getProperty(Attachable.java:236)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.lambda$get$19(Attachable.java:98)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method$$Lambda$98/1054035701.apply(Unknown Source)
at org.apache.tinkerpop.gremlin.structure.util.Attachable.attach(Attachable.java:63)
at org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ComputerResultStep.processNextStart(ComputerResultStep.java:89)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:140)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:147)
at org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:205)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:443)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:187)
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.GeneratedMethodAccessor72.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:1210)
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:497)
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:1210)
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:218)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:305)