Daniel Kuppitz created TINKERPOP-1304:
-----------------------------------------

             Summary: Input format for OLAP jobs is changed during job execution
                 Key: TINKERPOP-1304
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1304
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.0-incubating
            Reporter: Daniel Kuppitz
            Assignee: Marko A. Rodriguez


To reproduce the error, create the following config file:

{noformat}
# hadoop-script-output.properties
gremlin.graph=org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph
gremlin.hadoop.graphReader=org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat
gremlin.hadoop.graphWriter=org.apache.tinkerpop.gremlin.hadoop.structure.io.script.ScriptOutputFormat
gremlin.hadoop.jarsInDistributedCache=true
gremlin.hadoop.defaultGraphComputer=org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer

gremlin.hadoop.inputLocation=tinkerpop-modern.kryo
gremlin.hadoop.outputLocation=output
gremlin.hadoop.scriptOutputFormat.script=script-output.groovy

spark.master=local[*]
spark.executor.memory=1g
spark.serializer=org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer
{noformat}

... and this Groovy file:

{code}
// script-output.groovy
def stringify(vertex) {
    return "foo"
}
{code}

Finally execute the following code in the Gremlin console:

{noformat}
:install org.apache.tinkerpop hadoop-gremlin 3.2.1-SNAPSHOT
:install org.apache.tinkerpop spark-gremlin 3.2.1-SNAPSHOT
:q
{noformat}

{noformat}
:plugin use tinkerpop.hadoop
:plugin use tinkerpop.spark

hdfs.copyFromLocal("data/tinkerpop-modern.kryo", "tinkerpop-modern.kryo")
hdfs.copyFromLocal("/tmp/script-output.groovy", "script-output.groovy")

graph = GraphFactory.open("/tmp/hadoop-script-output.properties")
g = graph.traversal().withComputer()

g.V().hasLabel("person").program(BulkDumperVertexProgram.build().create(graph))
{noformat}

It will fail with the following exception:

{noformat}
:plugin use tinkerpop.hadoop
:plugin use tinkerpop.spark

hdfs.copyFromLocal("data/tinkerpop-modern.kryo", "tinkerpop-modern.kryo")
hdfs.copyFromLocal("/tmp/script-output.groovy", "script-output.groovy")

graph = GraphFactory.open("/tmp/hadoop-script-output.properties")
g = graph.traversal().withComputer()

g.V().hasLabel("person").program(BulkDumperVertexProgram.build().create(graph))
{noformat}

Other traversals and {{graph.compute().program(...).submit().get()}} work fine, 
only traversals using {{program()}} seem to cause this problem.



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

Reply via email to