【发布时间】:2020-01-30 02:51:54
【问题描述】:
在 mongodb 中有一个名为 'my.study.stable' 的集合。 现在我使用 MongoDB Connector for Hadoop(hive) 来连接集合。 我的创建语句是
CREATE EXTERNAL TABLE mytable(
song_id BIGINT,
ctime BIGINT
)
STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
WITH SERDEPROPERTIES('mongo.columns.mapping'=
'{"song_id":"_id",
"ctime":"ctime"}')
TBLPROPERTIES('mongo.uri'='mongodb://username:password@host:port/mzk_spiders.my.study.stable');
create语句执行成功。但是当我查询数据时,出现如下错误:
java.io.IOException: java.io.IOException: Failed to aggregate sample documents. Note that this Splitter implementation is incompatible with MongoDB versions prior to 3.2.
【问题讨论】:
-
合集大小约4.3G
-
您找到解决方案了吗?我遇到了同样的错误
-
搞定了,看看下面的答案