算法
四道风尘
这个作者很懒,什么都没留下…
展开
-
基于堆实现的优先级队列:PriorityQueue 解决 Top K 问题
本文转载于oschina:http://my.oschina.net/leejun2005/blog/135085 目录:[ - ] 1、认识 PriorityQueue2、应用:求 Top K 大/小 的元素3、PriorityQueue 在 hadoop 中的应用:4、REF: 1、认识 PriorityQueue PriorityQueue是从JDK1.5开转载 2013-06-02 18:12:10 · 1235 阅读 · 0 评论 -
一致性hash算法 - consistent hashing
一致性 hash 算法( consistent hashing ) 张亮 consistent hashing 算法早在 1997 年就在论文 Consistent hashing and random trees 中被提出,目前在cache 系统中应用越来越广泛; 1 基本场景 比如你有 N 个 cache 服务器(后面简称 cache ),那么如何将一个对象 object 映射到转载 2014-06-04 14:04:55 · 418 阅读 · 0 评论