Titan + Hbase REST API

245 views
Skip to first unread message

Tommy

unread,
May 13, 2016, 12:19:38 PM5/13/16
to Aurelius
Hi, not easy for usint Titan + Hbase REST API. Is there someone has built this graph database successfully?

I followed the installation tutoral step by step, and used hbase as storage backend in gremlin shell perfect. Command below:
graph = TitanFactory.open('conf/titan-hbase-es.properties')

But when I ran `bin/gremlin-server.sh conf/gremlin-server-hbase.properties`. Something wrong with the following log
566  [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [conf/titan-hbase.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: Configuration must contain a valid 'gremlin.graph' setting
java.lang.RuntimeException: Configuration must contain a valid 'gremlin.graph' setting
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:57)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
        at org.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$27(GraphManager.java:50)
        at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
        at org.apache.tinkerpop.gremlin.server.GraphManager.<init>(GraphManager.java:48)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:94)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:88)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:290)
569  [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
943  [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded nashorn ScriptEngine
1371 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded gremlin-groovy ScriptEngine
2102 [main] WARN  org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor  - Could not initialize gremlin-groovy ScriptEngine with scripts/empty-sample.groovy as script could not be evaluated - javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
2103 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and configured ScriptEngines.
2156 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
2158 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
2301 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
2302 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting


And I add a configuration in `conf/titan-hbase.properties`:
gremlin.graph=com.thinkaurelius.titan.core.TitanFactory

Then restart titan, and error occurred:
1562 [main] INFO  org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0x1e16c0aa, quorum=127.0.0.1:2181, baseZNode=/hbase
1594 [main] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=hconnection-0x1e16c0aa connecting to ZooKeeper ensemble=127.0.0.1:2181
1596 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
1606 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
1616 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x154aa86d1920409, negotiated timeout = 40000
1786 [main] INFO  org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0xd771cc9, quorum=127.0.0.1:2181, baseZNode=/hbase
1787 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
1788 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
1789 [main] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=hconnection-0xd771cc9 connecting to ZooKeeper ensemble=127.0.0.1:2181
1790 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x154aa86d192040a, negotiated timeout = 40000
1793 [main] INFO  org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=catalogtracker-on-hconnection-0xd771cc9, quorum=127.0.0.1:2181, baseZNode=/hbase
1794 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
1795 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
1795 [main] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=catalogtracker-on-hconnection-0xd771cc9 connecting to ZooKeeper ensemble=127.0.0.1:2181
1798 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x154aa86d192040b, negotiated timeout = 40000

Does someone know what happened?
Thanks!

Jason Plurad

unread,
May 13, 2016, 1:28:25 PM5/13/16
to Aurelius
Did you confirm that you can connect to Titan with you titan-hbase.properties from the Gremlin Console? Can you post that file?

For HBase are you running a standalone Zookeeper or embedded? Is Zookeeper listening on 2181? Are you running Apache HBase from zip or a distribution?
--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/b3432cd5-c162-460f-8a1d-d05c2d52733c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tommy

unread,
May 13, 2016, 1:46:02 PM5/13/16
to Aurelius
Yes. I can connect to Titan with titan-hbase.properties from the Gremlin Console.
This is all configuration in my titan-hbase.properties:
storage.backend=hbase
storage.hbase.tablename=titan
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
# gremlin.graph=com.thinkaurelius.titan.core.TitanFactory

I am running a standalone HBase. Shall I run a standalone Zookeeper?
The version of Titan is 1.0.0 and HBase is `hbase-1.1.4-bin.tar.gz`

在 2016年5月14日星期六 UTC+8上午1:28:25,Jason Plurad写道:

한세윤

unread,
Jun 24, 2016, 8:50:56 AM6/24/16
to Aurelius
I got same issue.
Did you solved the problem?


2016년 5월 14일 토요일 오전 1시 19분 38초 UTC+9, Tommy 님의 말:

Jason Plurad

unread,
Jun 30, 2016, 5:19:40 PM6/30/16
to Aurelius
Oh, those aren't real errors... they are logged as INFO. You can adjust the logging settings in $TITAN_HOME/conf/gremlin-server/log4j-server.properties:

log4j.logger.org.apache.zookeeper=WARN
log4j
.logger.org.apache.hadoop.hbase.client=WARN
log4j
.logger.org.apache.hadoop.hbase.zookeeper=WARN

-- Jason

Jason Plurad

unread,
Jun 30, 2016, 5:22:36 PM6/30/16
to Aurelius
Also, watch out on the versions... Titan 1.0.0 isn't built against HBase 1.1.4, so it may not be compatible, see the version compatibility matrix
Reply all
Reply to author
Forward
0 new messages