tinkerpop - Gremlin and Frames -
i have tried run simple demo on frames gremlin console:
tinkergraph graph = tinkergraphfactory.createtinkergraph(); framedgraphfactory factory = new framedgraphfactory(new gremlingroovymodule()); after adding import com.tinkerpop.frames.*; (yes, tinkerpop frames in classpath) console not recognize framedgraphfactory class.
in fact, if run
gremlin> show classes command, replies nothing has been loaded. clue?
thanks
ps details: on ubuntu, downloaded gremlin-groovy-2.4.0.
i have downloaded frames jar, , set classpath:
echo $classpath /home/dev/frames-2.5.0.jar then started gremlin , imported frames:
import com.tinkerpop.frames.* finally
tinkergraph graph = tinkergraphfactory.createtinkergraph(); framedgraphfactory factory = new framedgraphfactory(new gremlingroovymodule()); produces:
groovysh_evaluate: 50: unable resolve class framedgraphfactory @ line 50, column 30. framedgraphfactory factory = new framedgraphfactory(new gremlingroovymodule()); //(1) factories should reused performance , memory conservation. ^ groovysh_evaluate: 50: unable resolve class gremlingroovymodule @ line 50, column 53 .
try this:
gremlin> grape.grab([group:"com.tinkerpop",module:"frames",version:"2.4.0"]) ==>null gremlin> graph = tinkergraphfactory.createtinkergraph() ==>tinkergraph[vertices:6 edges:6] gremlin> import com.tinkerpop.frames.* ==>import com.tinkerpop.gremlin.* ==>import com.tinkerpop.gremlin.java.* ==>import com.tinkerpop.gremlin.pipes.filter.* ... ==>import groovy.grape.grape ==>import com.tinkerpop.frames.* gremlin> import com.tinkerpop.frames.modules.gremlingroovy.* ==>import com.tinkerpop.gremlin.* ==>import com.tinkerpop.gremlin.java.* ==>import com.tinkerpop.gremlin.pipes.filter.* ==>import com.tinkerpop.gremlin.pipes.sideeffect.* ... gremlin> factory = new framedgraphfactory(new gremlingroovymodule()); ==>com.tinkerpop.frames.framedgraphfactory@645c1312 omit use of grape @ start if have jar copied, though if copy make sure have frames dependencies , not frames jar (grape hides such things you).
Comments
Post a Comment