Date   

Re: filtering a path

Daniel Kuppitz <me@...>
 

even those in between start and end

Does that mean you want to exclude the whole path or only matching vertices on the path? If the latter, then what about the edges? Taking out a single vertex leaves 2 invalid edges on the path.
If the former, then it's:

...repeat(outE().inV().has("num", gt(50)).simplePath())...

Cheers,
Daniel
 

On Wed, Aug 30, 2017 at 6:34 AM, <yair...@...> wrote:
What's the best way to filter a path based on a Vertex property.

I am using the gremlin-scala lib.

This is the code:

val paths = startVertex.asScala().start()
      .repeat(_.outE().inV().simplePath())
      .until(_.is(endVertex.vertex))
      .path()
      .toList()


This works great. Now I want to add a filter that will filter out any Vertexes (even those in between start and end) in the path where property("num") > 50.

Seems that the filter API is only for the End Vertex? 

--
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.
For more options, visit https://groups.google.com/d/optout.


filtering a path

yair...@...
 

What's the best way to filter a path based on a Vertex property.

I am using the gremlin-scala lib.

This is the code:

val paths = startVertex.asScala().start()
      .repeat(_.outE().inV().simplePath())
      .until(_.is(endVertex.vertex))
      .path()
      .toList()


This works great. Now I want to add a filter that will filter out any Vertexes (even those in between start and end) in the path where property("num") > 50.

Seems that the filter API is only for the End Vertex? 


Scala client

yair...@...
 

Does anyone know of a good scala client?

Shold I use 'gremlin-scala_2.12'?


Janus Graph benchmarking

nav...@...
 

Hello, 

Can someone let me know if there is a benchmarking tool for Graph Dbs (particularly for JanusGraph) like YCSB for NOSQL databases and Cassandra-Stress specific tp Cassandra Db. 
Anyone using JanusGraph in production or even development stage with data size big enough for benchmark might have tried this, and i am wondering how are they measuring the performance of their graph engine.

Thanks.
Naveen


Re: New committer: David Clement

sju...@...
 

Welcome, David! It's great to have you on board!


On Tuesday, August 29, 2017 at 9:20:12 AM UTC-5, Jason Plurad wrote:
On behalf of the JanusGraph Technical Steering Committee (TSC), I'm pleased to welcome a new committer on the project!

David Clement has submitted several good pull requests which enhanced the functionality for the indexing backends, both ES and Solr. He has been thorough and quite responsive to the feedback offered in the reviews.


Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 

Thank you for looking into this for me. In general, Janus seems pretty spiffy. Nice work done here so far.


On Tuesday, August 29, 2017 at 4:57:44 PM UTC-4, Jason Plurad wrote:
Thanks for the reproduce scenario.
I opened up an issue to track this https://github.com/JanusGraph/janusgraph/issues/487

On Tuesday, August 29, 2017 at 12:50:54 PM UTC-4, David Brown wrote:
For the record, the output of the same script when run against TinkerGraph 3.2.6 is as expected:

properties: [{'string_prop': [vp[string_prop->dave]], 'integer_prop': [vp[integer_prop->1]], 'float_prop': [vp[float_prop->1.1]]}]
string prop: [vp[string_prop->dave]]
float_prop: [vp[float_prop->1.1]]
integer_prop: [vp[integer_prop->1]]


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

Jason Plurad <plu...@...>
 

Thanks for the reproduce scenario.
I opened up an issue to track this https://github.com/JanusGraph/janusgraph/issues/487


On Tuesday, August 29, 2017 at 12:50:54 PM UTC-4, David Brown wrote:
For the record, the output of the same script when run against TinkerGraph 3.2.6 is as expected:

properties: [{'string_prop': [vp[string_prop->dave]], 'integer_prop': [vp[integer_prop->1]], 'float_prop': [vp[float_prop->1.1]]}]
string prop: [vp[string_prop->dave]]
float_prop: [vp[float_prop->1.1]]
integer_prop: [vp[integer_prop->1]]


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: New committer: David Clement

Jerry He <jerr...@...>
 

Congrats and welcome, David!


On Tue, Aug 29, 2017 at 7:20 AM Jason Plurad <plu...@...> wrote:
On behalf of the JanusGraph Technical Steering Committee (TSC), I'm pleased to welcome a new committer on the project!

David Clement has submitted several good pull requests which enhanced the functionality for the indexing backends, both ES and Solr. He has been thorough and quite responsive to the feedback offered in the reviews.

--
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.
For more options, visit https://groups.google.com/d/optout.


Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 

For the record, the output of the same script when run against TinkerGraph 3.2.6 is as expected:

properties: [{'string_prop': [vp[string_prop->dave]], 'integer_prop': [vp[integer_prop->1]], 'float_prop': [vp[float_prop->1.1]]}]
string prop: [vp[string_prop->dave]]
float_prop: [vp[float_prop->1.1]]
integer_prop: [vp[integer_prop->1]]


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 

