我正在尝试使用CQL客户端从cassandra导出数据.列族中包含大约100000行.当我使用COPY TO命令将dta复制到csv文件时,我得到以下rpc_time out错误.
copy mycolfamily to '/root/mycolfamily.csv'
Request did not complete within rpc_timeout.
Run Code Online (Sandbox Code Playgroud)
我在跑:
[cqlsh 3.1.6 | Cassandra 1.2.8 | CQL spec 3.0.0 | Thrift protocol 19.36.0]
如何增加RPC超时限制?
我尝试rpc_timeout_in_ms: 20000在我的conf/cassandra.yaml文件中添加(defalut是10000).但是当重新启动cassandra时,我得到:
[root@user ~]# null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=rpc_timeout_in_ms for JavaBean=org.apache.cassandra.config.Config@71bfc4fc; Unable to find property 'rpc_timeout_in_ms' on class: org.apache.cassandra.config.Config
Invalid yaml; unable to start server. See log for stacktrace.
Run Code Online (Sandbox Code Playgroud)
该COPY命令目前使用SELECTwith 执行相同的操作LIMIT 99999999.因此,当数据增长时,它最终会超时.这是导出功能;
https://github.com/apache/cassandra/blob/trunk/bin/cqlsh#L1524
我在生产上做同样的出口.我正在做的是以下几点;
您可以通过以下cqlsh命令在cqlsh中管道命令
echo "{$cql}" | /usr/bin/cqlsh -u user -p password localhost 9160 > file.csv
| 归档时间: |
|
| 查看次数: |
5388 次 |
| 最近记录: |