博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2018年11月22日

摘要: kafka消息传递同步策略 Producer在发布消息到某个Partition时,先通过ZooKeeper找到该Partition的Leader,然后无论该Topic的Replication Factor为多少,Producer只将该消息发送到该Partition的Leader。Leader会将该消 阅读全文

posted @ 2018-11-22 07:47 钟悍 阅读(160) 评论(0) 推荐(0) 编辑

2018年11月20日

摘要: searchType搜索类型 1、query Then Fetch(默认) 向各分配发起查询,只返回ID, 再次发起查询,获取document 2、query And Fetch 向各分片发起查询document,返回返回聚合 3、DFS Query and Fetch 4、DFS Query th 阅读全文

posted @ 2018-11-20 17:42 钟悍 阅读(146) 评论(0) 推荐(0) 编辑

摘要: spring 生命周期 一个请求提交到被程序接受的整个过程 1、dns解析 2、发起TCP的3次握手 3、建立TCP连接后发起http请求 4、服务器端响应http请求,浏览器得到html代码 Mysql目前主要有以下几种索引类型:FULLTEXT,HASH,BTREE,RTREE。 https:/ 阅读全文

posted @ 2018-11-20 14:06 钟悍 阅读(190) 评论(0) 推荐(0) 编辑

2018年11月18日

摘要: 介绍 IRQBalance主要功能是可以合理的调配使用各个CPU核心,特别是对于目前主流多核心的CPU,简单的说就是能够把压力均匀的分配到各个CPU核心上,对提升性能有很大的帮助。 启用 irqbalance 服务,既可以提升性能,又可以降低能耗。irqbalance 用于优化中断分配,它会自动收集 阅读全文

posted @ 2018-11-18 14:02 钟悍 阅读(974) 评论(0) 推荐(0) 编辑

2018年2月9日

摘要: 背景: 在子类中想链式调用设值(或者builder模式),而有些属性在父类,有些在子类, 传统的方式需要在子类进行强制转换,而强制转换有影响链式调用。 例如: 父类: 子类: 测试: 碰到这种情况, 泛型就可以起作用了, 可以让父类方法返回子类的类型 父类: 子类: 阅读全文

posted @ 2018-02-09 14:53 钟悍 阅读(2101) 评论(0) 推荐(0) 编辑

2018年2月8日

摘要: List> list = new ArrayList(); list.add(Arrays.asList(new Integer[]{1,2})); list.add(Arrays.asList(new Integer[]{3,4})); list.add(null); list.add(Arrays.asList(... 阅读全文

posted @ 2018-02-08 10:53 钟悍 阅读(16618) 评论(1) 推荐(1) 编辑

2016年6月27日

摘要: 15:42:18.079 [ERROR] [org.gradle.BuildExceptionReporter] 15:42:18.081 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an except 阅读全文

posted @ 2016-06-27 15:46 钟悍 阅读(2164) 评论(1) 推荐(0) 编辑

2016年6月23日

摘要: 线程同步 java 编程语言其中一个优点就是提供了语言层面的多线程支持。多线程支持主要是围绕synchronization来展开的:在多个线程之间协调数据访问。java用来实现同步的机制我们称作为monitor.本文将介绍monitor以及java虚拟机是如何使用monitor的——有指令集支持的数 阅读全文

posted @ 2016-06-23 18:27 钟悍 阅读(332) 评论(0) 推荐(0) 编辑

2016年6月14日

摘要: > sudo mkdir /mnt/shared > sudo mount -t vboxsf share /mnt/shared > ln -s /mnt/shared ~/share> sudo vi /etc/fstab add line: share /mnt/shared vboxsf r 阅读全文

posted @ 2016-06-14 11:30 钟悍 阅读(564) 评论(0) 推荐(0) 编辑

2016年6月1日

摘要: The maven way of resolving situations like this is to include a section in your project's root pom, where you specify which version of which library w 阅读全文

posted @ 2016-06-01 16:28 钟悍 阅读(246) 评论(0) 推荐(0) 编辑