hive-site.xml中的以下属性是否适合Hive访问cassandra ??
(我已经复制了整个HIVE-DEFAULT.XML内容,但只改变了以下属性)
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
我正在运行单节点Cassandra。但是,稍后会使它成为最小的2节点集群。
当我运行下面的表创建命令时,我收到一个错误:
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");
错误:
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
答案 0 :(得分:0)
不了解jdo设置,但你可以尝试这个链接,这是将hive与cassandra集成的更好选择 - https://github.com/milliondreams/hive/tree/cas-support-cql/cassandra-handler