转自
http://blog.sina.com.cn/s/blog_7905e70c0101kz7d.html
Suppose you have a master node(or are able to use a consensus protocol to elect a master from among your servers). The master first queries the servers for the size of their sets of data, call this n, so that it knows to look for the k = s*n/2 largest element.
Suppose you have a master node