Date   

Re: TimedOutException

Ankur Goel <ankur...@...>
 

check if thrift is enable, in 2.2 or above use below command:

./bin/nodetool enablethrift

~AnkurG
 


On Friday, April 28, 2017 at 8:53:30 PM UTC+5:30, Gwiz wrote:
When I try to open a graph, I am constantly getting the TimeOutExceptions.  My Cassandra Cluster is fine and I was able to use cqlsh with no issues. Are there any Thrift settings that need to be adjusted?

graph = JanusGraphFactory.open('cassandra-es.properties')

Caused by: TimedOutException()
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result$multiget_slice_resultStandardScheme.read(Cassandra.java:14696)
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result$multiget_slice_resultStandardScheme.read(Cassandra.java:14633)
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result.read(Cassandra.java:14559)
        at org
.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
        at org
.apache.cassandra.thrift.Cassandra$Client.recv_multiget_slice(Cassandra.java:741)
        at org
.apache.cassandra.thrift.Cassandra$Client.multiget_slice(Cassandra.java:725)
        at org
.janusgraph.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.getNamesSlice(CassandraThriftKeyColumnValueStore.java:143)
       
... 44 more


If I try few times, I succeed once randomly. 

Thanks


Re: How do I display all results?

Robert Dale <rob...@...>
 

On Mon, Sep 11, 2017 at 7:27 PM, Rohit Jain <rohit.j...@...> wrote:
When I execute a Gremlin query it will not display all the results.  It displays 100 lines of output and follows that with ...
How do I have it list all the output, or even direct the output to a log file?

Rohit

--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/89cb27ae-5052-4306-a0be-5197a9cc2d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I display all results?

Rohit Jain <rohit.j...@...>
 

When I execute a Gremlin query it will not display all the results.  It displays 100 lines of output and follows that with ...
How do I have it list all the output, or even direct the output to a log file?

Rohit


Re: TimedOutException

Annu Sharma <annu...@...>
 

Hi, 

Have you been able to resolve this issue?


On Friday, April 28, 2017 at 8:23:30 AM UTC-7, Gwiz wrote:
When I try to open a graph, I am constantly getting the TimeOutExceptions.  My Cassandra Cluster is fine and I was able to use cqlsh with no issues. Are there any Thrift settings that need to be adjusted?

graph = JanusGraphFactory.open('cassandra-es.properties')

Caused by: TimedOutException()
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result$multiget_slice_resultStandardScheme.read(Cassandra.java:14696)
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result$multiget_slice_resultStandardScheme.read(Cassandra.java:14633)
        at org
.apache.cassandra.thrift.Cassandra$multiget_slice_result.read(Cassandra.java:14559)
        at org
.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
        at org
.apache.cassandra.thrift.Cassandra$Client.recv_multiget_slice(Cassandra.java:741)
        at org
.apache.cassandra.thrift.Cassandra$Client.multiget_slice(Cassandra.java:725)
        at org
.janusgraph.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.getNamesSlice(CassandraThriftKeyColumnValueStore.java:143)
       
... 44 more


If I try few times, I succeed once randomly. 

Thanks


Custom attribute serializer

J MacNaught <jma...@...>
 

Hi all,

I'm porting my application from Titan to JanusGraph.

I was able to define a custom serializer for certain Java types, for example, ArrayList.

I cannot get this to work in JanusGraph.

I have this in my configuration: 

root.attributes.custom.attribute1.attribute-class=java.util.HashMap
root.attributes.custom.attribute1.serializer-class=com.ibm.research.psyche.core.serializer.GenericSerializer
root.attributes.custom.attribute2.attribute-class = java.util.LinkedHashMap
root.attributes.custom.attribute2.serializer-class = com.ibm.research.psyche.core.serializer.GenericSerializer
root.attributes.custom.attribute3.attribute-class = java.util.ArrayList
root.attributes.custom.attribute3.serializer-class = com.ibm.research.psyche.core.serializer.GenericSerializer
root.attributes.custom.attribute4.attribute-class = java.util.LinkedList
root.attributes.custom.attribute4.serializer-class = com.ibm.research.psyche.core.serializer.GenericSerializer


I get this error when defining the property:

java.lang.IllegalArgumentException: Not a supported data type: class java.util.ArrayList

at com.google.common.base.Preconditions.checkArgument(Preconditions.java:120) ~[guava-15.0.jar:?]

