Cassandra .csv import error:batch too large

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 02:46:18

The error you're encountering is a server-side error message, saying that the size (in term of bytes count) of your batch insert is too large.

This batch size is defined in the cassandra.yaml file:

# Log WARN on any batch size exceeding this value. 5kb per batch by default.
# Caution should be taken on increasing the size of this threshold as it can lead to node instability.
batch_size_warn_threshold_in_kb: 5

# Fail any batch exceeding this value. 50kb (10x warn threshold) by default.
batch_size_fail_threshold_in_kb: 50

If you insert a lot of big columns (in size) you may reach quickly this threshold. Try to reduce MAXBATCHSIZE to 200.

More info on COPY options here

Adding the CHUNKSIZE keyword resolved the problem for me.

e.g. copy event_stats_user from '/home/kiren/dumps/event_stats_user.csv ' with CHUNKSIZE=1 ;

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!