Hi Marko,
I put hbase-titan and hadoop-faunus on the same system, loaded the graph-of-the-gods into titan and then went to faunus and tried to run a g.V.count() and received the following exception:
java.lang.NullPointerException
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.loadRelations(StandardTitanGraph.java:293)
at com.thinkaurelius.faunus.formats.titan.hbase.FaunusTitanHBaseGraph.readFaunusVertex(FaunusTitanHBaseGraph.java:39)
at com.thinkaurelius.faunus.formats.titan.hbase.TitanHBaseRecordReader.nextKeyValue(TitanHBaseRecordReader.java:38)
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
at org.apache.hadoop.mapred.Child.main(Child.java:249)
Here are a few details:
In Titan:
gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration.BaseConfiguration@24d37b87
gremlin> conf.setProperty('storage.backend', 'hbase')
==>null
gremlin> conf.setProperty('storage.tablename', 'gods')
==>null
gremlin> conf.setProperty('storage.hostname', '127.0.0.1')
==>null
gremlin> g=TitanFactory.open(conf)
12/12/14 15:34:17 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT
.....
==>titangraph[hbase:127.0.0.1]
gremlin> saturn = g.V('name','saturn').next()
==>v[20]
gremlin> saturn.map()
==>name=saturn
==>type=titan
That all looks ok. Now going over to the faunus gremlin on the same machine:
titan-hbase.properties looks like this:
faunus.graph.input.format=com.thinkaurelius.faunus.formats.titan.hbase.TitanHBaseInputFormat
hbase.zookeeper.quorum=9.44.132.142
# hbase.zookeeper.property.clientPort=9160
# hbase.mapreduce.inputtable=titan
hbase.mapreduce.inputtable=gods
hbase.mapreduce.scan.cachedrows=1000
# output data (graph or statistic) parameters
faunus.graph.output.format=com.thinkaurelius.faunus.formats.noop.NoOpOutputFormat
faunus.sideeffect.output.format=org.apache.hadoop.mapreduce.lib.output.TextOutputFormat
faunus.output.location=output
faunus.output.location.overwrite=true
and once in the faunus gremlin I do:
gremlin> g = FaunusFactory.open('titan-hbase.properties')
==>faunusgraph[titanhbaseinputformat]
gremlin> g.V.count()
12/12/14 15:39:16 INFO mapred.JobClient: Running job: job_201212140909_0013
12/12/14 15:39:17 INFO mapred.JobClient: map 0% reduce 0%
...
exception pasted above appears.
Is my Faunus "seeing" the graph written in Titan ?