Re: Dynamic edge creation

Daniel Kuppitz <me@...>

This should do the trick:

g.V().has('player').as('a').
V().has('Country').where(eq('a')).by('name').by('POB').

However, note that this query will do 2 full table scans under the hood (unless Janus already has some runtime optimization that I'm not aware of). In any case it will be at least one full table scan.

Cheers,
Daniel

On Fri, Sep 15, 2017 at 6:44 AM, Ankur Goel wrote:
Thnx Robert,

i am looking for a query like create edges where they have common properties without explicitly defining properties values:

~AnkurG

On Friday, September 15, 2017 at 3:02:46 PM UTC+5:30, Ankur Goel wrote:
Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

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

Re: Dynamic edge creation

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

Robert Dale

On Fri, Sep 15, 2017 at 9:44 AM, Ankur Goel wrote:
Thnx Robert,

i am looking for a query like create edges where they have common properties without explicitly defining properties values:

~AnkurG

On Friday, September 15, 2017 at 3:02:46 PM UTC+5:30, Ankur Goel wrote:
Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

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

Re: Encountered error in deserializer [null value returned]. Check serializer compatibility.

This question could use more context. What data did you load into the graph before calling on g.V().valueMap()?

On Friday, September 15, 2017 at 9:15:41 AM UTC-4, Ankur Goel wrote:
Some times i get below exception using embedded JanusServer (cassandra + es):

gremlin> g.V().valueMap()
Encountered error in deserializer [null value returned]. Check serializer compatibility.
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: Encountered error in deserializer [null value returned]. Check serializer compatibility.
at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:170)
at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super\$2\$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super\$2\$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:152)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:455)

After restarting the JanusServer it starts working.

~AnkurG

Re: Dynamic edge creation

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

Thnx Robert,

i am looking for a query like create edges where they have common properties without explicitly defining properties values:

~AnkurG

On Friday, September 15, 2017 at 3:02:46 PM UTC+5:30, Ankur Goel wrote:
Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

~AnkurG

Encountered error in deserializer [null value returned]. Check serializer compatibility.

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

Some times i get below exception using embedded JanusServer (cassandra + es):

gremlin> g.V().valueMap()
Encountered error in deserializer [null value returned]. Check serializer compatibility.
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: Encountered error in deserializer [null value returned]. Check serializer compatibility.
at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:170)
at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super\$2\$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:124)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super\$2\$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:152)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:455)

After restarting the JanusServer it starts working.

~AnkurG

Fetching TTL for individual graph vertices

sankar...@...

Hi All,

We are working on janusgraph-cassandra api, and have implemented TTL on vertex labels. But we want to fetch the value of TTL for each vertex,
Below link gives reference to fetch TTL of individual records in Cassandra, and we want to implement this using janusgraph.

Cassandra Query
https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlSelect.html

Cassandra Query :-
'SELECT TTL(race_name)
FROM cycling.calendar
WHERE race_id=200;
Output:
ttl(race_name)
----------------
276
We want to implement above query of cassandra using janusgraph.

So, can you please give reference to some link, or give some clarity on how we can implement this using Janusgraph.

Re: Enable logging for queries

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

Please create an issue for review at https://github.com/JanusGraph/janusgraph/issues

Robert Dale

On Fri, Sep 15, 2017 at 3:55 AM, Ankur Goel wrote:
Thnx Got the problem resolved:

As per SLF4j:
Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways.

Request to exclude following dependency

<groupId>org.slf4j</groupId>

<artifactId>slf4j-log4j12</artifactId>

from JanusGraph.

<groupId>org.janusgraph</groupId>

<artifactId>janusgraph-es</artifactId>

<artifactId>janusgraph-cassandra</artifactId>

<artifactId>gremlin-driver</artifactId>

Logging will start working.

~AnkurG

On Wednesday, September 13, 2017 at 3:39:10 PM UTC+5:30, Ankur Goel wrote:
Hi,

I am using JanusGraph 0.1.1. And using logback:

<appender-ref ref="CONSOLE" />

</logger>

<appender-ref ref="CONSOLE" />

</logger>

<root level="debug">

<appender-ref ref="CONSOLE" />

</root>

This result in following output only:

15:28:23,108  INFO ReflectiveConfigOptionLoader:173 - Loaded and initialized config classes: 9 OK out of 12 attempts in PT0.018S

15:28:23,171  INFO Reflections:224 - Reflections took 38 ms to scan 1 urls, producing 12 keys and 25 values

15:28:23,244  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

15:28:23,251  INFO GraphDatabaseConfiguration:1563 - Generated unique-instance-id=0a96cb391964-MacBook-Pro-3-local1

15:28:23,263  INFO Backend:463 - Configuring index [search]

15:28:23,355  INFO plugins:151 - [Solarr] loaded [], sites []

15:28:23,875  INFO ElasticSearchIndex:368 - Configured remote host: 127.0.0.1 : 9300

