会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
vsop_479
博客园
首页
新随笔
联系
订阅
管理
[置顶]
在netty decoder层控制heap内存占用,防止es oom
摘要: es使用netty来通信,实现分布式的功能,但在某些场景会oom。 1:netty概述IO 多路复用NioEventLoop.run select由jdk实现在win下使用select,在linux下使用epoll。linux下也可以使用netty实现的epoll:EpollEventLoop。 线
阅读全文
posted @ 2020-04-15 10:31 vsop_479
阅读(439)
评论(0)
推荐(0)
[置顶]
es lucene搜索及聚合流程源码分析
摘要: 本文以TermQuery,GlobalOrdinalsStringTermsAggregator为例,通过代码,分析es,lucene搜索及聚合流程。1:协调节点收到请求后,将search任务发到相关的各个shard。 相关代码: TransportSearchAction.executeSearc
阅读全文
posted @ 2020-01-12 18:42 vsop_479
阅读(1714)
评论(0)
推荐(0)
[置顶]
es lucene写入流程,segment产生机制源码分析
摘要: 本文主要分析es lucene写入流程,lucene segment的产生,flush, commit与es的refresh,flush。 1 segment的产生 当索引一个文档时,如果存在空闲的segment(未被其他线程锁定),则取出空闲segment list中的最后一个segment(LI
阅读全文
posted @ 2018-12-22 20:39 vsop_479
阅读(1808)
评论(2)
推荐(0)
2021年3月23日
docValues文件结构源码分析
摘要: DefaultIndexingChain.flush.writeDocValues时,遍历fields,调用field的DocValuesWriter.flush,如: SortedDocValuesWriter.flush.addSortedField时,获取该field的DocValuesCon
阅读全文
posted @ 2021-03-23 14:40 vsop_479
阅读(145)
评论(0)
推荐(0)
2021年2月28日
lucene update流程源码分析
摘要: update操作buffer到DocumentsWriterDeleteQueue里,flush时处理deletes.DocumentsWriterDeleteQueue使用global DeleteSlice和DWPT DeleteSlice存储deletes。DWPT DeleteSlice用来
阅读全文
posted @ 2021-02-28 19:58 vsop_479
阅读(184)
评论(0)
推荐(0)
2020年12月27日
BooleanQuery与TermInSetQuery分析
摘要: booleanQuery:"must" : [ { "term" : { "like" : "cooking" } }, { "term" : { "property" : "bike" } } ]termInsetQuery:{ "terms": {"like": [ "cooking", "fi
阅读全文
posted @ 2020-12-27 17:03 vsop_479
阅读(362)
评论(0)
推荐(0)
2020年12月22日
postings的存储, 读取, 缓存
摘要: postings的存储, 读取, 缓存一个term的postings list 存储1: sort2: delta3: 每128个docID, 按block存储. block记录bits per value(该block最大值的bits, like fdx)4: skipper(for boolea
阅读全文
posted @ 2020-12-22 15:03 vsop_479
阅读(216)
评论(0)
推荐(0)
2020年12月7日
segment_N解析
摘要: 从最大的segment_N中读取已经提交的segments信息,具体为:从segment_N中读取已经提交的segment的name,id等。再从每个segment对应的si文件中读取segment的docCount,files,attributes等元信息。相关代码:lucene 8.7.0Seg
阅读全文
posted @ 2020-12-07 14:45 vsop_479
阅读(117)
评论(0)
推荐(0)
2020年11月29日
storedField文件结构源码分析
摘要: storedField涉及的主要文件有fdt, fdx. fdt用来分chunk存储数据, fdx来索引这些chunk。 fdt分析fdt写入由CompressingStoredFieldsWriter实现。主要field如下chunkSize: 16K(1 << 14), Lucene50Stor
阅读全文
posted @ 2020-11-29 22:05 vsop_479
阅读(268)
评论(0)
推荐(0)
2020年4月19日
代码中的设计模式
摘要: 策略模式 ThreadPoolExecutor的RejectedExecutionHandler,实现不同的拒绝策略。 装饰者模式 BufferedInputStream对InputStream扩展buffer功能。 工厂模式 Executors作为工厂,提供各种ExecutorService。 命
阅读全文
posted @ 2020-04-19 14:03 vsop_479
阅读(208)
评论(0)
推荐(0)
2020年4月13日
TCP_IP要点
摘要: 一次确认多个数据包在TCP中,ACK是累积的—它们表示接收方已经正确收到了一直到确认序号减1的所有字节. 重传1: client发出数据包后, 没有收到server的ack, 重传.2: server没有收到client的数据, client收到server发来对发过的数据的ack, 重传. 排序接
阅读全文
posted @ 2020-04-13 18:58 vsop_479
阅读(138)
评论(0)
推荐(0)
下一页
公告