我正在使用 Cassandra 的 COPY 命令(可以在 https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/cqlshCopy.html 找到文档)将大型表导出到 CSV在此之后我需要导出更大的。
我使用的命令是:
COPY my_table_name TO 'my_table_name.csv'
运行 12 小时(并创建 289GB 文件)后,我收到以下错误:
Error for (3598295844520231142, 3615644561192297385): ReadFailure - Error from server: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} (permanently given up after 349000 rows and 1 attempts)
Exported 1280 ranges out of 1281 total ranges, some records might be missing
我想知道是否有办法从失败点继续下去。我看到错误显示“在 1281 个总范围中导出了 1280 个范围”,有没有办法只指定最后一个范围,这样我就不需要再次尝试导出整个表?
文档提到了 BEGINTOKEN 和ENDTOKEN,但我不清楚它们是什么意思,如果它们可以帮助我的话。
是否有更可靠的方法来导出表?