@InterfaceAudience.Public public class LossyCounting extends Object
Modifier and Type | Field and Description |
---|---|
private long |
bucketSize |
private long |
currentTerm |
private Map<String,Integer> |
data |
private double |
errorRate |
private static org.slf4j.Logger |
LOG |
private long |
totalDataCount |
Constructor and Description |
---|
LossyCounting() |
LossyCounting(double errorRate) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
addByOne(String key) |
private void |
calculateCurrentTerm()
Calculate and set current term
|
boolean |
contains(String key) |
long |
getBuketSize() |
long |
getCurrentTerm() |
long |
getDataSize() |
private Set<String> |
sweep()
sweep low frequency data
|
private static final org.slf4j.Logger LOG
private long bucketSize
private long currentTerm
private double errorRate
private long totalDataCount
public LossyCounting(double errorRate)
public LossyCounting()
private void calculateCurrentTerm()
public long getBuketSize()
public long getDataSize()
public long getCurrentTerm()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.