【发布时间】:2015-06-12 00:12:57
【问题描述】:
嗨,我在 cassandra db 中有一个列族,当我检查表的内容时,它在用作时显示不同
./cqlsh -2
select * from table1;
KEY,31281881-1bef-447a-88cf-a227dae821d6 | A,0xaa| Cidr,10.10.12.0/24 | B,0xac | C,0x01 | Ip,10.10.12.1 | D,0x00000000 | E,0xace | F,0x00000000 | G,0x7375626e657431 | H,0x666230363 | I,0x00 | J,0x353839
虽然输出是这样的
./cqlsh -3
select * from table1;
key | Cidr | Ip
--------------------------------------+---------------+------------
31281881-1bef-447a-88cf-a227dae821d6 | 10.10.12.0/24 | 10.10.12.1
这个值是使用运行的java程序插入的。
我想假设只有在数据库中手动使用 -2 选项时才能看到库尔“B”的更新值,它给我的错误是它是十六进制值。 我正在使用此命令进行更新,但总是出错
cqlsh:sdnctl_db> update table1 SET B='0x7375626e657431' where key='31281881-1bef-447a-88cf-a227dae821d6';
错误请求:无法将“0x7375626e657431”解析为十六进制字节
cqlsh:sdnctl_db> update table1 SET B=0x7375626e657431 where key='31281881-1bef-447a-88cf-a227dae821d6';
错误请求:第 1:30 行在输入“x7375626e657431”处没有可行的替代方案
cqlsh:sdnctl_db> update table1 SET B=7375626e657431 where key='31281881-1bef-447a-88cf-a227dae821d6';
错误请求:第 1:37 行不匹配的字符 '6' 需要 '-'
我只需要插入应用程序会选择但无法插入的十六进制值。
请帮我纠正语法。
【问题讨论】:
标签: cassandra