热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

elasticdump:can'tworkingthrowlinuxpipes

Hello,Ihaveindexwith210600doc,whenido

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.


推荐阅读
author-avatar
once
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有