15:28:24,043  INFO Backend:178 - Initiated backend operations thread pool of size 8

15:28:24,165  INFO KCVSLog:744 - Loaded unidentified ReadMarker start time 2017-09-13T09:58:24.152Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog\$MessagePuller@7fcff1b9

15:28:25,409  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

How i can enable logging to see the internals and queries fired against 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.

Re: Dynamic edge creation

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

Robert Dale

On Fri, Sep 15, 2017 at 6:56 AM, Robert Dale wrote:

or you can flip it around

Robert Dale

On Fri, Sep 15, 2017 at 5:32 AM, Ankur Goel wrote:
Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

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

Re: Dynamic edge creation

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

or you can flip it around

Robert Dale

On Fri, Sep 15, 2017 at 5:32 AM, Ankur Goel wrote:
Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

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

Dynamic edge creation

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

Hi,

In JanusGraph to create edges we have two steps process:
1. First identify the vertex
2. Then create edges between vertex
Linkage between both steps is through App only.

How ever in neo4j, we can create edges using one step:

MATCH (a:player), (b:Country) WHERE a.POB = "X" AND b.name = "Y"
CREATE (a)-[r: Z]->(b)
RETURN a,b

Can we achieve the same in JanusGraph using Janus or tinkerpoop.

~AnkurG

Re: Enable logging for queries

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

Thnx Got the problem resolved:

As per SLF4j:
Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways.

Request to exclude following dependency

<groupId>org.slf4j</groupId>

<artifactId>slf4j-log4j12</artifactId>

from JanusGraph.

<groupId>org.janusgraph</groupId>

<artifactId>janusgraph-es</artifactId>

<artifactId>janusgraph-cassandra</artifactId>

<artifactId>gremlin-driver</artifactId>

Logging will start working.

~AnkurG

On Wednesday, September 13, 2017 at 3:39:10 PM UTC+5:30, Ankur Goel wrote:
Hi,

I am using JanusGraph 0.1.1. And using logback:

<appender-ref ref="CONSOLE" />

</logger>

<appender-ref ref="CONSOLE" />

</logger>

<root level="debug">

<appender-ref ref="CONSOLE" />

</root>

This result in following output only:

15:28:23,108  INFO ReflectiveConfigOptionLoader:173 - Loaded and initialized config classes: 9 OK out of 12 attempts in PT0.018S

15:28:23,171  INFO Reflections:224 - Reflections took 38 ms to scan 1 urls, producing 12 keys and 25 values

15:28:23,244  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

15:28:23,251  INFO GraphDatabaseConfiguration:1563 - Generated unique-instance-id=0a96cb391964-MacBook-Pro-3-local1

15:28:23,263  INFO Backend:463 - Configuring index [search]

15:28:23,355  INFO plugins:151 - [Solarr] loaded [], sites []

15:28:23,875  INFO ElasticSearchIndex:368 - Configured remote host: 127.0.0.1 : 9300

15:28:24,043  INFO Backend:178 - Initiated backend operations thread pool of size 8

15:28:24,165  INFO KCVSLog:744 - Loaded unidentified ReadMarker start time 2017-09-13T09:58:24.152Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog\$MessagePuller@7fcff1b9

15:28:25,409  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

How i can enable logging to see the internals and queries fired against JanusGraph.

~AnkurG

Re: org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException

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

By default label should be indexed or some provision to index label should be in configuration.

Else no use of label.

~AnkurG

On Tuesday, September 12, 2017 at 9:29:27 PM UTC+5:30, Suny wrote:
I added 1000 vertices to Janusgraph. When I query for a subset of them, sometimes it returns the result, sometimes it throws this RemoteException. It is not consistent. Any thoughts why this is happening ?

Only one vertex has label and all other vertices have attributes.

When I do this query - g.V().hasLabel('root').id() , it is always giving RemoteException

Re: Incorrect results when querying

Brandon Dean <engr...@...>

Thanks Daniel!  I had a feeling I was missing something obvious...

On Thursday, September 14, 2017 at 2:21:44 PM UTC-5, Daniel Kuppitz wrote:
The first number in between should be smaller than the second. Try:

g.V().has('longitude', between(-113, -110)).limit(3)

Cheers,
Daniel

On Thu, Sep 14, 2017 at 12:14 PM, Brandon Dean wrote:
I have ran into an issue recently where I am receiving incorrect results when submitting certain queries.  Here is an example:

gremlin> g.V().has('longitude', between(-110, -113)).limit(3)
gremlin> g.V().has('longitude', between(-111.726, -111.72)).limit(3)
==>v[393719920]
==>v[119910496]
==>v[365723728]

The first query should have returned the results in the second query at a minimum.  I receive no errors and there is nothing in the log files that seems to indicate an issue.  My next step will be to turn on DEBUG logging, but does anyone have any suggestions on how else to troubleshoot an issue like this?

I am utilizing the builtin instance of C* and ElasticSearch with version 0.1.1 of JanusGraph.

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

Re: Incorrect results when querying

