创建cqlshrc文件:
[root@db03 ~]# cp /etc/cassandra/default.conf/cqlshrc.example ~/.cassandra/cqlshrc [root@db03 ~]# vi ~/.cassandra/cqlshrc [csv] --加大filed_size_limit的值,默认为131072 field_size_limit = 13107200000错误处理2
Failed to import 20 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="Batch too large", will retry later, attempt 1 of 5编辑cassandra.yaml文件,加大batch_size_fail_threshold_in_kb参数值,比如5120。然后在copy后面加maxbatchsize=1 and minbatchsize=1,如下:
cqlsh> copy mykeysp01.rhnpackagerepodata(id,primary_xml,filelist,other,created,modified) from '/u02/tmp/rhnpackagerepodata.csv' with maxbatchsize=1 and minbatchsize=1;Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx