摘要: canal1.1.4默认是不支持 elasticsearch7.x 的. 这里要非常感谢阿里将这个项目开源出来, 让我们有机会站在人家的肩膀上, 来进行一些改动. 我们可以将 canal1.1.4的 client-adapter 源码下载下来, 然后进行调试. 1. elasticsearch推荐我 阅读全文
posted @ 2020-11-05 22:22 Sniper_ZL 阅读(831) 评论(0) 推荐(0) 编辑
摘要: 一 整合 整合代码放在 https://gitee.com/elvinle/jd_pachong.git 中, 并不复杂 elasticsearch 官方推荐使用 rest 方式进行操作. 二 库操作 private static String INDEX_DEFAULT = "elvin"; pr 阅读全文
posted @ 2020-10-20 14:38 Sniper_ZL 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 接着上一篇, 进行 query 复杂查询 must 这种关系, 相当于 and , 必须同时满足才行 should 这种关系, 相当于 or , 满足一个就可以了 这里查出了3条数据 must_not must_not 相当于是 !should , 所以这里查出了1条数据. 所有的都不满足才可以查出 阅读全文
posted @ 2020-10-20 14:37 Sniper_ZL 阅读(854) 评论(0) 推荐(0) 编辑
摘要: 一. 前言 最近闲赋在家, 准备对以前项目中使用的一些技术, 进行一次总结. 故有了这篇小文 elasticsearch在管理类项目中, 用的少, 但是在商品类项目中, 用的还是很多的. 我们在项目中, 会将 canal 配合着elasticsearch来使用. (canal 会将自己伪装成 mys 阅读全文
posted @ 2020-10-20 14:35 Sniper_ZL 阅读(880) 评论(0) 推荐(0) 编辑
摘要: 管道方法 org.apache.catalina.core.StandardWrapperValve#invoke() 执行的时候, 创建了一个过滤器链, 并且进行了调用: //过滤器链 ApplicationFilterChain filterChain = ApplicationFilterFa 阅读全文
posted @ 2020-08-23 11:26 Sniper_ZL 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 上一篇终于找到了调用管道方法的地方, 代码片段: //org/apache/catalina/connector/CoyoteAdapter#service // Parse and set Catalina and configuration specific // request paramet 阅读全文
posted @ 2020-08-23 11:24 Sniper_ZL 阅读(317) 评论(0) 推荐(0) 编辑
摘要: tomcat启动的时候, 起了异步起了两个类: Poller 和 Acceptor. 默认情况下, 是由 NioEndpoint 的 Acceptor 来监听接收请求的. Acceptor.run() 代码片段: //org.apache.tomcat.util.net.NioEndpoint.Ac 阅读全文
posted @ 2020-08-23 11:22 Sniper_ZL 阅读(1104) 评论(0) 推荐(0) 编辑
摘要: 通过前面执行的流程, 大致可以画出一些时序图来, 通过时序图, 可以更加清晰的观看整个流程走向. Bootstrap.start(): Engine 和 Connector 内容比较多, 只能分出来画了 Engine.start() Connector.start() 阅读全文
posted @ 2020-08-23 11:21 Sniper_ZL 阅读(162) 评论(0) 推荐(0) 编辑
摘要: StandardService#startInternal中, 除了调用了 engine.start()外, 还调用了 connector#start() Connector#start() connector.start()最终调用的是 Connector#startInternal()方法. p 阅读全文
posted @ 2020-08-23 11:20 Sniper_ZL 阅读(244) 评论(0) 推荐(1) 编辑
摘要: 接着上一篇, 该到StandardContext的 init 和 startInternal 方法了. StandardContext#initInternal() 此方法由 org.apache.catalina.util.LifecycleBase#init() 调用而来. //org.apac 阅读全文
posted @ 2020-08-23 11:19 Sniper_ZL 阅读(260) 评论(0) 推荐(0) 编辑