at org.janusgraph.graphdb.types.StandardPropertyKeyMaker.make(StandardPropertyKeyMaker.java:93) ~[janusgraph-core-0.1.1.jar:?]

.....



Are custom attributes supported anymore?

Note that the Configuration Reference in the documentations says that the option name should be this: 

attributes.custom.[X].attribute-class

But you get this error: java.lang.IllegalStateException: Need to set configuration value: root.attributes.custom.attribute-class


Thanks!


Re: unique index per label

Robert Dale <rob...@...>
 



When a composite index with label restriction is defined as unique, the uniqueness constraint only applies to properties on vertices or edges for the specified label.


Robert Dale

On Mon, Sep 11, 2017 at 9:32 AM, Ankur Goel <ankur...@...> wrote:
Unique index is globally.

~AnkurG


On Monday, September 11, 2017 at 4:45:01 PM UTC+5:30, ya...@... wrote:
As I understand labels are used for partitioning. Does the same apply for clustering?

I.E I create vertices and edges with custom properties. Assume I have a unique property called: 'nodeId'.

Now I have logical groups. each group has a UUID. I use this UUID as the vertex label.

Can I create 2 different vertices with the same nodeId if they are assigned different labels? Or is the unique index global to all labels?


--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/f46ec589-a3fe-4608-bcbd-0d0e1bdcf1f3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Re: Graph visualization open source tool or framework

Misha Brukman <mbru...@...>
 

Please see this earlier answer to a similar question.

On Mon, Sep 11, 2017 at 3:56 AM, Ankur Goel <ankur...@...> wrote:
Hi,

Like Neo4j has inbuilt graph visualization tool or datastax has studio;  keylines is good  framework to draw graph.

Do we have similar kind of open source tool/framework for JanusGraph.

~AnkurG

--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/fc1fc966-0501-4962-8a7d-52671129d38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: similar edges and how to prevent them

Daniel Kuppitz <me@...>
 

I guess the point is, that the edge's direction doesn't matter. Hence it should be more like:

g.V().has(instanceId, "nodeId", nodeA).as("a").
  V().has(instanceId, "nodeId", nodeB).
  coalesce(bothE("link").where(otherV().as("a")),
           addE("link").to("a"))

...or, if performance matters, don't enable path computations (using otherV):

g.V().has(instanceId, "nodeId", nodeA).as("a").
  V().has(instanceId, "nodeId", nodeB).
  coalesce(outE("link").where(inV().as("a")),
           inE("link").where(outV().as("a")),
           addE("link").to("a"))

Cheers,
Daniel


On Mon, Sep 11, 2017 at 3:32 AM, <tpr...@...> wrote:
You can use coalesce step to do a check or insert query.
http://tinkerpop.apache.org/docs/current/reference/#coalesce-step
Something like g.V(idTo).as('to').V(idFrom).coalesce(__.outE('labelE').has('id',idValue),
     __.addE('labelE').property('id',idvalue).to('to'))

--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/020a1758-af67-4510-9860-90bc7b470709%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding a bunch of Vertices and edges takes for ever

Ankur Goel <ankur...@...>
 

You are using unique(), this takes lock for each operation. Try to handle uniqueness through application instead of Janus.

~AnkurG


On Monday, September 11, 2017 at 1:33:07 PM UTC+5:30, ya...@... wrote:
I am writing an app that loads an existing RDBMS based graph implementation into JanusGraph.

I create this index:

        JanusGraphManagement mgmt = javaGraph.openManagement();
        if (mgmt.containsPropertyKey("nodeId")) {
            nodeId = mgmt.getPropertyKey("nodeId");
        } else {
            nodeId = mgmt.makePropertyKey("nodeId").dataType(Integer.class).make();
        }

        if(!mgmt.containsGraphIndex("nodeIdInd")){
            JanusGraphManagement.IndexBuilder nodeIdIndexBuilder = mgmt.buildIndex("nodeIdInd", Vertex.class).addKey(nodeId);
            nodeIdIndexBuilder.unique();
            JanusGraphIndex nodeIdIdx = nodeIdIndexBuilder.buildCompositeIndex();
        }


        mgmt.commit();


Creating the vertices and edges (~6K vertices and ~40K edges) takes a very long time.

Am I missing something?






Re: unique index per label

Ankur Goel <ankur...@...>
 

Unique index is globally.

~AnkurG


On Monday, September 11, 2017 at 4:45:01 PM UTC+5:30, ya...@... wrote:
As I understand labels are used for partitioning. Does the same apply for clustering?

