org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep cannot be cast to org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating
g.E().valueMap(true).toList()
globals << [g : graph.traversal(GraphTraversalSource.build().with(ReadOnlyStrategy.instance()))]
// An example of an initialization script that can be configured to run in Gremlin Server.// Functions defined here will go into global cache and will not be removed from there// unless there is a reset of the ScriptEngine.def addItUp(x, y) { x + y }
// an init script that returns a Map allows explicit setting of global bindings.def globals = [:]
// defines a sample LifeCycleHook that prints some output to the Gremlin Server console.// note that the name of the key in the "global" map is unimportant.globals << [hook : [ onStartUp: { ctx -> ctx.logger.info("Executed once at startup of Gremlin Server.") }, onShutDown: { ctx -> ctx.logger.info("Executed once at shutdown of Gremlin Server.") }] as LifeCycleHook]
// define the default ReadOnly TraversalSource to bind queries to - this one will be named "g".globals << [g : graph.traversal(GraphTraversalSource.build().with(ReadOnlyStrategy.instance()))]
gremlin> g.E(0).property('anything',1)
The provided traversal has a mutating step and thus is not read only: AddPropertyStep({key=[anything], value=[1]})
Display stack trace? [yN]
code:597
message:"org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep cannot be cast to org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating"
gremlin> g.E().valueMap(true).toList()==>{nullArcDescription=self-loop-on-nullNode, label=nullArc, id=0}==>{takePcs=40, givePcs=40, vdest=888, label=flowArc, id=1}==>{takePcs=40, givePcs=40, vdest=888, label=flowArc, id=2}==>{takePcs=60, givePcs=60, vdest=888, label=ovFlowArc, id=3}==>{takePcs=40, givePcs=40, vdest=888, label=ovFlowArc, id=4}==>{takePcs=40, givePcs=40, vdest=888, label=ovFlowArc, id=5}==>{takePcs=20, givePcs=20, vdest=888, label=flowArc, id=6}==>{takePcs=60, givePcs=60, vdest=888, label=flowArc, id=7}==>{takePcs=100, givePcs=100, vdest=888, label=endDlvArc, id=8}==>{takePcs=100, givePcs=100, vdest=888, label=dlvArc, id=9}
g.E().valueMap(true).toList()
g.E().by(valueMap(true)).toList()