1
在mongodb中有一个名为'my.study.stable'的集合。 现在我使用MongoDB Connector for Hadoop(配置单元)连接集合。 我的create语句是如何使用mongo-hadoop访问名为“my.study.stable”的mongodb集合
CREATE EXTERNAL TABLE mytable(
\t song_id BIGINT,
\t ctime BIGINT
)
STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
WITH SERDEPROPERTIES('mongo.columns.mapping'=
'{"song_id":"_id",
"ctime":"ctime"}')
TBLPROPERTIES('mongo.uri'='mongodb://username:[email protected]:port/mzk_spiders.my.study.stable');
CREATE语句excutes success.But当我查询数据,我出现的错误是这样的:
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 –
您是否找到解决方案?我得到相同的错误 –
得到它的工作,请参阅下面的答案 –