I.E I create vertices and edges with custom properties. Assume I have a unique property called: 'nodeId'.

Now I have logical groups. each group has a UUID. I use this UUID as the vertex label.

Can I create 2 different vertices with the same nodeId if they are assigned different labels? Or is the unique index global to all labels?



unique index per label

yair...@...
 

As I understand labels are used for partitioning. Does the same apply for clustering?

I.E I create vertices and edges with custom properties. Assume I have a unique property called: 'nodeId'.

Now I have logical groups. each group has a UUID. I use this UUID as the vertex label.

Can I create 2 different vertices with the same nodeId if they are assigned different labels? Or is the unique index global to all labels?



Re: similar edges and how to prevent them

tpr...@...
 

You can use coalesce step to do a check or insert query.
http://tinkerpop.apache.org/docs/current/reference/#coalesce-step
Something like g.V(idTo).as('to').V(idFrom).coalesce(__.outE('labelE').has('id',idValue),
__.addE('labelE').property('id',idvalue).to('to'))


Re: Adding a bunch of Vertices and edges takes for ever

yair...@...
 

I should add I do this query (to eliminate duplicate vertices) before adding each Vertex as I know that in the existing RDBMS same nodes exist multiple times:

javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", nodeInfo.getId());

        if (vertexNode.hasNext()) {
            return vertexNode.next();
        } else {
            JanusGraphVertex node = javaGraph.addVertex(instanceId/*, T.id,((Integer)id).longValue()*/);
            node.property("nodeId", id);
            return node;
        }

Do I need to index the label as well?

Any other ideas?


On Monday, September 11, 2017 at 11:03:07 AM UTC+3, ya...@... wrote:
I am writing an app that loads an existing RDBMS based graph implementation into JanusGraph.

I create this index:

        JanusGraphManagement mgmt = javaGraph.openManagement();
        if (mgmt.containsPropertyKey("nodeId")) {
            nodeId = mgmt.getPropertyKey("nodeId");
        } else {
            nodeId = mgmt.makePropertyKey("nodeId").dataType(Integer.class).make();
        }

        if(!mgmt.containsGraphIndex("nodeIdInd")){
            JanusGraphManagement.IndexBuilder nodeIdIndexBuilder = mgmt.buildIndex("nodeIdInd", Vertex.class).addKey(nodeId);
            nodeIdIndexBuilder.unique();
            JanusGraphIndex nodeIdIdx = nodeIdIndexBuilder.buildCompositeIndex();
        }


        mgmt.commit();


Creating the vertices and edges (~6K vertices and ~40K edges) takes a very long time.

Am I missing something?






Adding a bunch of Vertices and edges takes for ever

yair...@...
 

I am writing an app that loads an existing RDBMS based graph implementation into JanusGraph.

I create this index:

        JanusGraphManagement mgmt = javaGraph.openManagement();
        if (mgmt.containsPropertyKey("nodeId")) {
            nodeId = mgmt.getPropertyKey("nodeId");
        } else {
            nodeId = mgmt.makePropertyKey("nodeId").dataType(Integer.class).make();
        }

        if(!mgmt.containsGraphIndex("nodeIdInd")){
            JanusGraphManagement.IndexBuilder nodeIdIndexBuilder = mgmt.buildIndex("nodeIdInd", Vertex.class).addKey(nodeId);
            nodeIdIndexBuilder.unique();
            JanusGraphIndex nodeIdIdx = nodeIdIndexBuilder.buildCompositeIndex();
        }


        mgmt.commit();


Creating the vertices and edges (~6K vertices and ~40K edges) takes a very long time.

Am I missing something?






Graph visualization open source tool or framework

Ankur Goel <ankur...@...>
 

Hi,

Like Neo4j has inbuilt graph visualization tool or datastax has studio;  keylines is good  framework to draw graph.

Do we have similar kind of open source tool/framework for JanusGraph.

~AnkurG


Re: similar edges and how to prevent them

yair...@...
 





One Option I thought of that should have worked but doesn't is:

Assuming I have a method to create between 'from' vertex and 'to' vertex:



       
Iterator<Edge> edgesIter = from.edges(Direction.OUT, "link");


       
while (edgesIter.hasNext()) {
           
Edge edge = edgesIter.next();
           
Vertex outVertex = edge.outVertex();
           
if(outVertex.property("nodeId").value().equals(to.property("nodeId").value())){
               
return edge;
           
}


       
}
        org
