Date   

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


JanusGraph seems to force embedded ElasticSearch

mikert...@...
 

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


Re: hey guys ,how to query a person relational depth

李平 <lipin...@...>
 

ok  thanks   ,another question , how to skip a super vertex ,this vertex has lots of edge ,for example .the phone is 911 or this phone is custom service,  so a lots of people has relation with this vertex , when I query a person two layer relation depth, it will query a lots of person
custom service;


在 2017年8月25日星期五 UTC+8上午2:32:17,Daniel Kuppitz写道:

Any of the following 2 queries should do the trick:

gremlin> g.V().has('name','A').
           repeat(out('hasPhone').in('hasPhone').simplePath()).emit().
           project('name','depth').
             by('name').
             by(path().count(local))
==>[name:C,depth:3]
==>[name:G,depth:3]
==>[name:E,depth:5]

gremlin> g.V().has('name','A').
           repeat(out('hasPhone').in('hasPhone').simplePath().as('x')).emit().
           project('name','depth').
             by('name').
             by(select(all, 'x').count(local))
==>[name:C,depth:1]
==>[name:G,depth:1]
==>[name:E,depth:2]

Pretty much depends on how you define "relation depth".

Cheers,
Daniel




On Wed, Aug 23, 2017 at 7:26 PM, 李平 <li...@...> wrote:
gremlin> g.addV().property('name', 'A').as('a'). addV().property('phone', '110').as('b'). addV().property('name', 'C').as('c'). addV().property('phone', '111').as('d'). addV().property('name', 'E').as('e'). addV().property('phone', '112').as('f'). addV().property('name', 'G').as('g'). addE('hasPhone').from('a').to('b'). addE('hasPhone').from('c').to('d'). addE('hasPhone').from('c').to('b'). addE('hasPhone').from('e').to('d').
addE('hasPhone').from('e').to('f'). addE('hasPhone').from('g').to('b').iterate()



if I want to know vertex A's relation depth how to write the gremlin commond,   

I  write like this 

g.V().has('userId','1').repeat(__.as("a").out().in().where(neq("a"))).emit().path().count(local).max()



but it seem endless loop,
在 2017年8月23日星期三 UTC+8下午9:16:21,Jason Plurad写道:
There's a recipe for this http://tinkerpop.apache.org/docs/current/recipes/#_maximum_depth

On Wednesday, August 23, 2017 at 3:52:14 AM UTC-4, 李平 wrote:
I want to know ,one person in the janusGraph ,his relational depth,use gremlin

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


Re: hey guys ,how to query a person relational depth

Daniel Kuppitz <me@...>
 

Any of the following 2 queries should do the trick:

gremlin> g.V().has('name','A').
           repeat(out('hasPhone').in('hasPhone').simplePath()).emit().
           project('name','depth').
             by('name').
             by(path().count(local))
==>[name:C,depth:3]
==>[name:G,depth:3]
==>[name:E,depth:5]

gremlin> g.V().has('name','A').
           repeat(out('hasPhone').in('hasPhone').simplePath().as('x')).emit().
           project('name','depth').
             by('name').
             by(select(all, 'x').count(local))
==>[name:C,depth:1]
==>[name:G,depth:1]
==>[name:E,depth:2]

Pretty much depends on how you define "relation depth".

Cheers,
Daniel




On Wed, Aug 23, 2017 at 7:26 PM, 李平 <lipin...@...> wrote:
gremlin> g.addV().property('name', 'A').as('a'). addV().property('phone', '110').as('b'). addV().property('name', 'C').as('c'). addV().property('phone', '111').as('d'). addV().property('name', 'E').as('e'). addV().property('phone', '112').as('f'). addV().property('name', 'G').as('g'). addE('hasPhone').from('a').to('b'). addE('hasPhone').from('c').to('d'). addE('hasPhone').from('c').to('b'). addE('hasPhone').from('e').to('d').
addE('hasPhone').from('e').to('f'). addE('hasPhone').from('g').to('b').iterate()



if I want to know vertex A's relation depth how to write the gremlin commond,   

I  write like this 

g.V().has('userId','1').repeat(__.as("a").out().in().where(neq("a"))).emit().path().count(local).max()



but it seem endless loop,
在 2017年8月23日星期三 UTC+8下午9:16:21,Jason Plurad写道:
There's a recipe for this http://tinkerpop.apache.org/docs/current/recipes/#_maximum_depth

On Wednesday, August 23, 2017 at 3:52:14 AM UTC-4, 李平 wrote:
I want to know ,one person in the janusGraph ,his relational depth,use gremlin

--
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.


Versioning the structure of a graph.

Ray Scott <raya...@...>
 

I've seen examples of designing a graph separating structure from state so that its easy to version the state of an entity (vertex) as it's modified through the months and years. However, I've been trying to find a solution to versioning the structure (the edges between the vertices). 

