Date
1 - 2 of 2
Import graph from ConfiguredGraphFactory to hbase
Morgan Cole <morganc...@...>
Hello everyone, we want to test some OLAP queries for our requests,and, as far,as I understand, to do that, graph needs to be exported to Hadoop.
* janusgraph-0.5.1, hadoop-2.10.1
Currently we access out graphs using configuredGraphFactory.open('graphName') and our graph uses configuration listed below:
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
storage.backend=hbase
graph.graphname=ConfigurationManagementGraph
Now, to load graph to Hadoop,I am trying to do something like this (using defaut Hadoop/spark load configuration file hadoop-load.properties):
<gremlin console>
:plugin use tinkerpop.spark
graph = GraphFactory.open('conf/hadoop-graph/hadoop-load.properties')
blvp = BulkLoaderVertexProgram.build().writeGraph(<need to choose specific graph from ConfiguredGraphFactory here>).create(graph) graph.compute(SparkGraphComputer).program(blvp).submit().get() graph.close()
graph = GraphFactory.open('conf/hadoop-graph/hadoop-load.properties')
blvp = BulkLoaderVertexProgram.build().writeGraph(<need to choose specific graph from ConfiguredGraphFactory here>).create(graph) graph.compute(SparkGraphComputer).program(blvp).submit().get() graph.close()
But I have no idea how to access specific graph from factory here, because writeGraph() takes configuration file as input
HadoopMarc <bi...@...>
First note that the BulkLoaderVertexProgram was deprecated in TinkerPop. You might want to see:
https://groups.google.com/g/janusgraph-users/c/d3F4dZdQ2XQ/m/HolppzItCAAJ
For working around your issue you can consult the API docs.
The getConfiguration() method gives you a configuration Map:
https://javadoc.io/doc/org.janusgraph/janusgraph-core/latest/org/janusgraph/core/ConfiguredGraphFactory.html
The BulkLoaderVertexProgram.builder class has a writeGraph(Configuration) method. Of course, you need some juggling to get the Map into the Configuration object.
HTH, Marc
Op donderdag 22 oktober 2020 om 15:14:50 UTC+2 schreef mor...@...:
Hello everyone, we want to test some OLAP queries for our requests,and, as far,as I understand, to do that, graph needs to be exported to Hadoop.* janusgraph-0.5.1, hadoop-2.10.1Currently we access out graphs using configuredGraphFactory.open('graphName') and our graph uses configuration listed below:gremlin.graph=org.janusgraph.core.ConfiguredGraphFactorystorage.backend=hbasegraph.graphname=ConfigurationManagementGraphNow, to load graph to Hadoop,I am trying to do something like this (using defaut Hadoop/spark load configuration file hadoop-load.properties):<gremlin console>:plugin use tinkerpop.spark
graph = GraphFactory.open('conf/hadoop-graph/hadoop-load.properties')
blvp = BulkLoaderVertexProgram.build().writeGraph(<need to choose specific graph from ConfiguredGraphFactory here>).create(graph) graph.compute(SparkGraphComputer).program(blvp).submit().get() graph.close()But I have no idea how to access specific graph from factory here, because writeGraph() takes configuration file as input