user568109
user568109

Reputation: 48013

How to use copy if cqlsh python process takes too much memory

Hi I have system with memory 2GB running cassandra. I am using cqlsh to copy a table data to text file. The cqlsh process keeps consuming more and more memory until OOM killer kills the process. I checked this from dmesg log.

[2432084.824459] Out of memory: Kill process 30688 (python) score 363 or sacrifice child [2432084.824506] Killed process 30688 (python) total-vm:1193556kB, anon-rss:744500kB, file-rss:448kB

On the cqlsh I get

Child process 30685 died with exit code -9

How to get the text file output which I would get from COPY TO.

UPDATE

This or how to copy data of a single instance to another one already having some data ie merge data.

Upvotes: 1

Views: 739

Answers (1)

doanduyhai
doanduyhai

Reputation: 8812

2Gb of RAM is very small. And depending on the size of the dataset you want to export, it may be normal to OOM quickly.

how to copy data of a single instance to another one already having some data ie merge data.

cassandra-loader/cassandra-unloader is your friend. Have a look here: https://github.com/brianmhess/cassandra-loader

Upvotes: 4

Related Questions