Re: JanusGraph-specific Predicates via Gremlin Language Variants (Python)

Florian Hockmann


the problem is probably simply that the Python driver doesn’t support serialization for JanusGraph predicates with GraphBinary. So, you would need to write your GraphBinary serializer for JanusGraph predicates in Python. janusgraph-python could provide support for this in the future but right now it only supports GraphSON and even that is not in a final state right now.


There is currently not much progress in janusgraph-python. So, if you want to help improve the JanusGraph support in Python, then any contributions would of course be very welcome.


Von: janusgraph-users@... <janusgraph-users@...> Im Auftrag von florian.caesar via
Gesendet: Freitag, 9. April 2021 09:27
An: janusgraph-users@...
Betreff: [janusgraph-users] JanusGraph-specific Predicates via Gremlin Language Variants (Python)


Hi, I'm trying to use JanusGraph's full-text predicates in the gremlin-python client library. Using GraphSON serializer, I can use a predicate with e.g. "textContains" as the operator and it works since JanusGraphIoRegistryV1d0 registers its custom deserializer for P objects:

addDeserializer(P.class, new JanusGraphPDeserializerV2d0());

However, as of v0.5.3, JanusGraph does not register any deserializers for GraphBinary (though that feature is already on the master branch). This means that when I submit the same exact traversal with P("textContains", "string") in graphbinary format I get:

org.apache.tinkerpop.gremlin.server.handler.OpSelectorHandler  - Invalid OpProcessor requested [null]

I presume this is because the "textContains" predicate isn't registered. Weirdly enough, in my Groovy console, the same traversal works fine even though it also uses graphbinary (according to the configuration).

There are a couple options here and I don't have enough information on any of them, so I would appreciate input:

    1. Figure out what the Groovy console is doing differently and use that in the Python library
    2. Use a Docker image from master branch and adapt the Python library to use the new custom JanusgraphP type in graphbinary
    3. Use two separate clients with different serializations depending on which traversal I need to run (yuck)

Note: I've already tested, it does the same thing I do manually and thus only works with GraphSON.

Join to automatically receive all group messages.