Hi,
I want to store my titangraph on multiple cassandra instances. So I started two apache cassandra instances (say cassandra1 & cassandra2) on same system and changed the following configurations in cassandra.yaml:
replaced "localhost" with 127.0.0.1 in cassandra1 and 127.0.0.2 in cassandra2
rpc_port 9160 for cassandra1 and 9161 for cassandra2
seeds: "127.0.0.1,127.0.0.2" in both the copies
JMX_PORT different in both cassandra
Below are the configurations in my titangraph:
1 BaseConfiguration conf = new BaseConfiguration();
2 conf.setProperty("storage.backend", "cassandra");
3 conf.setProperty("storage.hostname", "127.0.0.1,127.0.0.2");
4 TitanGraph tg = new TitanGraph(conf);
...
...
Below is the error at line number 4:
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
java.lang.IllegalArgumentException: Could not instantiate
implementation:
com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1320)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:74)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
... 7 more
Caused by: java.lang.NoSuchMethodError:
com.netflix.astyanax.impl.AstyanaxConfigurationImpl.setTargetCassandraVersion(Ljava/lang/String;)Lcom/netflix/astyanax/impl/AstyanaxConfigurationImpl;
at
com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.getContextBuilder(AstyanaxStoreManager.java:505)
at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.(AstyanaxStoreManager.java:289)
... 12 more
Can someone please suggest if this is the correct way of configuring the titan graph and cassandra DBs.