@InterfaceAudience.Private public class MetricsUserSourceImpl extends Object implements MetricsUserSource
Modifier and Type | Class and Description |
---|---|
(package private) static class |
MetricsUserSourceImpl.ClientMetricsImpl |
MetricsUserSource.ClientMetrics
Modifier and Type | Field and Description |
---|---|
private MetricHistogram |
appendHisto |
private ConcurrentHashMap<String,MetricsUserSource.ClientMetrics> |
clientMetricsMap |
private AtomicBoolean |
closed |
private MetricHistogram |
deleteHisto |
private MetricHistogram |
getHisto |
private int |
hashCode |
private MetricHistogram |
incrementHisto |
private static org.slf4j.Logger |
LOG |
private MetricHistogram |
putHisto |
private DynamicMetricsRegistry |
registry |
private MetricHistogram |
replayHisto |
private MetricHistogram |
scanTimeHisto |
private String |
user |
private String |
userAppendKey |
private String |
userDeleteKey |
private String |
userGetKey |
private String |
userIncrementKey |
private String |
userNamePrefix |
private String |
userPutKey |
private String |
userReplayKey |
private String |
userScanTimeKey |
Constructor and Description |
---|
MetricsUserSourceImpl(String user,
MetricsUserAggregateSourceImpl agg) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MetricsUserSource source) |
void |
deregister() |
boolean |
equals(Object obj) |
Map<String,MetricsUserSource.ClientMetrics> |
getClientMetrics()
Metrics collected at client level for a user(needed for reporting through clusterStatus and
hbtop currently)
|
void |
getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector,
boolean all) |
MetricsUserSource.ClientMetrics |
getOrCreateMetricsClient(String client)
Create a instance of ClientMetrics if not present otherwise return the previous one
|
String |
getUser() |
int |
hashCode() |
void |
register() |
(package private) void |
snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb,
boolean ignored) |
void |
updateAppend(long t) |
void |
updateDelete(long t) |
void |
updateGet(long t) |
void |
updateIncrement(long t) |
void |
updatePut(long t) |
void |
updateReplay(long t) |
void |
updateScanTime(long t) |
private static final org.slf4j.Logger LOG
private final String userNamePrefix
private final String userGetKey
private final String userScanTimeKey
private final String userPutKey
private final String userDeleteKey
private final String userIncrementKey
private final String userAppendKey
private final String userReplayKey
private MetricHistogram getHisto
private MetricHistogram scanTimeHisto
private MetricHistogram putHisto
private MetricHistogram deleteHisto
private MetricHistogram incrementHisto
private MetricHistogram appendHisto
private MetricHistogram replayHisto
private final int hashCode
private AtomicBoolean closed
private final DynamicMetricsRegistry registry
private ConcurrentHashMap<String,MetricsUserSource.ClientMetrics> clientMetricsMap
public MetricsUserSourceImpl(String user, MetricsUserAggregateSourceImpl agg)
public void register()
register
in interface MetricsUserSource
public void deregister()
deregister
in interface MetricsUserSource
public String getUser()
getUser
in interface MetricsUserSource
public int compareTo(MetricsUserSource source)
compareTo
in interface Comparable<MetricsUserSource>
void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb, boolean ignored)
public void updatePut(long t)
updatePut
in interface MetricsUserSource
public void updateDelete(long t)
updateDelete
in interface MetricsUserSource
public void updateGet(long t)
updateGet
in interface MetricsUserSource
public void updateIncrement(long t)
updateIncrement
in interface MetricsUserSource
public void updateAppend(long t)
updateAppend
in interface MetricsUserSource
public void updateReplay(long t)
updateReplay
in interface MetricsUserSource
public void updateScanTime(long t)
updateScanTime
in interface MetricsUserSource
public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
getMetrics
in interface MetricsUserSource
public Map<String,MetricsUserSource.ClientMetrics> getClientMetrics()
MetricsUserSource
getClientMetrics
in interface MetricsUserSource
public MetricsUserSource.ClientMetrics getOrCreateMetricsClient(String client)
MetricsUserSource
getOrCreateMetricsClient
in interface MetricsUserSource
client
- hostname of the clientCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.