public class MetricsServiceImpl extends org.apache.hive.service.AbstractService implements MetricsService
| Modifier and Type | Class and Description |
|---|---|
class |
MetricsServiceImpl.AsyncQueryStatusListener
The listener interface for receiving asyncQueryStatus events.
|
class |
MetricsServiceImpl.AsyncSessionEventListener
The listener interface for receiving asyncSession events.
|
ACCEPTED_QUERIES, ACTIVE_SESSIONS, CANCELLED_QUERIES, CLOSED_SESSIONS, EXPIRED_SESSIONS, FAILED_QUERIES, FINISHED_QUERIES, LAUNCHING_QUERIES, NAME, OPENED_SESSIONS, QUEUED_QUERIES, RUNNING_QUERIES, WAITING_QUERIES| Constructor and Description |
|---|
MetricsServiceImpl(String name)
Instantiates a new metrics service impl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrCounter(Class<?> cls,
String counter)
Decrement a counter with the name costructed using given class and counter name Actual name of the counter will be
|
void |
decrCounter(String counter)
Decrement a counter with the given name Actual name of the counter will be
|
int |
getActiveSessions()
Specifies the count of all opened sessions which are not closed after restarted and the restored sessions
|
long |
getCounter(Class<?> cls,
String counter)
Get current value of the counter.
|
long |
getCounter(String counter)
Get current value of the counter.
|
long |
getFinishedQueries() |
com.codahale.metrics.health.HealthCheckRegistry |
getHealthCheck()
The health check.
|
HealthStatus |
getHealthStatus()
Returns the health status of the service.
|
MethodMetricsContext |
getMethodMetricsContext(org.glassfish.jersey.server.model.ResourceMethod method,
org.glassfish.jersey.server.ContainerRequest containerRequest)
Called by LensRequestListener in start event.
|
MethodMetricsFactory |
getMethodMetricsFactory()
All method meters.
|
com.codahale.metrics.MetricRegistry |
getMetricRegistry()
The metric registry.
|
long |
getQueuedQueries() |
List<com.codahale.metrics.ScheduledReporter> |
getReporters()
The reporters.
|
long |
getRunningQueries() |
long |
getTotalAcceptedQueries() |
long |
getTotalCancelledQueries() |
long |
getTotalClosedSessions()
Specifies the number of sessions closed
|
long |
getTotalDatabaseResourceLoadErrors() |
long |
getTotalExpiredSessions()
Specifies the number of sessions were idle for more than session timeout
|
long |
getTotalFailedQueries() |
long |
getTotalFinishedQueries() |
long |
getTotalOpenedSessions()
Specifies the count of opened sessions
|
long |
getTotalServerStatePersistenceErrors() |
long |
getTotalSuccessfulQueries() |
long |
getWaitingQueries() |
void |
incrCounter(Class<?> cls,
String counter)
Increment a counter with the name constructed using given class and counter name Actual name of the counter will
be
|
void |
incrCounter(String counter)
Increment a counter with the given name Actual name of the counter will be
|
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf) |
boolean |
isEnableResourceMethodMetering() |
void |
publishReport()
Publish report.
|
void |
setEnableResourceMethodMetering(boolean enableResourceMethodMetering) |
void |
start() |
void |
stop() |
public MetricsServiceImpl(String name)
name - the namepublic void setEnableResourceMethodMetering(boolean enableResourceMethodMetering)
public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init in interface org.apache.hive.service.Serviceinit in class org.apache.hive.service.AbstractServicepublic MethodMetricsContext getMethodMetricsContext(org.glassfish.jersey.server.model.ResourceMethod method, org.glassfish.jersey.server.ContainerRequest containerRequest)
getMethodMetricsContext in interface MetricsServicemethod - the resource methodcontainerRequest - container requestMetricsService.getMethodMetricsContext(
org.glassfish.jersey.server.model.ResourceMethod, org.glassfish.jersey.server.ContainerRequest)public void start()
start in interface org.apache.hive.service.Servicestart in class org.apache.hive.service.AbstractServicepublic void stop()
stop in interface org.apache.hive.service.Servicestop in class org.apache.hive.service.AbstractServicepublic void incrCounter(String counter)
MetricsServiceMetricRegistry.name(MetricsService.class, counter)
incrCounter in interface MetricsServicecounter - the counterpublic void decrCounter(String counter)
MetricsServiceMetricRegistry.name(MetricsService.class, counter)
decrCounter in interface MetricsServicecounter - the counterpublic void incrCounter(Class<?> cls, String counter)
MetricsServiceMetricRegistry.name(cls, counter)
incrCounter in interface MetricsServicecls - Class of the counter for namespacing the countercounter - the counterpublic void decrCounter(Class<?> cls, String counter)
MetricsServiceMetricRegistry.name(cls, counter)
decrCounter in interface MetricsServicecls - Class of the counter for namespacing of counterscounter - the counterpublic long getCounter(String counter)
MetricsServicegetCounter in interface MetricsServicecounter - the counterpublic long getCounter(Class<?> cls, String counter)
MetricsServicegetCounter in interface MetricsServicecls - the clscounter - the counterpublic long getTotalDatabaseResourceLoadErrors()
getTotalDatabaseResourceLoadErrors in interface MetricsServicepublic long getQueuedQueries()
getQueuedQueries in interface MetricsServicepublic long getRunningQueries()
getRunningQueries in interface MetricsServicepublic long getWaitingQueries()
getWaitingQueries in interface MetricsServicepublic long getFinishedQueries()
getFinishedQueries in interface MetricsServicepublic long getTotalAcceptedQueries()
getTotalAcceptedQueries in interface MetricsServicepublic long getTotalFinishedQueries()
getTotalFinishedQueries in interface MetricsServicepublic long getTotalCancelledQueries()
getTotalCancelledQueries in interface MetricsServicepublic long getTotalFailedQueries()
getTotalFailedQueries in interface MetricsServicepublic int getActiveSessions()
MetricsServicegetActiveSessions in interface MetricsServicepublic HealthStatus getHealthStatus()
HealthCheckablegetHealthStatus in interface HealthCheckablepublic long getTotalOpenedSessions()
MetricsServicegetTotalOpenedSessions in interface MetricsServicepublic long getTotalClosedSessions()
MetricsServicegetTotalClosedSessions in interface MetricsServicepublic long getTotalExpiredSessions()
MetricsServicegetTotalExpiredSessions in interface MetricsServicepublic long getTotalServerStatePersistenceErrors()
getTotalServerStatePersistenceErrors in interface MetricsServicepublic void publishReport()
MetricsServicepublishReport in interface MetricsServicepublic long getTotalSuccessfulQueries()
getTotalSuccessfulQueries in interface MetricsService@Generated(value="lombok") public com.codahale.metrics.MetricRegistry getMetricRegistry()
@Generated(value="lombok") public List<com.codahale.metrics.ScheduledReporter> getReporters()
@Generated(value="lombok") public com.codahale.metrics.health.HealthCheckRegistry getHealthCheck()
@Generated(value="lombok") public MethodMetricsFactory getMethodMetricsFactory()
@Generated(value="lombok") public boolean isEnableResourceMethodMetering()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.