如何防止 cassandra get 命令以十六进制显示值
我刚刚开始使用 Cassandra,我遇到了一个特殊的问题,即每当我检索一个值时都会以十六进制返回(请参见下文)。我用谷歌搜索过这个但没有成功。如果您能提供任何帮助,我将不胜感激。谢谢!
[default@MyKeyspace] set User['hirsch']['email'] = '[email protected]';
Value inserted.
[default@MyKeyspace] get User['hirsch']['email'];
=> (column=656d61696c, value=7377686972736368406e79632e72722e636f6d, timestamp=1292294713343000)
I'm just beginning with Cassandra and I have the peculiar problem that whenever I retrieve a value is returns in hex (please see below). I've googled for this without success. I'd appreciate any help that may be forthcoming. Thanks!
[default@MyKeyspace] set User['hirsch']['email'] = '[email protected]';
Value inserted.
[default@MyKeyspace] get User['hirsch']['email'];
=> (column=656d61696c, value=7377686972736368406e79632e72722e636f6d, timestamp=1292294713343000)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
告诉 cassandra 您的列值中有哪些类型的数据:
使用 column_metadata=[{column_name: email, valid_class: UTF8Type}] 更新列族 User;
Tell cassandra what kind of data are in your column values:
update column family User with column_metadata=[{column_name: email, validation_class: UTF8Type}];