Tinkerpop doesn't support edges linked to edges and you can't add properties on edges with set or list cardinality, so even a basic approach of tagging the edges with a version string is not possible.  

I did think of creating a new edge between the vertices with a different version property on it, but I'd possibly end up with hundreds of edges between two vertices all in the name of versioning the structure. Plus you'd have to bulk update the entire subgraph, so that's not going to happen.

Anyone ever look into this or have any hard-earned wisdom they'd like to depart with? 


Re: Can BulkLoaderVertexProgram also add mixed indexes

mystic m <mita...@...>
 

Thanks Marc, your blog post is helpful.

I started the set-up from scratch but I did replace/added distribution specific jars for hadoop and hbase to be able to interact with maprfs and mapr-db.

Also I was able to get rid of MapR spark-assembly from gremlin CLASSPATH by placing it in hdfs and adding spark-yarn jar to gremlin CLASSPATH. This lets me submit the spark job on yarn. I added the janusgraph-hbase jar and spark-gremlin jars as you have specified in the blog, when spark job starts the jars are copied appropriately to the staging area in hdfs but still I get below listed exception, in last setup I had copied hadoop-gremlin-libs in SPARK_LIB directory across the cluster  to resolve the issue, I am not sure why they are not picked from hdfs directory, I will debug this more tomorrow and post back.

java.lang.ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda to field org.apache.spark.api.java.JavaPairRDD$$anonfun$pairFunToScalaFun$1.x$330 of type org.apache.spark.api.java.function.PairFunction in instance of org.apache.spark.api.java.JavaPairRDD$$anonfun$pairFunToScalaFun$1

        at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2133)



On Thursday, August 24, 2017 at 12:30:58 AM UTC+5:30, HadoopMarc wrote:
Hi m

You might also try the approach I explained in (also discussed in another thread on this forum):

http://yaaics.blogspot.nl/2017/07/configuring-janusgraph-for-spark-yarn.html

Here I show that you do not need the hadoop/hbase/spark jars of your specific distribution. If you get rid of the MapR spark-assembly you do not need the guava shading. The guava shading might be the cause of the ES problems somehow.

HTH,     Marc

Op woensdag 23 augustus 2017 18:56:32 UTC+2 schreef mystic m:
You are right Jason that ElasticSearchIndex  class is in janusgraph-es-0.1.1.jar, also this jar is available in SPARK_EXECUTOR_CLASSPATH on all the nodes, I can see all janusgraph specific jars (lib + plugin folder) in Spark UI Environment tab and also in Yarn logs it gets added to spark classpath.

I will add few more details about the customizations done in our environment if that helps
  1. To enable integration with MapR-DB and mfs, replaced all hadoop/spark/hbase jars bundled with janusgraph plugin with MapR specific jars.
  2. In order to make Bulk Load withSparkGraphComputer work (no mixed indexes), shaded guava plugin in janusgraph-core and janusgraph-hbase-core
  3. Change #2 made Bulk Load run successfully but broke integration with ElasticSearch, even graph = JanusGraphFactory.open('conf/janusgraph-hbase-es.properties') failed with NoClassDefFoundError for ElasticSearchIndex class.
  4. Reverting back to originally bundled jars resolves #3 but breaks Bulk Load
  5. Next I changed janusgraph-hadoop-core pom.xml to comment the test scope for janusgraph-es, which fixed #3 and I was able to execute GraphOfGods example with mixed index, this fix still breaks the Bulk Load (even without mixed index in schema definition.
I know all of above information is too wide in scope to be covered in a single question/discussion, but what I can conclude is that there is some integration issue when we want to use Janusgraph + HBase + Spark  + ES together which needs to be addressed correctly.

I think guava specific conflicts are root to these issues and resolving those correctly is required, If you have any insights to fixing this, please let me know.

~mbaxi



On Wednesday, August 23, 2017 at 6:41:32 PM UTC+5:30, Jason Plurad wrote:
The class org.janusgraph.diskstorage.es.ElasticSearchIndex is in janusgraph-es-0.1.1.jar. If you're getting a NoClassDefFoundError, there's really not much more we can tell you other than be completely certain that the jar is on the appropriate classpath. Did you add janusgraph-*.jar only or did you add all jars in the $JANUSGRAPH_HOME/lib directory?

On Tuesday, August 22, 2017 at 1:28:18 PM UTC-4, mystic m wrote:
Hi,

I am exploring Janusgraph bulk load via SparkGraphComputer, janusgraph has been setup as plugin to tinkerpop server and console, with HBase as underlying storage and Elasticsearch as external index store.
I am running this setup on MapR cluster and had to recompile Janusgraph to resolve guava specific conflicts (shaded guava with relocation).

