jespersm / janusgraph-csv-import

Simple CSV import tool for JanusGraph
Apache License 2.0
9 stars 7 forks source link

ConfiguredGraphFactory #3

Open shanequint opened 5 years ago

shanequint commented 5 years ago

Does this work with ConfiguredGraphFactory?
I am receiving the following error in trying to load a simple vertex file. java -cp ./build/libs/janusgraph-csv-import-all.jar com.github.jespersm.janusgraph.csvimport.Import --nodes=Child=ChildNodeNew.csv --config=janusgraph-cql-configurationgraph.properties 17:04:50.205 [main] INFO c.g.j.janusgraph.csvimport.Import - Opening graph from information in janusgraph-cql-configurationgraph.properties 17:04:50.303 [main] INFO c.g.j.janusgraph.csvimport.Import - Closing handlers Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.github.jespersm.janusgraph.csvimport.Import@150c158): java.lang.IllegalStateException: Gremlin Server must be configured to use the JanusGraphManager. at picocli.CommandLine.execute(CommandLine.java:1068) at picocli.CommandLine.access$900(CommandLine.java:142) at picocli.CommandLine$RunLast.handle(CommandLine.java:1255) at picocli.CommandLine$RunLast.handle(CommandLine.java:1223) at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1131) at picocli.CommandLine.parseWithHandlers(CommandLine.java:1414) at com.github.jespersm.janusgraph.csvimport.Import.main(Import.java:220) Caused by: java.lang.IllegalStateException: Gremlin Server must be configured to use the JanusGraphManager. at com.google.common.base.Preconditions.checkState(Preconditions.java:174) at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:148) at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:131) at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:78) at com.github.jespersm.janusgraph.csvimport.Import.initializeGraph(Import.java:176) at com.github.jespersm.janusgraph.csvimport.Import.call(Import.java:122) at com.github.jespersm.janusgraph.csvimport.Import.call(Import.java:44) at picocli.CommandLine.execute(CommandLine.java:1061)

jespersm commented 5 years ago

I'm sorry, I haven't tried it, but I doubt any remote update would work, as the importer tries to update the schema information, too.

This tool is primarily intended for initial data loads.

What's in your janusgraph-cql-configurationgraph.properties file?

shanequint commented 5 years ago
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=cql
graph.graphname=ConfigurationManagementGraph
graph.set-vertex-id=true
storage.hostname=127.0.0.1
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.5
index.search.backend=elasticsearch
index.search.hostname=127.0.0.1
index.search.elasticsearch.client-only=true

Once the graph is created using ConfiguredGraphManagement, could I then change the graph.graphname to the created graph name and import data that way? I have a browser based interface I've created to do a lot of the graph management, like dynamically creating the graph, indexing specific properties, generate the schema etc. It will import CSV data, but it is very slow because I am having to look up the generated vertice ids before creating edges. Ii thought a server based tool like this would be great to pass the data to and let it create the schema and import the data after the graph was created.