我如何将DSBulk卸载生成的文件限制为只有一个CSV文件?
我已经在EC2实例中运行以下命令以从Cassandra卸载数据并将其存储在EC2中的某个位置,但是我观察到,对于每个DSBULK卸载命令,它都会生成2个JSON文件,而不管文件大小的大小。
我如何控制生成多少个文件?例如,假设我想要一个特定的dsbulk卸载来生成5个部分文件而不是2个文件?
dsbulk unload -k custdata -t orderhistory -h '172.xx.xx.xxx' -c json -url proddata/json/custdata/orderhistory/data
I have run below command in EC2 instance to unload data from cassandra and store it at some place in EC2, But I observing that for each dsbulk unload command it generates 2 json files irrespective of how large or small the file size is.
How do I have control over how many files are generated? example, Suppose I want a particular dsbulk unload to generate 5 part files instead of 2?
dsbulk unload -k custdata -t orderhistory -h '172.xx.xx.xxx' -c json -url proddata/json/custdata/orderhistory/data
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
dataStax bulk loader 默认行为的默认行为多个线程如果机器有多个内核。
要将书面文件的数量限制为单个CSV,请将文件并发设置为1:
请注意,这将限制DSBULK的吞吐量,因为它将是单线线程。
有关详细信息,请参见
[更新] 与Alex Dutra/dsbulk Dev的建议一样,在
-maxConcurrentFiles
中与单个dash(-
)一起使用。The default behaviour for the DataStax Bulk Loader is to parallelise the tasks into multiple threads if the machine has multiple cores.
To limit the number of written files to a single CSV, set the file concurrency to 1 with:
Just be aware that this will limit the throughput of DSBulk since it will be single-threaded.
For details, see DSBulk Connector options. Cheers!
[UPDATED] Use with a single dash (
-
) in-maxConcurrentFiles
as advised by Alex Dutra/DSBulk dev. ????