|
Re: Gremlin Query to return count for nodes and edges
Hi All,
The query shared by HadoopMarc works. The query, I executed returns 752650 nodes and 297302 edges as a count. The time taken is around 1min. Is there any way to optimize it further ???
Thank
Hi All,
The query shared by HadoopMarc works. The query, I executed returns 752650 nodes and 297302 edges as a count. The time taken is around 1min. Is there any way to optimize it further ???
Thank
|
By
Vinayak Bali
·
#5630
·
|
|
Re: Gremlin Query to return count for nodes and edges
Good query from @hadoopmarcand I like @cmilowka's suggestion, although I needed to modify it veryslightly as follows:
g.V().hasLabel('A').union(__.count(), __.outE().count(), __.outE().inV().count()
Good query from @hadoopmarcand I like @cmilowka's suggestion, although I needed to modify it veryslightly as follows:
g.V().hasLabel('A').union(__.count(), __.outE().count(), __.outE().inV().count()
|
By
Graham Wallis <graham_wallis@...>
·
#5629
·
|
|
JanusGraphIndex how to retrieve constraint (indexOnly) specified for the global index?
Global indexes can be limited to the "constraint" by indexOnly() step, from JanusGraph documentation:
mgmt.buildIndex('byNameAndLabel',
Global indexes can be limited to the "constraint" by indexOnly() step, from JanusGraph documentation:
mgmt.buildIndex('byNameAndLabel',
|
By
cmilowka
·
#5628
·
|
|
Re: Gremlin Query to return count for nodes and edges
It may work as well, to count totals of all in and out edges for "A" label:
g.V().hasLabel('A').union( __.count(), __. outE().count(), __.inV().count() )
It may work as well, to count totals of all in and out edges for "A" label:
g.V().hasLabel('A').union( __.count(), __. outE().count(), __.inV().count() )
|
By
cmilowka
·
#5627
·
|
|
Re: Gremlin Query to return count for nodes and edges
Hi Vinayak,
A new attempt:
g = TinkerFactory.createModern().traversal()
g.withSideEffect('vs', new HashSet()).withSideEffect('es', new HashSet()).
Hi Vinayak,
A new attempt:
g = TinkerFactory.createModern().traversal()
g.withSideEffect('vs', new HashSet()).withSideEffect('es', new HashSet()).
|
By
hadoopmarc@...
·
#5626
·
|
|
Re: Changing graphname at runtime
You really have to try this out and see. I can only answer from what I read in the ref docs.
> Do I need to ConfiguredGraphFactory.close(GRAPH) before I update its configuration?
The docs say the
You really have to try this out and see. I can only answer from what I read in the ref docs.
> Do I need to ConfiguredGraphFactory.close(GRAPH) before I update its configuration?
The docs say the
|
By
hadoopmarc@...
·
#5625
·
|
|
Re: Gremlin Query to return count for nodes and edges
Hi Graham,
Tried itm the output is as
Hi Graham,
Tried itm the output is as
|
By
Vinayak Bali
·
#5624
·
|
|
Re: Gremlin Query to return count for nodes and edges
Hi Vinayak
You could do this:
g.V().hasLabel('A').as('a').outE().as('e').inV().as('b').select('a','e','b').by(count())
That should producesomething like:
==>{a=1, e=1,b=1}
Best regards,
Hi Vinayak
You could do this:
g.V().hasLabel('A').as('a').outE().as('e').inV().as('b').select('a','e','b').by(count())
That should producesomething like:
==>{a=1, e=1,b=1}
Best regards,
|
By
Graham Wallis <graham_wallis@...>
·
#5623
·
|
|
Re: Gremlin Query to return count for nodes and edges
Hi Marc,
I am using the following query to return the results.
g.V().hasLabel('A').as('a').outE().as('e').inV().as('b').select('a','e','b').by(valueMap().by(unfold()))
Want the count of unique nodes
Hi Marc,
I am using the following query to return the results.
g.V().hasLabel('A').as('a').outE().as('e').inV().as('b').select('a','e','b').by(valueMap().by(unfold()))
Want the count of unique nodes
|
By
Vinayak Bali
·
#5622
·
|
|
Re: Gremlin Query to return count for nodes and edges
Hi Vinayak,
Try:
g.V().project('v', 'vcount', 'ecount').by(identity()).by(count()).by(bothE().count())
Best wishes, Marc
Hi Vinayak,
Try:
g.V().project('v', 'vcount', 'ecount').by(identity()).by(count()).by(bothE().count())
Best wishes, Marc
|
By
hadoopmarc@...
·
#5621
·
|
|
Gremlin Query to return count for nodes and edges
Hi All,
Wanted to return the count of nodes and edges returned by the query. Tired a few queries but they are not working. Can someone please share a single query, which returns both the count?
Thanks
Hi All,
Wanted to return the count of nodes and edges returned by the query. Tired a few queries but they are not working. Can someone please share a single query, which returns both the count?
Thanks
|
By
Vinayak Bali
·
#5620
·
|
|
Re: Changing graphname at runtime
OK, so that I'm clear, what you're suggesting is that I try something like:
// Create and open main graph
map = new HashMap();
map.put("storage.backend", “hbase);
map.put("storage.hostname",
OK, so that I'm clear, what you're suggesting is that I try something like:
// Create and open main graph
map = new HashMap();
map.put("storage.backend", “hbase);
map.put("storage.hostname",
|
By
Diglio A. Simoni
·
#5619
·
|
|
Re: Janusgraph 0.5.3 potential memory leak
Sadly, that quick fix is not only fast but also incorrect. It requires to iterate the `Iterator` twice which causes incorrect results.
Sadly, that quick fix is not only fast but also incorrect. It requires to iterate the `Iterator` twice which causes incorrect results.
|
By
rngcntr
·
#5618
·
Edited
|
|
Re: Changing graphname at runtime
Is this what you are looking for (it includes an explicit example):
https://docs.janusgraph.org/basics/configured-graph-factory/#updating-configurations
You can version your graph in the storage and
Is this what you are looking for (it includes an explicit example):
https://docs.janusgraph.org/basics/configured-graph-factory/#updating-configurations
You can version your graph in the storage and
|
By
hadoopmarc@...
·
#5617
·
|
|
Changing graphname at runtime
Note: I cross-posted this to https://groups.google.com/g/gremlin-users so that I can reach a broader audience, so if you're a member of both groups, please receive my apologies!
Hello,
I have a
Note: I cross-posted this to https://groups.google.com/g/gremlin-users so that I can reach a broader audience, so if you're a member of both groups, please receive my apologies!
Hello,
I have a
|
By
Diglio A. Simoni
·
#5616
·
|
|
Re: Inconsistent composite index status after transaction failure
Try this (v is the ghost vertex):
Iterator<JanusGraphRelation> iterator = v.query().noPartitionRestriction().relations().iterator();
while (iterator.hasNext()) {
iterator.next();
Try this (v is the ghost vertex):
Iterator<JanusGraphRelation> iterator = v.query().noPartitionRestriction().relations().iterator();
while (iterator.hasNext()) {
iterator.next();
|
By
Boxuan Li
·
#5615
·
|
|
Re: REINDEXING Big Graph
Hi Abhay,
The hadoop client picks up configs from the JVM classpath. So, simply add /etc/hadoop/conf (or some other folder that keeps the hdfs-site.xml and other cluster configs) to your classpath.
Hi Abhay,
The hadoop client picks up configs from the JVM classpath. So, simply add /etc/hadoop/conf (or some other folder that keeps the hdfs-site.xml and other cluster configs) to your classpath.
|
By
hadoopmarc@...
·
#5614
·
|
|
REINDEXING Big Graph
Hi Team,
Currently I am trying to REINDEX using Hadoop Mapreduce using the reference from Janus document.
https://docs.janusgraph.org/index-management/index-reindexing/#reindex-example-on-mapreduce
I
Hi Team,
Currently I am trying to REINDEX using Hadoop Mapreduce using the reference from Janus document.
https://docs.janusgraph.org/index-management/index-reindexing/#reindex-example-on-mapreduce
I
|
By
Abhay Pandit
·
#5613
·
|
|
Re: Janusgraph 0.5.3 potential memory leak
Hey @mad, thanks for your benchmark code! I ran a few experiments with it today and figured out that creating an Iterable from the Iterator seems to already solve the problem. I added the following
Hey @mad, thanks for your benchmark code! I ran a few experiments with it today and figured out that creating an Iterable from the Iterator seems to already solve the problem. I added the following
|
By
rngcntr
·
#5612
·
Edited
|
|
Re: Inconsistent composite index status after transaction failure
I already tried to delete it both trying to reference the actual vertex id or using the query based on the "inconsistent" index, but in both cases it doesn't work (drop function return correctly as it
I already tried to delete it both trying to reference the actual vertex id or using the query based on the "inconsistent" index, but in both cases it doesn't work (drop function return correctly as it
|
By
simone3.cattani@...
·
#5611
·
|