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, 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.Service
init
in class org.apache.hive.service.AbstractService
public MethodMetricsContext getMethodMetricsContext(org.glassfish.jersey.server.model.ResourceMethod method, org.glassfish.jersey.server.ContainerRequest containerRequest)
getMethodMetricsContext
in interface MetricsService
method
- 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.Service
start
in class org.apache.hive.service.AbstractService
public void stop()
stop
in interface org.apache.hive.service.Service
stop
in class org.apache.hive.service.AbstractService
public void incrCounter(String counter)
MetricsService
MetricRegistry.name(MetricsService.class, counter)
incrCounter
in interface MetricsService
counter
- the counterpublic void decrCounter(String counter)
MetricsService
MetricRegistry.name(MetricsService.class, counter)
decrCounter
in interface MetricsService
counter
- the counterpublic void incrCounter(Class<?> cls, String counter)
MetricsService
MetricRegistry.name(cls, counter)
incrCounter
in interface MetricsService
cls
- Class of the counter for namespacing the countercounter
- the counterpublic void decrCounter(Class<?> cls, String counter)
MetricsService
MetricRegistry.name(cls, counter)
decrCounter
in interface MetricsService
cls
- Class of the counter for namespacing of counterscounter
- the counterpublic long getCounter(String counter)
MetricsService
getCounter
in interface MetricsService
counter
- the counterpublic long getCounter(Class<?> cls, String counter)
MetricsService
getCounter
in interface MetricsService
cls
- the clscounter
- the counterpublic long getTotalDatabaseResourceLoadErrors()
getTotalDatabaseResourceLoadErrors
in interface MetricsService
public long getQueuedQueries()
getQueuedQueries
in interface MetricsService
public long getRunningQueries()
getRunningQueries
in interface MetricsService
public long getWaitingQueries()
getWaitingQueries
in interface MetricsService
public long getFinishedQueries()
getFinishedQueries
in interface MetricsService
public long getTotalAcceptedQueries()
getTotalAcceptedQueries
in interface MetricsService
public long getTotalFinishedQueries()
getTotalFinishedQueries
in interface MetricsService
public long getTotalCancelledQueries()
getTotalCancelledQueries
in interface MetricsService
public long getTotalFailedQueries()
getTotalFailedQueries
in interface MetricsService
public int getActiveSessions()
MetricsService
getActiveSessions
in interface MetricsService
public HealthStatus getHealthStatus()
HealthCheckable
getHealthStatus
in interface HealthCheckable
public long getTotalOpenedSessions()
MetricsService
getTotalOpenedSessions
in interface MetricsService
public long getTotalClosedSessions()
MetricsService
getTotalClosedSessions
in interface MetricsService
public long getTotalExpiredSessions()
MetricsService
getTotalExpiredSessions
in interface MetricsService
public long getTotalServerStatePersistenceErrors()
getTotalServerStatePersistenceErrors
in interface MetricsService
public void publishReport()
MetricsService
publishReport
in interface MetricsService
public 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–2015 Apache Software Foundation. All rights reserved.