cassandra - 使用 cqlsh 的 COPY 时连接所有副本失败
问题描述
我的 3 节点 Cassandra 集群使用 AWS 弹性负载平衡 (ELB) 部署在 AWS 上
当我运行以下命令时:
$cqlsh -u <userid> -p <pwd> <ELB's ip> -f backup.cqlsh
在 backup.cqlsh 中:
COPY comm_hub.my_table TO 'my_table.csv' WITH PAGESIZE=10;
但是在导出了大约 200 行之后,我得到了
backup.cqlsh:1:
Error for (-429560303281209914, -419692349690315328):
Failed to connect to all replicas ['10.16.234.41', '10.16.233.40', '10.16.234.130'] for (-429560303281209914, -419692349690315328), errors:
['NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.234.41\': error(None, "Tried connecting to [(\'10.16.234.41\', 9042)]. Last error: timed out")})', 'NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.233.40\': error(None, "Tried connecting to [(\'10.16.233.40\', 9042)]. Last error: timed out")})', 'NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.234.130\': error(None, "Tried connecting to [(\'10.16.234.130\', 9042)]. Last error: timed out")})'] (will try again later attempt 1 of 5)
我错过了什么?
解决方案
我在本地集群中遇到了同样的问题,并通过设置解决了它NUMPROCESSES = 1
。
在您提供的示例中:COPY comm_hub.my_table TO 'my_table.csv' WITH PAGESIZE=10 AND NUMPROCESSES=1;
推荐阅读
- logging - 在应用程序脚本 Console.error 函数中添加行号
- go - 如何使用golang创建嵌套json数组对象
- junit - Mockito 是否支持 @Any @Inject Instance<> 接口?
- c# - 微服务通信消息模板方法
- events - 事件驱动架构中的主题粒度
- php - header() 停止页面刷新表单提交的替代方法
- java - 解析日期时出现 java.time.format.DateTimeParseException
- java - 用 for 循环绘制图形(数字)
- sql - 在 Oracle SQL 中识别字符串并将前缀附加到字符串
- java - 如何解决 Java 中没有子包可见性的问题