No such property: ToInputStream for class: Script4

前端 未结 1 809
天命终不由人
天命终不由人 2021-01-25 07:00

I have a situation where I want to import my graph data to database.I am having janusgraph(latest version) running with cassandra(version 3) and elasticsearch(version 6.6.0) usi

相关标签:
1条回答
  • 2021-01-25 07:50

    ToInputStream is not a function of Gremlin or JanusGraph. I believe that it is only a function of IBM Compose so unless you are running JanusGraph on that specific platform, this command will not work.

    Versions of JanusGraph that utilize TinkerPop 3.4.x will support the io() step and this is the preferred manner in which to load gryo (as well as graphson and graphml) files.

    Graph graph = ... // setup JanusGraph instance
    GraphTraversalSource g = traversal().withGraph(graph); // might use withRemote() here instead depending on how you are connecting I suppose
    g.io("graph.kryo").read().iterate()
    

    Note that if you are connecting remotely - it seems you are sending scripts to the Docker instance given your error - then be sure that that "graph.kryo" file path is accessible to Docker. That's what's nice about ToInputStream from Compose as it allows you to access remote sources.

    0 讨论(0)
提交回复
热议问题