将CSV文件导入Cassandra工作区时出现Python错误

时间:2018-02-08 11:37:24

标签: python import cassandra

我正在使用Oracle数据库,我刚开始使用Cassandra。我开始使用导出/导入CSV文件等基本任务。它在我的交互环境中运行良好,但在生产环境中停滞不前。这是错误:

  

Process ImportProcess-1:Traceback(最近一次调用最后一次):File   “/usr/lib64/python2.6/multiprocessing/process.py”,第232行,......   无法连接到任何服务器,{'AQPLCS08':错误('解包需要   长度为4的字符串参数

我执行这样的导入命令:

cqlsh AQILCS01 -e "COPY ks_mdm.prueba_alarmas from '/tmp/datos_alarmas.csv'"

我在网上查找解决方法,但我没有找到任何信息。 有谁知道吗?

1 个答案:

答案 0 :(得分:0)

这是定义:

 describe datos_alarmas_2;

CREATE TABLE ks_mdm.datos_alarmas_2 (
    device text PRIMARY KEY,
    valor text
) WITH bloom_filter_fp_chance = 1.0
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    AND comment = ''
    AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 0
    AND gc_grace_seconds = 7200
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.1
    AND speculative_retry = '99.0PERCENTILE';