Ok, I built from source. It appears that this is happening specifically with properties defined as Floats. The following script in gremlin_python (3.2.6) illustrates this problem:
from gremlin_python.driver.client import Client
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.structure.graph import Graph
from gremlin_python.process.traversal import Cardinality


client = Client('ws://localhost:8182/gremlin', 'g')
rc = DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')
g = Graph().traversal().withRemote(rc)

schema_msg = """mgmt = graph.openManagement()
                string_prop = mgmt.makePropertyKey('string_prop').dataType(String.class).cardinality(Cardinality.LIST).make()
                float_prop = mgmt.makePropertyKey('float_prop').dataType(Float.class).cardinality(Cardinality.LIST).make()
                integer_prop = mgmt.makePropertyKey('integer_prop').dataType(Integer.class).cardinality(Cardinality.LIST).make()
                mgmt.commit()"""

client.submit(schema_msg)


v = g.addV('person').property(Cardinality.list_, 'string_prop', 'dave')\
                    .property(Cardinality.list_,'float_prop', 1.1)\
                    .property(Cardinality.list_,'integer_prop', 1).next()
props = g.V(v.id).propertyMap().toList()
print("properties: {}".format(props))
string_prop = g.V(v.id).properties('string_prop').hasValue('dave').toList()
print("string prop: {}".format(string_prop))
float_prop = g.V(v.id).properties('float_prop').hasValue(1.1).toList()
print("float_prop: {}".format(float_prop))
integer_prop = g.V(v.id).properties('integer_prop').hasValue(1).toList()
print("integer_prop: {}".format(integer_prop))

The output of this script is:

properties: [{'integer_prop': [vp[integer_prop->1]], 'float_prop': [vp[float_prop->1.1]], 'string_prop': [vp[string_prop->dave]]}]
string prop: [vp[string_prop->dave]]
float_prop: []
integer_prop: [vp[integer_prop->1]]

Am I missing something here? Or is there a problem with floats and the hasValue step? Or maybe this is gremlin_python specific...

On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

Jason Plurad <plu...@...>
 

Would you be able to test your scenario against JanusGraph master branch? It's running TP 3.2.6.


On Tuesday, August 29, 2017 at 10:30:00 AM UTC-4, David Brown wrote:
A bit of a follow up on this. I have determined that the source of my problem relates to selecting an individual vertex property from a list cardinality property. I use this traversal: g.V(v).properties('key').hasValue(val).next(). If `val` is anything other than a string, this query returns nothing. It works fine with string type properties. For the record, I am using gremlin-python based code to remote the db, and I think the current Janus only tests against TP 3.2.3 (which is pre gremlin-python). My code runs as expected against TP 3.2.4 + with TinkerGraph.

On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 

A bit of a follow up on this. I have determined that the source of my problem relates to selecting an individual vertex property from a list cardinality property. I use this traversal: g.V(v).properties('key').hasValue(val).next(). If `val` is anything other than a string, this query returns nothing. It works fine with string type properties. For the record, I am using gremlin-python based code to remote the db, and I think the current Janus only tests against TP 3.2.3 (which is pre gremlin-python). My code runs as expected against TP 3.2.4 + with TinkerGraph.


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 



On Monday, August 28, 2017 at 4:01:40 PM UTC-4, David Brown wrote:
Thanks for the quick replies. Thanks to the examples, I've determined this is a bug in Goblin.

On Monday, August 28, 2017 at 2:07:38 PM UTC-4, Jason Plurad wrote:
I opened up an issue to add docs on meta-properties and multi-properties.

This worked in the Gremlin Console:

gremlin> graph = JanusGraphFactory.build().set('storage.backend', 'inmemory').set('schema.default', 'none').open()
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin
> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@7a360554
gremlin
> name = mgmt.makePropertyKey('name').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>name
gremlin
> foo = mgmt.makePropertyKey('foo').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>foo
gremlin
> mgmt.commit()
==>null
gremlin
> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin
> v = g.addV('name', 'dave').next()
==>v[4232]
gremlin
> g.V(v).properties('name').property('foo', 'bar').iterate()
gremlin
> g.V(v).valueMap(true)
==>[label:vertex,id:4232,name:[dave]]
gremlin
> g.V(v).properties('name').valueMap(true)
==>[value:dave,id:sx-39k-sl,foo:bar,key:name]
gremlin
> g.V(v).properties('name').property('bla', 'dat').iterate()
Property Key with given name does not exist: bla

Were you trying something different?


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


New committer: David Clement

Jason Plurad <plu...@...>
 

On behalf of the JanusGraph Technical Steering Committee (TSC), I'm pleased to welcome a new committer on the project!

David Clement has submitted several good pull requests which enhanced the functionality for the indexing backends, both ES and Solr. He has been thorough and quite responsive to the feedback offered in the reviews.


extras that provide business value

an...@...
 

Janus is such a compelling database to switch to. Right now we use Neo4j. There are a couple of features that neo4j has that are very useful and I was wondering if they are on the roadmap for Janus?

1. bulk uploading via csv files. the neo4j import tool is powerful; its like a language dedicated for bulk loading existing data. there are many cases where this is a must have.
2. data visualization via browser. pretty data visualizations make everyone happy



Re: Proper way to define metaproperties in schema

David Brown <dave...@...>
 

Thanks for the quick replies. Thanks to the examples, I've determined this is a bug in Goblin.


On Monday, August 28, 2017 at 2:07:38 PM UTC-4, Jason Plurad wrote:
I opened up an issue to add docs on meta-properties and multi-properties.

This worked in the Gremlin Console:

gremlin> graph = JanusGraphFactory.build().set('storage.backend', 'inmemory').set('schema.default', 'none').open()
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin
> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@7a360554
gremlin
> name = mgmt.makePropertyKey('name').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>name
gremlin
> foo = mgmt.makePropertyKey('foo').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>foo
gremlin
> mgmt.commit()
==>null
gremlin
> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin
> v = g.addV('name', 'dave').next()
==>v[4232]
gremlin
> g.V(v).properties('name').property('foo', 'bar').iterate()
gremlin
> g.V(v).valueMap(true)
==>[label:vertex,id:4232,name:[dave]]
gremlin
> g.V(v).properties('name').valueMap(true)
==>[value:dave,id:sx-39k-sl,foo:bar,key:name]
gremlin
> g.V(v).properties('name').property('bla', 'dat').iterate()
Property Key with given name does not exist: bla

Were you trying something different?


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: Proper way to define metaproperties in schema

Jason Plurad <plu...@...>
 

I opened up an issue to add docs on meta-properties and multi-properties.

This worked in the Gremlin Console:

gremlin> graph = JanusGraphFactory.build().set('storage.backend', 'inmemory').set('schema.default', 'none').open()
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin
> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@7a360554
gremlin
> name = mgmt.makePropertyKey('name').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>name
gremlin
> foo = mgmt.makePropertyKey('foo').dataType(String.class).cardinality(Cardinality.SINGLE).make()
==>foo
gremlin
> mgmt.commit()
==>null
gremlin
> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin
> v = g.addV('name', 'dave').next()
==>v[4232]
gremlin
> g.V(v).properties('name').property('foo', 'bar').iterate()
gremlin
> g.V(v).valueMap(true)
==>[label:vertex,id:4232,name:[dave]]
gremlin
> g.V(v).properties('name').valueMap(true)
==>[value:dave,id:sx-39k-sl,foo:bar,key:name]
gremlin
> g.V(v).properties('name').property('bla', 'dat').iterate()
Property Key with given name does not exist: bla

Were you trying something different?


On Monday, August 28, 2017 at 1:44:18 PM UTC-4, David Brown wrote:
Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Proper way to define metaproperties in schema

David Brown <dave...@...>
 

Hello JanusGraph users,

I have been experimenting with Janus, and using the automatic schema generation, metaproperties work as expected. However, when I set `schema.default=none` in the conf and define my own schema, metaproperties seem to quit working--metaproperty data is no longer returned in the Gremlin Server response. How should metaproperties be defined in the schema? I can't seem to find this information in the documentation. I can provide example schema definitions if necessary.

Thanks,

Dave


Re: How can we bulk load the edges while we have the vertexes in our JanusGraph DB?

stan...@...
 

兄弟?加我qq 175501069我们群里也在讨论janusgraph,都在最近第一次用的

在 2017年8月9日星期三 UTC+8下午2:26:33,hu junjie写道:

Assume, we have the vertexes in DB. and we have the edge information in GraphSON/XML/TXT? how can we import the edges into JanusGraph?


Re: JanusGraph seems to force embedded ElasticSearch

Jason Plurad <plu...@...>
 

This commonly happens if you're connecting to a graph instance that was previously created. The initial configuration is stored within the graph itself.

For BerkeleyJE, try pointing storage.directory to a new location or deleting the existing db/berkeley directory.
For Cassandra, try using a different storage.cassandra.keyspace or dropping the existing keyspace.
For HBase, try using a different storage.hbase.table or dropping the existing table.

-- Jason


On Friday, August 25, 2017 at 12:28:27 PM UTC-4, Mike Thomsen wrote:
This is my configuration:

gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=berkeleyje
storage.directory=db/berkeley
index.search.backend=elasticsearch
index.search.hostname=127.0.0.1
index.search.elasticsearch.client-only=true

i loaded it with Gremlin like this:

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

But it insists on creating an embedded ElasticSearch node at db/es despite a remote connection being specified.

What am I doing wrong?

Thanks,

Mike