@InterfaceAudience.Private public class MetricsSink extends Object
Modifier and Type | Field and Description |
---|---|
private long |
lastTimestampForAge |
private MetricsReplicationSinkSource |
mss |
private long |
startTimestamp |
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.
|
void |
applyBatch(long batchSize,
long hfileSize)
Convience method to change metrics when a batch of operations are applied.
|
long |
getAgeOfLastAppliedOp()
Get the Age of Last Applied Op n
|
long |
getAppliedOps()
Gets the total number of OPs delivered to this sink.
|
protected long |
getFailedBatches()
Get the count of the failed bathes n
|
long |
getStartTimestamp()
Gets the time stamp from when the Sink was initialized.
|
long |
getTimestampOfLastAppliedOp()
Get the TimestampOfLastAppliedOp.
|
long |
getTimeStampOfLastAppliedOp()
Deprecated.
Since 2.0.0. Will be removed in 3.0.0.
|
void |
incrementFailedBatches()
Convenience method to update metrics when batch of operations has failed.
|
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
|
private long lastTimestampForAge
private long startTimestamp
private final MetricsReplicationSinkSource mss
public MetricsSink()
public long setAgeOfLastAppliedOp(long timestamp)
timestamp
- The timestamp of the last operation applied.public long refreshAgeOfLastAppliedOp()
public void applyBatch(long batchSize)
public void applyBatch(long batchSize, long hfileSize)
batchSize
- total number of mutations that are applied/replicatedhfileSize
- total number of hfiles that are applied/replicatedpublic void incrementFailedBatches()
protected long getFailedBatches()
public long getAgeOfLastAppliedOp()
@Deprecated public long getTimeStampOfLastAppliedOp()
getTimestampOfLastAppliedOp()
public long getTimestampOfLastAppliedOp()
public long getStartTimestamp()
public long getAppliedOps()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.