@InterfaceAudience.Private public class MetricsSink extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SINK_AGE_OF_LAST_APPLIED_OP |
static String |
SINK_APPLIED_BATCHES |
static String |
SINK_APPLIED_OPS |
Constructor and Description |
---|
MetricsSink() |
Modifier and Type | Method and Description |
---|---|
void |
applyBatch(long batchSize)
Convience method to change metrics when a batch of operations are applied.
|
long |
refreshAgeOfLastAppliedOp()
Refreshing the age makes sure the value returned is the actual one and
not the one set a replication time
|
long |
setAgeOfLastAppliedOp(long timestamp)
Set the age of the last applied operation
|
public static final String SINK_AGE_OF_LAST_APPLIED_OP
public static final String SINK_APPLIED_BATCHES
public static final String SINK_APPLIED_OPS
public long setAgeOfLastAppliedOp(long timestamp)
timestamp
- The timestamp of the last operation applied.public long refreshAgeOfLastAppliedOp()
public void applyBatch(long batchSize)
batchSize
- Copyright © 2014 The Apache Software Foundation. All rights reserved.