复制命令在Cassandra中不起作用 [英] Copy command not working in Cassandra

查看:79
本文介绍了复制命令在Cassandra中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在cassandra中运行COPY命令。这是我使用的ColumnFamily

I am unable to run the COPY command in cassandra. Here is the ColumnFamily that I am using

CREATE TABLE ap_perf_sample_data_tbl(
ap_mac varchar,
ap_proto int,
stime int,
ap_active_status int,
bytes_from_dev int,
bytes_to_dev int,
location_id int,
num_assocs int,
num_data_pkts int,
num_retry_pkts int,
throughput_from_ap int,
throughput_to_ap int,
throughput_total_ap int,
time_spent_on_channel int,
time_util_by_ap int,
PRIMARY KEY ((ap_mac, ap_proto), stime)



我试图在cqlsh中使用COPY命令如下: / p>

I'm trying to use the COPY command in cqlsh as follows:


cqlsh:performance_data> 复制ap_perf_sample_data_tbl (ap_mac,
ap_proto,stime,location_id,num_data_pkts,num_retry_pkts ,从 / tmp / top';
<

$ b,ap_active_status)中的
num_assocs,time_util_by_ap,time_spent_on_channel,throughput_to_ap,
throughput_from_ap,throughput_total_ap,bytes_to_dev,bytes_from_dev
, b>错误请求:无效
int_proto类型为int 的STRING常量(1)
在记录#0(第1行)中止导入

以前插入的值仍然为

在0.008秒内导入0行。

cqlsh:performance_data>

cqlsh:performance_data> copy ap_perf_sample_data_tbl (ap_mac, ap_proto , stime, location_id, num_data_pkts, num_retry_pkts, num_assocs, time_util_by_ap, time_spent_on_channel, throughput_to_ap, throughput_from_ap, throughput_total_ap, bytes_to_dev, bytes_from_dev ,ap_active_status) from '/tmp/top';
Bad Request: Invalid STRING constant (1) for ap_proto of type int
Aborting import at record #0 (line 1).
Previously-inserted values still present.
0 rows imported in 0.008 seconds.
cqlsh:performance_data>

/ tmp / top的内容

Contents of "/tmp/top"








00 :00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10
00:00:02:00: 02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10
00:00:03:00:03:00,1,1359532800 ,3,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10
00:00:04:00:04:00,1,1359532800,4,6002166,312781, 10,845100,9045000,259143,241011,52835,186318,5413799,10

00:00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10 00:00:02:00:02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10 00:00:03:00:03:00,1,1359532800,3,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10 00:00:04:00:04:00,1,1359532800,4,6002166,312781,10,845100,9045000,259143,241011,52835,186318,5413799,10






以下是版本信息。


Following is the version information.


[root @ localhost〜]#cqlsh通过
localhost:9160连接到测试集群。 [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 |
Thrift protocol 19.35.0]使用帮助帮助。

[root@localhost ~]# cqlsh Connected to Test Cluster at localhost:9160. [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 | Thrift protocol 19.35.0] Use HELP for help.

任何关于为什么会发生这种情况的线索。

Any clues as to why this may happen will be appreciated.

推荐答案

Bug#5305在1.2.2 Cassandra中为此问题提交。

Bug#5305 filed for this issue in 1.2.2 Cassandra.

这篇关于复制命令在Cassandra中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