|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hive.service.AbstractService org.apache.lens.server.metrics.MetricsServiceImpl
public class MetricsServiceImpl
The Class MetricsServiceImpl.
Nested Class Summary | |
---|---|
class |
MetricsServiceImpl.AsyncQueryStatusListener
The listener interface for receiving asyncQueryStatus events. |
Nested classes/interfaces inherited from interface org.apache.hive.service.Service |
---|
org.apache.hive.service.Service.STATE |
Field Summary | |
---|---|
static org.apache.log4j.Logger |
LOG
The Constant LOG. |
Fields inherited from interface org.apache.lens.server.api.metrics.MetricsService |
---|
ACCEPTED_QUERIES, CANCELLED_QUERIES, FAILED_QUERIES, FINISHED_QUERIES, NAME, QUEUED_QUERIES, RUNNING_QUERIES |
Constructor Summary | |
---|---|
MetricsServiceImpl(String name)
Instantiates a new metrics service impl. |
Method Summary | |
---|---|
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 |
long |
getCounter(Class<?> cls,
String counter)
Get current value of the counter. |
long |
getCounter(String counter)
Get current value of the counter. |
long |
getFinishedQueries()
|
MethodMetricsContext |
getMethodMetricsContext(org.glassfish.jersey.server.model.ResourceMethod method,
org.glassfish.jersey.server.ContainerRequest containerRequest)
Called by LensRequestListener in start event. |
long |
getQueuedQueries()
|
long |
getRunningQueries()
|
long |
getTotalAcceptedQueries()
|
long |
getTotalCancelledQueries()
|
long |
getTotalFailedQueries()
|
long |
getTotalFinishedQueries()
|
long |
getTotalSuccessfulQueries()
|
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)
|
void |
publishReport()
Publish report. |
void |
setEnableResourceMethodMetering(boolean enableResourceMethodMetering)
|
void |
start()
|
void |
stop()
|
Methods inherited from class org.apache.hive.service.AbstractService |
---|
getHiveConf, getName, getServiceState, getStartTime, register, unregister |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger LOG
Constructor Detail |
---|
public MetricsServiceImpl(String name)
name
- the nameMethod Detail |
---|
public 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 request
MetricsService.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 counter
public long getCounter(Class<?> cls, String counter)
MetricsService
getCounter
in interface MetricsService
cls
- the clscounter
- the counter
public long getQueuedQueries()
getQueuedQueries
in interface MetricsService
public long getRunningQueries()
getRunningQueries
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 void publishReport()
MetricsService
publishReport
in interface MetricsService
public long getTotalSuccessfulQueries()
getTotalSuccessfulQueries
in interface MetricsService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |