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

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

问题描述

我在尝试查询Cassandra 1.2.4中的宽行时遇到问题当我尝试使用Cassandra-cli查询该行时,我会收到以下错误:



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



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

 节点的帧大小(最大字段长度)。 
thrift_framed_transport_size_in_mb:1024

#thrift消息的最大长度,包括所有字段和
#internal thrift开销。
thrift_max_message_length_in_mb:1048

但我得到了同样的错误,当我试图查询行使用



当我在日志中启动cassndra时:

  INFO 14:48:34,133使用最大帧大小为1073741824字节的TFramedTransport。 
INFO 14:48:34,137在localhost上使用同步/线程池thrift服务器:9160
INFO 14:48:34,137监听thrift客户端...
pre>

但是在Cassandra cli中,没有反映出更改,是否是我们使用的版本的问题?



感谢您的帮助

解决方案

需要在客户端上设置最大帧大小,硬编码到cassandra-cli中的15 MB。



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



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


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:

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)

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

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

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...

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

Thanks for your help

解决方案

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

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.

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天全站免登陆