作者:once | 来源:互联网 | 2023-07-23 08:30
Hello,
I have index with 210600 doc,
when i do
1 2 3 4
| elasticdump --input=http://localhost:9200/test \
--output=$ | pv -l -s 210600 | wc -l
211k 0:01:33 [2,24k/s] [===============================>] 100%
210600 |
i get all of the Docs, but when i set --limit
1 2 3 4
| elasticdump --input=http://localhost:9200/test \
--limit=1000000 --output=$ | pv -l -s 210600 | wc -l
24k 0:00:35 [ 684/s ] [============> ] 11%
23998 |
i get only ~24kDocs, 89% of docs is lost .
Again when i set limit, but using redirecting
1 2 3 4
| $elasticdump --input=http://localhost:9200/test \
--limit=1000000 --output=$ > /tmp/1.json
$ wc -l /tmp/1.json
210600 /tmp/1 |
all docs was downloaded.
Now i test pipe, maybe deal goes wrong here
1 2 3
| cat /tmp/1.json | pv -l -s 210600 | wc -l
211k 0:00:04 [ 46k/s] [=====================>] 100%
210600 |
but all docs was go throw the pipe.
So, maybe elasticdump close pipe early (when one bit of data too big) before all docs is reading by reader util?
I need to use pipe for splitting output files.
该提问来源于开源项目:elasticsearch-dump/elasticsearch-dump
I'm using elasticsearch-2.0.1, CentOS 6.7.