Titan-hadoop error: Need to set configuration value: root.storage.backend

1,066 views
Skip to first unread message

Lauren Wolfe

unread,
Jul 27, 2015, 10:12:34 PM7/27/15
to Aurelius

Hi, I'm attempting to create a titan db using titan-hadoop. I'm getting the following error when I try to load data: java.lang.IllegalStateException: Need to set configuration value: root.storage.backend.


In the script-input.properties file, I have already set "titan.hadoop.output.titan.storage.backend=cassandra"


I've googled but I'm not finding a reference to where or how to define root.storage.backend. 


The only other place I know to set a storage backend is when I'm loading the schema, where I'm using the default titan-cassandra.properties file included with 0.5.4.


Does this seem familiar to anyone?


Thanks,

Lauren 


Jason Plurad

unread,
Jul 28, 2015, 1:00:52 AM7/28/15
to Aurelius, lulu...@gmail.com
So Titan 0.5.4, looking at $TITAN_HOME/conf/hadoop/titan-cassandra-output.properties, it looks like the output properties should be

titan.hadoop.output.format=com.thinkaurelius.titan.hadoop.formats.cassandra.TitanCassandraOutputFormat
titan
.hadoop.output.conf.storage.backend=cassandrathrift
titan
.hadoop.output.conf.storage.hostname=localhost
titan
.hadoop.output.conf.storage.port=9160
titan
.hadoop.output.conf.storage.cassandra.keyspace=titan
titan
.hadoop.output.conf.storage.batch-loading=true
titan
.hadoop.output.infer-schema=true

Lauren Wolfe

unread,
Jul 28, 2015, 1:55:25 PM7/28/15
to Aurelius, plu...@gmail.com
Hey Jason, thanks for the response. I believe I have that all set up correctly. I put my configs into a pastebin, here: http://pastebin.com/rbgivSzp

Lauren Wolfe

unread,
Jul 28, 2015, 4:24:36 PM7/28/15
to Aurelius, lulu...@gmail.com
So, when I look at the error output, it actually seems to be a problem with TitanFactory. But HadoopFactory is a child class of TitanFactory, right? So that's probably not important? I also tried changing "titan.hadoop.output.infer-schema=false", because I'd forgotten to set that option, but it didn't change the outcome.

Error output:

java.lang.IllegalStateException: Need to set configuration value: root.storage.backend

at com.google.common.base.Preconditions.checkState(Preconditions.java:177)

at com.thinkaurelius.titan.diskstorage.configuration.ConfigOption.get(ConfigOption.java:158)

at com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration.get(BasicConfiguration.java:56)

at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)

at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)

at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)

at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:83)

at com.thinkaurelius.titan.hadoop.formats.util.TitanGraphOutputMapReduce.generateGraph(TitanGraphOutputMapReduce.java:84)

at com.thinkaurelius.titan.hadoop.formats.util.SchemaInferencerMapReduce$Reduce.setup(SchemaInferencerMapReduce.java:98)

at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:168)

at org.apache.hadoop.mapreduce.lib.chain.Chain.runReducer(Chain.java:483)

at org.apache.hadoop.mapreduce.lib.chain.ChainReducer.run(ChainReducer.java:195)

at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:645)

at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:405)

at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:445)

Lauren Wolfe

unread,
Jul 29, 2015, 7:07:56 PM7/29/15
to Aurelius, lulu...@gmail.com
I'm hoping someone might take the time to answer these questions, if they have a moment :) I've been poking and spinning my wheels on this for days and I'm sure I'm overlooking something silly.

- Could it be that I need to specify the hdfs directory somewhere in the configuration? I haven't specified it anywhere yet. 
- I assume that if it's all happening locally, the storage.hostname will still be localhost? Does that need to be prefixed with hdfs:// ? Would it matter that I'm using docker, like perhaps I need to use the container IP somewhere instead? That doesn't seem right, but figured it's worth mentioning.
- The only places I would be specifying the storage.backend would be in the schema configuration file and the input file for hadoop, correct?
- what does 'root.' equal in the system? I figured that might be a clue but my internet search has yielding nothing helpful. Would it be "titan.hadoop" or is there perhaps another place to set root?
- Do I perhaps need to be configuring cassandra? Right now I'm just using titan.sh start to initialize cassandra. Should it be started separately? 

Maybe one of these things will be obviously wrong to someone.

Thanks,
Lauren

Jason Plurad

unread,
Jul 30, 2015, 7:27:11 AM7/30/15
to Aurelius, lulu...@gmail.com
In your pastebin, script-input.properties has a typo in the output parameters.

It should be titan.hadoop.output.conf.storage.backend=cassandrathrift instead of titan.hadoop.output.titan.storage.backend=cassandrathrift. Similar for the other titan.hadoop.output properties.

Lauren Wolfe

unread,
Jul 30, 2015, 1:38:14 PM7/30/15
to Aurelius, plu...@gmail.com
Thanks! Yeah, I finally figured it out at the end of the day yesterday. Not sure where I got that from, now. Thanks so much, Jason, I appreciate you taking the time to chat with me :D
Reply all
Reply to author
Forward
0 new messages