随笔分类 - java
摘要:策略模式 ThreadPoolExecutor的RejectedExecutionHandler,实现不同的拒绝策略。 装饰者模式 BufferedInputStream对InputStream扩展buffer功能。 工厂模式 Executors作为工厂,提供各种ExecutorService。 命
阅读全文
摘要:es使用netty来通信,实现分布式的功能,但在某些场景会oom。 1:netty概述IO 多路复用NioEventLoop.run select由jdk实现在win下使用select,在linux下使用epoll。linux下也可以使用netty实现的epoll:EpollEventLoop。 线
阅读全文
摘要:过程 初始标记 从roots(例如:thread stack引用的对象,static对象),新生代对象,标记直接引用的老年代对象。 并发标记 利用初始标记阶段标记的对象,递归标记整个老年代。 该阶段与用户线程并行执行,产生变化的对象(新建,晋升,引用变化(不引用)等)所在的Card标记为Dirty。
阅读全文
摘要:扩容时使用transfertransfer不同于put时的判断hash冲突,直接使用头插法,如果没有冲突,则next为null。如下:e.next = newTable[i];newTable[i] = e;如果线程B设置了newTable[i] = e,线程A执行e.next = newTable
阅读全文
摘要:不使用es-hadoop的saveToES,与scala版本冲突问题太多。不使用bulkprocessor,异步提交,es容易oom,速度反而不快。使用BulkRequestBuilder同步提交。 主要代码 ESClient:
阅读全文
摘要:1:服务器执行nohup sh /usr/local/mat/ParseHeapDump.sh es9.bin org.eclipse.mat.api:suspects org.eclipse.mat.api:overview org.eclipse.mat.api:top_components >
阅读全文
摘要:pid:Unable to open socket file: target process not responding or HotSport VM not loadedThe -F option can be used when the target process is not respon
阅读全文
摘要:开发调式时,对程序生成dump文件:1:需要生成的时机,加Thread.sleep(600*1000)。2:打开jvisualvm找到该程序进程号。3:jmap。
阅读全文
摘要:safepoint: JIT编码时,会在代码中所有方法的返回之前,以及所有非counted loop的循环(无界循环)回跳之前放置一个safepoint(counted loop则没有放置safepoint)。GC 等操作时,需要所有线程达到safepoint。 UseCountedLoopSafe
阅读全文

浙公网安备 33010602011771号