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!

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.