Visualization of JanusGraph with Gephi plugin

341 views
Skip to first unread message

haifa.a...@gmail.com

unread,
Mar 19, 2019, 11:04:22 AM3/19/19
to JanusGraph users

Hello all,

I begin in JanusGraph and Gephi, I follow the instructions of the chapter 3 of JanusGraph to use the Graph of the gods, everything works well. Now I will visualize my graph on Gephi, so I follow the instructions on Tinkerpop.apche using Gephi plugin. The test is ok if I create the graph on gremlin console, but I can’t visualize the graph of the Gods when I tried to submit it to Gephi.

The code I used to load graph

gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')

==>standardjanusgraph[berkeleyje:../db/berkeley]

gremlin> GraphOfTheGodsFactory.load(graph)

==>null

gremlin> g = graph.traversal()

==>graphtraversalsource[standardjanusgraph[berkeleyje:../db/berkeley], standard]

 

The code I tried to use to submit the graph to Gephi

gremlin> :plugin use tinkerpop.gephi

==>tinkerpop.gephi activated

gremlin> graph = TinkerFactory.createModern()

==>tinkergraph[vertices:6 edges:6]

gremlin> :remote connect tinkerpop.gephi

==>Connection to Gephi - http://localhost:8080/workspace1 with stepDelay:1000, startRGBColor:[0.0, 1.0, 0.5], colorToFade:g, colorFadeRate:0.7, startSize:10.0,sizeDecrementRate:0.33

gremlin> :> graph

==>tinkergraph[vertices:6 edges:6]

==>false

Abhay Pandit

unread,
Mar 19, 2019, 11:58:12 PM3/19/19
to janusgra...@googlegroups.com
Hi Haifa,

Try this.

gremlin> :plugin use tinkerpop.gephi

==>tinkerpop.gephi activated

gremlin> :remote connect tinkerpop.gephi

==>Connection to Gephi - http://localhost:8080/workspace1 with stepDelay:1000, startRGBColor:[0.0, 1.0, 0.5], colorToFade:g, colorFadeRate:0.7, startSize:10.0,sizeDecrementRate:0.33


gremlin> :> graph = JanusGraphFactory.open('conf/janusgraph-cql-es.properties');   //here you can load the config file you are using

==>standardjanusgraph[cassandrathrift:[127.0.0.1]]

gremlin> :> GraphOfTheGodsFactory.load(graph);


This worked for me.
Hope it will work for you as well.


Thanks,
Abhay


--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To post to this group, send email to janusgra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/8f17a7bb-d3bd-4867-9475-b88895c9acc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

abdelhak haifa

unread,
Mar 20, 2019, 6:23:43 AM3/20/19
to JanusGraph users
Hi, 
Thank you a lot. 
Now I visualize the graph of gods on Gephi but not all the nodes (not all edges) I have this warning "Adding thi property for key [~T$ShemaName] and value [rt name] violates a uniqueness constraint [SystemIndex #~T$SchemaNam].

Thanks,
Haïfa 

Abhay Pandit

unread,
Mar 20, 2019, 9:50:06 AM3/20/19
to janusgra...@googlegroups.com
Hi Haifa,

As Name property key is already present so its not possible to add same property key twice.
you can just try to add value.
Eg.
g.addV("LabelName").property("name","Haifa");
g.tx().commit();

Thanks,
Abhay




abdelhak haifa

unread,
Mar 21, 2019, 3:47:38 AM3/21/19
to JanusGraph users
Hello Abhay, 
Thank you a lot, it works good.

Haïfa

Abhay Pandit

unread,
Mar 21, 2019, 9:58:11 AM3/21/19
to janusgra...@googlegroups.com
That's cool, enjoy!!

Thanks,
Abhay

abdelhak haifa

unread,
Mar 22, 2019, 11:18:03 AM3/22/19
to JanusGraph users
Thank you
Reply all
Reply to author
Forward
0 new messages