Daniel Kuppitz <me@...>

The first number in between should be smaller than the second. Try:

g.V().has('longitude', between(-113, -110)).limit(3)

Cheers,
Daniel

On Thu, Sep 14, 2017 at 12:14 PM, Brandon Dean wrote:
I have ran into an issue recently where I am receiving incorrect results when submitting certain queries.  Here is an example:

gremlin> g.V().has('longitude', between(-110, -113)).limit(3)
gremlin> g.V().has('longitude', between(-111.726, -111.72)).limit(3)
==>v[393719920]
==>v[119910496]
==>v[365723728]

The first query should have returned the results in the second query at a minimum.  I receive no errors and there is nothing in the log files that seems to indicate an issue.  My next step will be to turn on DEBUG logging, but does anyone have any suggestions on how else to troubleshoot an issue like this?

I am utilizing the builtin instance of C* and ElasticSearch with version 0.1.1 of JanusGraph.

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

Incorrect results when querying

Brandon Dean <engr...@...>

I have ran into an issue recently where I am receiving incorrect results when submitting certain queries.  Here is an example:

gremlin> g.V().has('longitude', between(-110, -113)).limit(3)
gremlin> g.V().has('longitude', between(-111.726, -111.72)).limit(3)
==>v[393719920]
==>v[119910496]
==>v[365723728]

The first query should have returned the results in the second query at a minimum.  I receive no errors and there is nothing in the log files that seems to indicate an issue.  My next step will be to turn on DEBUG logging, but does anyone have any suggestions on how else to troubleshoot an issue like this?

I am utilizing the builtin instance of C* and ElasticSearch with version 0.1.1 of JanusGraph.

Re: hi，janusgraph. store 15000W vertex

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

It would help your cause if you provided details on exactly what it is that you're doing.  Configuration. Schema. Graph. Code. Timings. Expectations.

Robert Dale

On Thu, Sep 14, 2017 at 1:27 AM, 李平 wrote:
yeah.  I have use index ,

the query. use index.  but still very. slow.

You should use indexes.

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

Re: hi，janusgraph. store 15000W vertex

yeah.  I have use index ,

the query. use index.  but still very. slow.

You should use indexes.

Re: hi，janusgraph. store 15000W vertex

yeah.  I have use index ,

the query. use index.  but still very. slow.

You should use indexes.

Re: Custom attribute serializer

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

Aha!
Perhaps it would be best to configure it programmatically from the beginning.  I already have a java program to define all my schema elements.

On Wednesday, September 13, 2017 at 5:33:45 PM UTC-4, Robert Dale wrote:
You can change it, just not through the properties file. You have to use the Management interface.   See  http://docs.janusgraph.org/latest/configuration.html#configuration-global

Robert Dale

On Wed, Sep 13, 2017 at 5:30 PM, J MacNaught <j...@...> wrote:
Thank you for the example, it helped to know it was supposed to work.  However, I couldn't get your example to work at first. I still got this error:
java.lang.IllegalStateException: Need to set configuration value: root.attributes.custom.attribute-class
which is really not helpful because if you change the option name to "root.xxx" the error messages go away, but it's not really fixed.

Ultimately, the only way I could get it to work was to delete my cassandra database and start over.   I thought that options which were GLOBAL_OFFLINE could still be configured after DB initialization.

On Wednesday, September 13, 2017 at 2:42:44 PM UTC-4, Jason Plurad wrote:
That functionality works. I've ported my Titan example over to JanusGraph. You shouldn't have "root." on your properties.
Note that JanusGraph registers a standard serializer for HashMap, so an exception would have been thrown if you attempted to register one for it.

On Monday, September 11, 2017 at 5:42:02 PM UTC-4, J MacNaught wrote:
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.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.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 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!

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

Re: Custom attribute serializer

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

You can change it, just not through the properties file. You have to use the Management interface.   See  http://docs.janusgraph.org/latest/configuration.html#configuration-global

Robert Dale

On Wed, Sep 13, 2017 at 5:30 PM, J MacNaught wrote:
Thank you for the example, it helped to know it was supposed to work.  However, I couldn't get your example to work at first. I still got this error:
java.lang.IllegalStateException: Need to set configuration value: root.attributes.custom.attribute-class
which is really not helpful because if you change the option name to "root.xxx" the error messages go away, but it's not really fixed.

Ultimately, the only way I could get it to work was to delete my cassandra database and start over.   I thought that options which were GLOBAL_OFFLINE could still be configured after DB initialization.

On Wednesday, September 13, 2017 at 2:42:44 PM UTC-4, Jason Plurad wrote:
That functionality works. I've ported my Titan example over to JanusGraph. You shouldn't have "root." on your properties.
Note that JanusGraph registers a standard serializer for HashMap, so an exception would have been thrown if you attempted to register one for it.

On Monday, September 11, 2017 at 5:42:02 PM UTC-4, J MacNaught wrote:
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.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.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 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!

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