thrift_max_message_length_in_mb 无法识别 Cassandra [英] thrift_max_message_length_in_mb not recognized Cassandra

查看:15
本文介绍了thrift_max_message_length_in_mb 无法识别 Cassandra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试在 Cassandra 1.2.4 中查询宽行时遇到问题当我尝试使用 Cassandra-cli 查询行时,出现此错误:

I am having problems trying to query a wide row in Cassandra 1.2.4 When I tried to query the row using the Cassandra-cli, I obtain this error:

帧尺寸 (75209759) 大于最大长度 (15728640)!org.apache.thrift.transport.TTransportException: 帧大小 (75209759) 大于最大长度 (15728640)!在 org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:137)在 org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)

Frame size (75209759) larger than max length (15728640)! org.apache.thrift.transport.TTransportException: Frame size (75209759) larger than max length (15728640)! at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:137) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)

我尝试更改 Cassandra.yaml 中的下一个配置参数:

I tried to change the next configuration parameters in the Cassandra.yaml:

# Frame size for thrift (maximum field length).
thrift_framed_transport_size_in_mb: 1024

# The max length of a thrift message, including all fields and
# internal thrift overhead.
thrift_max_message_length_in_mb: 1048

但是当我尝试使用 Cassandra cli 查询行时,我得到了同样的错误.

But I obtain the same error when I tried to query the row using the Cassandra cli.

当我启动 cassndra 时,日志中出现:

When I start cassndra in the log appears:

INFO 14:48:34,133 Using TFramedTransport with a max frame size of 1073741824 bytes.
 INFO 14:48:34,137 Using synchronous/threadpool thrift server on localhost : 9160
 INFO 14:48:34,137 Listening for thrift clients...

但是在 Cassandra cli 中并没有反映变化,是不是我们使用的版本有问题?

But in the Cassandra cli the change is not reflected, is it a problem with the version that we are using?

感谢您的帮助

推荐答案

最大帧大小也需要在客户端设置,不幸的是它在 cassandra-cli 中硬编码为 15 MB.

The max frame size needs to be set on the client too, and unfortunately it is hardcoded to 15 MB in cassandra-cli.

一般来说,使用分页和小消息比一次查询大量消息要好得多.您必须显着增加超时才能检索 1 GB 的数据,这会产生其他副作用.

In general, it is much better to use paging and small messages than querying large amounts at once. You would have to significantly increase the timeout to be able to retrieve 1 GB of data and this would have other side effects.

不幸的是,cassandra-cli 不支持检索行的一部分.您可以使用 cqlsh 并使用分页 CQL 查询或使用例如快速编写一些 python 代码pycassa 将翻阅列.

Unfortunately cassandra-cli doesn't support retrieving part of a row. You can use cqlsh and use a paging CQL query or quickly write some python code using e.g. pycassa that would page through the columns.

这篇关于thrift_max_message_length_in_mb 无法识别 Cassandra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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