.apache.tinkerpop.gremlin.structure.Edge linkedEdge = from.addEdge("link", to);
       
return linkedEdge;


I still get duplicate edges when I re-run my app. and yes I do commit the tx after i'm done.

Any ideas?


On Monday, September 11, 2017 at 9:53:49 AM UTC+3, ya...@... wrote:

I have an app where I am migration a d non graph DB graph to Janus. So I create the graph when I first start the app. Using cassandra backend.

I have an issue where 2 vertices have "identical" edges (besides the auto-generated id of course) are created in my code causing me to get too many IN and OUT edges.

I read my vertex like this:


javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", lineageNodeId).toList();




I read Both edges:

vertex.edges(org.apache.tinkerpop.gremlin.structure.Direction.IN, "link");


vertex
.edges(org.apache.tinkerpop.gremlin.structure.Direction.OUT, "link");


each time I run my app it doesn't "see" the existing edges and adds to it. so I get edges multiplies while I only want "link" edge between any 2 given vertices

in order to make sure I don't create duplicate vertices:


        GraphTraversal<Vertex, Vertex> vertexNode = javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", myNodeId);
        if (vertexNode.hasNext()) {
            return vertexNode.next();
        } else {            

            JanusGraphVertex node = javaGraph.addVertex(instanceId);
            node.property("nodeId", myNodeId);
            return node;
        }



But I don't know once I have vertex A and B at hand - how to verify they are not already connected.







similar edges and how to prevent them

yair...@...
 


I have an app where I am migration a d non graph DB graph to Janus. So I create the graph when I first start the app. Using cassandra backend.

I have an issue where 2 vertices have "identical" edges (besides the auto-generated id of course) are created in my code causing me to get too many IN and OUT edges.

I read my vertex like this:


javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", lineageNodeId).toList();




I read Both edges:

vertex.edges(org.apache.tinkerpop.gremlin.structure.Direction.IN, "link");


vertex
.edges(org.apache.tinkerpop.gremlin.structure.Direction.OUT, "link");


each time I run my app it doesn't "see" the existing edges and adds to it. so I get edges multiplies while I only want "link" edge between any 2 given vertices

in order to make sure I don't create duplicate vertices:


        GraphTraversal<Vertex, Vertex> vertexNode = javaGraph.traversal().V().hasLabel(instanceId).has("nodeId", myNodeId);
        if (vertexNode.hasNext()) {
            return vertexNode.next();
        } else {            

            JanusGraphVertex node = javaGraph.addVertex(instanceId);
            node.property("nodeId", myNodeId);
            return node;
        }



But I don't know once I have vertex A and B at hand - how to verify they are not already connected.







Graph DB Meetup 9/19

Ioannis Papapanagiotou <idu...@...>
 

Hello,

Netflix is hosting a Graph Database meetup on Sep 19: https://www.meetup.com/Graph-Databases-and-Frameworks/events/243156558/

Join us to learn how Netflix deployed TitanDB (the predecessor of JanusGraph) at scale. Many of these lessons will drive us to our future JanusGraph deployment. Moreover, Xavier Llorà from Google will also talk about their temporal graph database named BadWolf.

Refreshments and drinks and a lot of networking!

Thank you,

Ioannis Papapanagiotou, PhD

Cloud Database Engineering

AgdHAae.png


Re: janusgraph a lot of time for a complete scan of graph conating 100K vertices

HadoopMarc <marc.d...@...>
 

Hi Himanshu,

g.V().count() requires a full table scan, so normally you would use an OLAP query for that. Unfortunately, OLAP queries with HBase also still have some performance issues, see:


You could also try a direct index query to the ES backend, no idea how that will perform for you:

Op vrijdag 8 september 2017 15:28:23 UTC+2 schreef Himanshu Mishra:

Hi all,

I have a Janusgraph with more than 100K vertices.
When I try to retrieve all the vertices through a java code using a gremlin query, it takes more than 10 mins to list all the vertices.

I am using hbase as backend source, and elastic search for searching.

Thanks,
Himanshu


janusgraph a lot of time for a complete scan of graph conating 100K vertices

hmdc...@...
 

Hi all,

I have a Janusgraph with more than 100K vertices.
When I try to retrieve all the vertices through a java code using a gremlin query, it takes more than 10 mins to list all the vertices.

I am using hbase as backend source, and elastic search for searching.

Thanks,
Himanshu

5941 - 5960 of 6678