[ 
https://issues.apache.org/jira/browse/TINKERPOP-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko A. Rodriguez closed TINKERPOP-1029.
-----------------------------------------
    Resolution: Fixed

This has been fixed. It was simple problem. If no adjacency traversal is 
provided, then use the default of {{out()}}.

Added {{PeerPressureVertexProgramTest}} to integration tests to ensure proper 
functioning over all graph systems. Don't know why we didn't have this test 
before. :|

This fix will be provided in TinkerPop 3.1.1.

> NullPointerException when trying to run PeerPressureVertexProgram with 
> SparkGraphComputer on tinkerpop-classic.kryo
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1029
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1029
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: hadoop
>    Affects Versions: 3.0.1-incubating
>         Environment: DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=12.04
> DISTRIB_CODENAME=precise
> DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
> NAME="Ubuntu"
> VERSION="12.04.3 LTS, Precise Pangolin"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
> VERSION_ID="12.04"
>            Reporter: Xian Yi Teng
>            Assignee: Marko A. Rodriguez
>
> On the Gremlin console that comes with titan-1.0.0-hadoop1:
> {code}
> gremlin> Gremlin.version()
> ==>3.0.1-incubating
> gremlin> graph = TinkerFactory.createClassic()
> ==>tinkergraph[vertices:6 edges:6]
> gremlin> r = 
> graph.compute().program(PeerPressureVertexProgram.build().create()).submit().get()
> ==>result[tinkergraph[vertices:6 edges:0],memory[size:1]]
> gremlin> g = r.graph().traversal(standard())
> ==>graphtraversalsource[tinkergraph[vertices:6 edges:0], standard]
> gremlin> g.V().valueMap()
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[1], name:[marko], age:[29]]
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[1], name:[vadas], age:[27]]
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[1], name:[lop], lang:[java]]
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[1], name:[josh], age:[32]]
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[1], name:[ripple], lang:[java]]
> ==>[gremlin.peerPressureVertexProgram.voteStrength:[1.0], 
> gremlin.peerPressureVertexProgram.cluster:[6], name:[peter], age:[35]]
> {code}
> But:
> {code}
> gremlin> graph = 
> GraphFactory.open('conf/hadoop-graph/hadoop-gryo.properties') //pointing to 
> data/tinkerpop-classic.kryo
> ==>hadoopgraph[gryoinputformat->gryooutputformat]
> gremlin> r = 
> graph.compute(SparkGraphComputer).program(PeerPressureVertexProgram.build().create()).submit().get()
> java.lang.NullPointerException
> Display stack trace? [yN] y
> java.util.concurrent.ExecutionException: java.lang.NullPointerException
>       at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>       at 
> java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887)
>       at java_util_concurrent_Future$get.call(Unknown Source)
>       at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
>       at groovysh_evaluate.run(groovysh_evaluate:3)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
>       at 
> org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
>       at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
>       at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
>       at 
> org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
>       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:497)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
>       at 
> org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
>       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:90)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
>       at 
> org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
>       at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram.storeState(PeerPressureVertexProgram.java:96)
>       at 
> org.apache.tinkerpop.gremlin.hadoop.process.computer.spark.SparkGraphComputer.lambda$submit$31(SparkGraphComputer.java:136)
>       at 
> org.apache.tinkerpop.gremlin.hadoop.process.computer.spark.SparkGraphComputer$$Lambda$87/2140322192.get(Unknown
>  Source)
>       at 
> java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1582)
>       at 
> java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1574)
>       at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
>       at 
> java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
>       at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
>       at 
> java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to