elasticsearch_cp.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:elasticsearch-copy 作者: xcxsxvx 项目源码 文件源码
def output_es(es, records, start_record_num, end_record_num, total_records, per_batch):
  print("Inserting records %d through %d of %s" % (start_record_num, end_record_num,
    (str(total_records) if total_records > 0 else '???')))
  num_success, error_list = helpers.bulk(es, records, chunk_size=1000)
  if num_success != per_batch:
    print("[ERROR] %d of %d inserts succeeded!" % (num_success,per_batch))
    print("[ERROR] Errors:")
    print error_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号