1.SettingsModule概述 /** * A module that binds the provided settings to the {@link Settings} interface. */ 2.Setting 2.1 IndexScopedSettings /** * Encapsulates all valid index level settings. * @see Property#IndexScope */ 内置的设置 public static final Set<…
Solr4.8.0源码分析(10)之Lucene的索引文件(3) 1. .si文件 .si文件存储了段的元数据,主要涉及SegmentInfoFormat.java和Segmentinfo.java这两个文件.由于本文介绍的Solr4.8.0,所以对应的是SegmentInfoFormat的子类Lucene46SegmentInfoFormat. 首先来看下.si文件的格式 头部(header) 版本(SegVersion) doc个数(SegSize) 是否符合文档格式(IsCompoundF…
  MesosSchedulerDriver的代码在src/sched/sched.cpp里面实现.     Driver->run()调用start()     首先检测Mesos-Master的leader       创建一个线程.   SchedulerProcess的initialize()函数   里面主要注册消息处理函数.   virtual void initialize()  {    install<Event>(&SchedulerProcess::rece…
ServiceConfig类中的export()方法,是dubbo服务暴露的入口方法,被触发的时机有两个: 1. spring容器初始化完成所有的bean实例后,通过事件机制触发 2. 实现InitializingBean的方法中进行触发 export()方法源码如下: public synchronized void export() { if (provider != null) { if (export == null) { export = provider.getExport(); }…
1.http模块概述 The http module allows to expose Elasticsearch APIs over HTTP. The http mechanism is completely asynchronous in nature, meaning that there is no blocking thread waiting for a response. The benefit of using asynchronous communication for HT…
elasticsearch里面的组件基本都是用Guice的Injector进行注入与获取实例方式进行模块化管理. 在node的构造方法中 /** * Constructs a node * * @param environment the environment for this node * @param classpathPlugins the plugins to be loaded from the classpath * @param forbidPrivateIndexSetting…
因为jdk ByteBuffer使用起来很麻烦,所以netty研发出ByteBuf对象维护管理内存使用ByteBuf有几个概念需要知道1.向ByteBuf提取数据时readerIndex记录最后读取坐标,目的是下次从readerIndex开始读2.向ByteBuf写入数据时writerIndex记录最后写数据坐标3.提取数据范围是readerIndex<=writerIndex,因为先写入数据然后才能读取数据4.自动扩容,当writerIndex达到一定阀值时,会扩大capacity 所以Byt…
1.DiscoveryModule概述 /** * A module for loading classes for node discovery. */ 2.discovery The discovery module is responsible for discovering nodes within a cluster, as well as electing a master node. Note, Elasticsearch is a peer to peer based syste…
1.RestClient /** * Client that connects to an Elasticsearch cluster through HTTP. * <p> * Must be created using {@link RestClientBuilder}, which allows to set all the different options or just rely on defaults. * The hosts that are part of the clust…
1.ActionModule概述 /** * Builds and binds the generic action map, all {@link TransportAction}s, and {@link ActionFilters}. */ 1.1 创建TransportAction static Map<String, ActionHandler<?, ?>> setupActions(List<ActionPlugin> actionPlugins) { //…