当前位置:网站首页>ES 源代码阅读(一)「建议收藏」
ES 源代码阅读(一)「建议收藏」
2022-07-19 14:11:00 【全栈程序员站长】
大家好,又见面了,我是全栈君。
启动流程分析:
入口:org.elasticsearch.bootstrap.Elasticsearch->org.elasticsearch.bootstrap.Bootstrap->
生成实例->写进程号->初始化配置文件->初始化设置实例->运行->关闭处理
在初始化设置实例过程中 使用初始化的配置文件初始化node实例,并设置关闭处理.在初始化node过程中,初始化的是InternalNode实例. 在其中的start方法中 使用guice框架,加载不同模块. 首先加载Discovery.class实例,然后执行设置其路由服务. 根据配置可以生成LocalDiscovery和ZenDiscovery. 然后初始化MappingUpdateAction.启动相关线程. 然后依次加载:IndicesService,和IndexingMemoryController,IndicesClusterStateService,IndicesTTLService RiversManager,SnapshotsService, TransportService 启动一系列工作线程. ClusterService ,RoutingService,SearchService,MonitorService,RestController.
LocalGatewayAllocator 初始化
启动DiscoveryService 启动相关线程,初始化GatewayService,启动HTTPServer 启动相关线程,初始化BulkUdpService,初始化ResourceWatcherService,初始化TribeService 以上全部组件设置为启动状态.
当Es处理请求时,会根据请求创建相关EVENT,然后将其和一系列相关listener结合交给线程池去执行,执行过程总,会遍历每个listener,其中传递的参数就是Event,然后执行相关操作.
接下来会结合实际创建索引时的实例来进行源码分析.
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/108841.html原文链接:https://javaforall.cn
边栏推荐
- Jmeter 测试计划无法保存解决办法
- PTH & PTT & PTK of Intranet penetration (domain control)
- Understand chisel language thoroughly 19. Chisel combinational circuit (I) -- chisel combinational circuit and chisel conditional statement
- RT thread studio font zoom shortcut
- Merge sequencing and optimization
- En savoir plus sur le pool de Threads simultanés juc (VIII)
- LeetCode 数据库十道题解答
- Huggingface | BLOOM模型训练背后的技术
- How to open an online account for tongdaxin stock trading? Is there any safety problem??
- 【FAQ】接入HMS Core推送服务,服务端下发消息常见错误码原因分析及解决方法
猜你喜欢
En savoir plus sur le pool de Threads simultanés juc (VIII)
笔记
The current situation of the industry is disappointing. After working, I returned to UC Berkeley to study for a doctoral degree
kylin开启dashboard监控面板
spark源码(七)RDD cache、persist、checkpoint功能区别和源码解析
如何打造3D立体世界?跟随图片一同探寻
jenkins踩坑记录之-升级错误
矽穀課堂第十三課-直播管理模塊
Netease Cloud Voice and Video Capabilities Middle Platform, full Speed Assisting the Digital Transformation and Upgrading of Banking Industry
硅谷课堂第十二课-公众号点播课程和直播管理模块
随机推荐
Google asked Indian taggers to tag reddit comment data sets, with an error rate of up to 30%?
低代码软件开发平台怎么选?
深入了解JUC并发(七)常用的辅助类
TiDB数据库
Data science and Computational Intelligence: connotation, paradigm and opportunity
一张图快速了解Istio中的EnvoyFilter
【深度学习】综述 | 深度学习的最新进展
Interval merging [key problems + Solutions]
泰山OFFICE技术讲座:有哪些关于高度的概念
Introduction to several scenarios involving programming operation of Excel in SAP implementation project
BGP边界网关协议基础知识点
Understand chisel language thoroughly 18. Detailed explanation of chisel module (V) -- Verilog module used in chisel
CompletableFuture 异步处理
Introduction to GC mechanism
建立动态规划状态转移方程的练习
硅谷课堂第十四课-直播对接和微信分享
PTH & PTT & PTK of Intranet penetration (domain control)
国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
In depth understanding of JUC concurrent (VIII) thread pool
读写模型整理笔记