关于大数据去重的一些总结

关于大数据去重的一些总结

前言

之前在实习的公司里, 涉及到从 Hbase 中去数据转储到 MongoDB 这一过程, 其中取数据的依据是 redis 中存放的 id 队列, 因为往这个队列中生产ID完全是另一个项目组的行为, 在这一过程中当然会涉及到数据重复的问题, 针对这一问题, 当时项目中的做法是: 利用 redis 中 HyperLoglog 这一数据结构来去重.

HyperLoglog

Redis HyperLogLog是一种使用随机化的算法,以少量内存提供集合中唯一元素数量的近似值。

定义

A HyperLogLog is a probabilistic data structure used in order to count unique things (technically this is referred to estimating the cardinality of a set). Usually counting unique items requires using an amount of memory proportional to the number of items you want to count, because you need to remember the elements you have already seen in the past in order to avoid counting them multiple times. However there is a set of algorithms that trade memory for precision: you end with an estimated measure with a standard error, in the case of the Redis implementation, which is less than 1%. The magic of this algo

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值