Need javax.jdo.option.ConnectionURL for cassandra

509 views Asked by At

Are the below properties in hive-site.xml correct for Hive access to cassandra??

(I HAVE COPIED ENTIRE HIVE-DEFAULT.XML CONTENT BUT HAVE CHANGED ONLY THE BELOW PROPERTIES)

javax.jdo.option.ConnectionURL : cassandra://localhost:9160
javax.jdo.option.ConnectionDriverName:org.apache.cassandra.cql.jdbc.CassandraDriver
hive.stats.dbclass:  jdbc:cassandra
hive.stats.jdbcdriver:  org.apache.cassandra.cql.jdbc.CassandraDriver
hive.stats.dbconnectionstring:  jdbc:cassandra:;databaseName=TempStatsStore;create=true

I am running 1-node Cassandra. But, later would make it a minimum 2 node cluster.

When I run the below table creation command I get an error:

   CREATE EXTERNAL TABLE MyHiveTable
    (m string, n string, o string, p string)
    STORED BY 'org.apache.hadoop.hive.cassandra.cql3.CqlStorageHandler'
    TBLPROPERTIES ( "cassandra.ks.name" = "cql3ks",
    "cassandra.cf.name" = "test",
    "cassandra.cql3.type" = "text, text, text, text");

Error:

FAILED: Error in metadata: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
1

There are 1 answers

0
dhamu On

don't know about jdo settings but you could try this link which is far better option for integrating hive with cassandra - https://github.com/milliondreams/hive/tree/cas-support-cql/cassandra-handler