Next I am trying out the example BulkLoaderVertexProgram code provided in Chapter 33, It works fine till I have composite and vertex centric indexes in my schema, but as soon as I define mixed indexes and execute same code I end up with following exception in my Spark Job in stage 2 of job 1 -

java.lang.NoClassDefFoundError: Could not initialize class org.janusgraph.diskstorage.es.ElasticSearchIndex

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:264)

        at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:56)

        at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:477)

        at org.janusgraph.diskstorage.Backend.getIndexes(Backend.java:464)

        at org.janusgraph.diskstorage.Backend.<init>(Backend.java:149)

        at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1850)

        at org.janusgraph.graphdb.database.StandardJanusGraph.<init>(StandardJanusGraph.java:134)


I have verified that all janusgraph specific jars are in spark executor classpath and mixed indexes work fine with GraphOfGod example.

First I want to understand is it right path to use BulkLoaderVertexProgram be used to add mixed indexes? or should I upload the data and build indexes thereafter?

let me know if any additional info is required to dig deeper.

~mbaxi


Re: hey guys ,how to query a person relational depth

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

Use simplePath() to avoid cycles http://tinkerpop.apache.org/docs/current/reference/#simplepath-step

gremlin> graph = JanusGraphFactory.open('inmemory'); g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin
> g.addV().property('name', 'A').as('a').
......1>            addV().property('phone', '110').as('b').
......2>            addV().property('name', 'C').as('c').
......3>            addV().property('phone', '111').as('d').
......4>            addV().property('name', 'E').as('e').
......5>            addV().property('phone', '112').as('f').
......6>            addV().property('name', 'G').as('g').
......7>            addE('hasPhone').from('a').to('b').
......8>            addE('hasPhone').from('c').to('d').
......9>            addE('hasPhone').from('c').to('b').
.....10>            addE('hasPhone').from('e').to('d').
.....11>            addE('hasPhone').from('e').to('f').
.....12>            addE('hasPhone').from('g').to('b').iterate()
gremlin
> g.V().has('name', 'A').repeat(both().simplePath()).emit().path().count(local).max()
11:11:58 WARN  org.janusgraph.graphdb.transaction.StandardJanusGraphTx  - Query requires iterating over all vertices [(name = A)]. For better performance, use indexes
==>6



On Wednesday, August 23, 2017 at 10:26:12 PM UTC-4, 李平 wrote:
gremlin> g.addV().property('name', 'A').as('a'). addV().property('phone', '110').as('b'). addV().property('name', 'C').as('c'). addV().property('phone', '111').as('d'). addV().property('name', 'E').as('e'). addV().property('phone', '112').as('f'). addV().property('name', 'G').as('g'). addE('hasPhone').from('a').to('b'). addE('hasPhone').from('c').to('d'). addE('hasPhone').from('c').to('b'). addE('hasPhone').from('e').to('d').
addE('hasPhone').from('e').to('f'). addE('hasPhone').from('g').to('b').iterate()



if I want to know vertex A's relation depth how to write the gremlin commond,   

I  write like this 

g.V().has('userId','1').repeat(__.as("a").out().in().where(neq("a"))).emit().path().count(local).max()



but it seem endless loop,
在 2017年8月23日星期三 UTC+8下午9:16:21,Jason Plurad写道:
There's a recipe for this http://tinkerpop.apache.org/docs/current/recipes/#_maximum_depth

On Wednesday, August 23, 2017 at 3:52:14 AM UTC-4, 李平 wrote:
I want to know ,one person in the janusGraph ,his relational depth,use gremlin


Re: hey guys ,how to query a person relational depth

李平 <lipin...@...>
 

gremlin> g.addV().property('name', 'A').as('a'). addV().property('phone', '110').as('b'). addV().property('name', 'C').as('c'). addV().property('phone', '111').as('d'). addV().property('name', 'E').as('e'). addV().property('phone', '112').as('f'). addV().property('name', 'G').as('g'). addE('hasPhone').from('a').to('b'). addE('hasPhone').from('c').to('d'). addE('hasPhone').from('c').to('b'). addE('hasPhone').from('e').to('d').
addE('hasPhone').from('e').to('f'). addE('hasPhone').from('g').to('b').iterate()



if I want to know vertex A's relation depth how to write the gremlin commond,   

I  write like this 

g.V().has('userId','1').repeat(__.as("a").out().in().where(neq("a"))).emit().path().count(local).max()



but it seem endless loop,
在 2017年8月23日星期三 UTC+8下午9:16:21,Jason Plurad写道:

There's a recipe for this http://tinkerpop.apache.org/docs/current/recipes/#_maximum_depth

On Wednesday, August 23, 2017 at 3:52:14 AM UTC-4, 李平 wrote:
I want to know ,one person in the janusGraph ,his relational depth,use gremlin

6001 - 6020 of 6661