Pranjal Kumar Gupta
Pranjal Kumar Gupta

Reputation: 1

How to implement PageRank alogorithm in gremlin query language without using graph computer (OLAP transaction)?

I need to implement it without using any methods or graph computer techniques since OLAP graph computer is not supported on gremlin server.

gremlin> g = traversal().withEmbedded(graph).withComputer()
No signature of method: org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.withEmbedded() is applicable for argument types: (org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph) values: [tinkergraph[vertices:360 edges:1671]]
Type ':help' or ':h' for help.
Display stack trace? [yN]

I am getting this error while trying graph computer.

Upvotes: 0

Views: 188

Answers (1)

HadoopMarc
HadoopMarc

Reputation: 1566

You are using a version of gremlin console older than 3.4.9. The exception only says that the withEmbedded method does not exist.

If you use version 3.4.x with x < 9, it will work with:

g = traversal().withGraph(graph).withComputer()

See: https://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/traversal/AnonymousTraversalSource.html

Upvotes: 3

Related Questions