Coder Social home page Coder Social logo

Comments (2)

jokerZH avatar jokerZH commented on June 20, 2024

除了使用lucene的indexWriter,还有一种办法把lucene文件加入到一个空的shard,步骤如下

  1. 将索引close
  2. 删除shard中原先的lucene目录和translog目录
  3. 将lucene文件和translog文件拷贝到shard对应的目录中
    4.将索引open,就可以查询了

不过上面的方法有个问题,close和open的操作需要经过master,很容易对master造成压力,任务数较多的情况下,会出现master处理不过来的情况

from es-fastloader.

a129734 avatar a129734 commented on June 20, 2024

试了一下,好像有点问题,还得再请教一下,看看是不是我哪里没理解对~
我的测试索引共有2个分片,我在reduce端启动了2个task,通过map端的路由,把所有数据分成了2份,第一个reduce写入到本地启动的es之后,文件中有2个分片,分片0有数据,分片1是空的,第二个reduce是分片1有数据,分片0是空的。
1、在线上es集群新建一个索引(无副本),关闭索引,通过查询获知新索引的2个分片所在机器
2、把数据从hdfs下载到线上es集群的2个节点上,解压。
3、把第一个reduce的0分片中的index和translog拷贝到0分片所在的机器目录下,此reduce的1分片数据未操作
4、把第二个reduce的1分片中的index和translog拷贝到1分片所在的机器目录下,此reduce的0分片数据未操作
5、打开索引
6、查询过程中发现总条目数争取,但是查询明细的时候总有一个shard报错。。。。
"reason": {
"type": "null_pointer_exception",
"reason": null
}
类似上面的错误信息

from es-fastloader.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.