@InterfaceAudience.Public @InterfaceStability.Evolving public class Statistics extends Object
This class is thread-safe. The user can use it anywhere to get statistics of this client.
The method toString()
can be useful to get a dump of all the metrics aggregated
for all the tablets.
Modifier and Type | Class and Description |
---|---|
static class |
Statistics.Statistic
The statistic enum to pass when querying.
|
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
long |
getClientStatistic(Statistics.Statistic statistic)
Get the statistic count of the whole client.
|
String |
getTableName(String tabletId)
Get table name of the given tablet id.
|
Set<String> |
getTableSet()
Get the set of tables which have been written into by this client,
which have statistics information.
|
long |
getTableStatistic(String tableName,
Statistics.Statistic statistic)
Get the statistic count of this table.
|
Set<String> |
getTabletSet()
Get the set of tablets which have been written into by this client,
which have statistics information.
|
long |
getTabletStatistic(String tabletId,
Statistics.Statistic statistic)
Get the statistic count of this tablet.
|
String |
toString() |
public long getTabletStatistic(String tabletId, Statistics.Statistic statistic)
tabletId
- the tablet's idstatistic
- the statistic type to getpublic long getTableStatistic(String tableName, Statistics.Statistic statistic)
tableName
- the table's namestatistic
- the statistic type to getpublic long getClientStatistic(Statistics.Statistic statistic)
statistic
- the statistic type to getpublic Set<String> getTabletSet()
public Set<String> getTableSet()
public String getTableName(String tabletId)
tabletId
- the tablet's idCopyright © 2018 The Apache Software Foundation. All rights reserved.