org.apache.lens.server
Class MetricsServiceImpl

java.lang.Object
  extended by org.apache.hive.service.AbstractService
      extended by org.apache.lens.server.MetricsServiceImpl
All Implemented Interfaces:
org.apache.hive.service.Service, MetricsService

public class MetricsServiceImpl
extends org.apache.hive.service.AbstractService
implements MetricsService

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.
static String METRICS_SVC_NAME
          The Constant METRICS_SVC_NAME.
 
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)
           
 void decrCounter(String counter)
           
 long getCounter(Class<?> cls, String counter)
           
 long getCounter(String counter)
           
 long getFinishedQueries()
           
 long getQueuedQueries()
           
protected  List<com.codahale.metrics.ScheduledReporter> getReporters()
           
 long getRunningQueries()
           
 long getTotalAcceptedQueries()
           
 long getTotalCancelledQueries()
           
 long getTotalFailedQueries()
           
 long getTotalFinishedQueries()
           
 long getTotalSuccessfulQueries()
           
 void incrCounter(Class<?> cls, String counter)
           
 void incrCounter(String counter)
           
 void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
           
protected  void initCounters()
          Inits the counters.
 void publishReport()
           
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METRICS_SVC_NAME

public static final String METRICS_SVC_NAME
The Constant METRICS_SVC_NAME.

See Also:
Constant Field Values

LOG

public static final org.apache.log4j.Logger LOG
The Constant LOG.

Constructor Detail

MetricsServiceImpl

public MetricsServiceImpl(String name)
Instantiates a new metrics service impl.

Parameters:
name - the name
Method Detail

init

public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
Specified by:
init in interface org.apache.hive.service.Service
Overrides:
init in class org.apache.hive.service.AbstractService

initCounters

protected void initCounters()
Inits the counters.


start

public void start()
Specified by:
start in interface org.apache.hive.service.Service
Overrides:
start in class org.apache.hive.service.AbstractService

stop

public void stop()
Specified by:
stop in interface org.apache.hive.service.Service
Overrides:
stop in class org.apache.hive.service.AbstractService

incrCounter

public void incrCounter(String counter)
Specified by:
incrCounter in interface MetricsService

decrCounter

public void decrCounter(String counter)
Specified by:
decrCounter in interface MetricsService

incrCounter

public void incrCounter(Class<?> cls,
                        String counter)
Specified by:
incrCounter in interface MetricsService

decrCounter

public void decrCounter(Class<?> cls,
                        String counter)
Specified by:
decrCounter in interface MetricsService

getCounter

public long getCounter(String counter)
Specified by:
getCounter in interface MetricsService

getCounter

public long getCounter(Class<?> cls,
                       String counter)
Specified by:
getCounter in interface MetricsService

getQueuedQueries

public long getQueuedQueries()
Specified by:
getQueuedQueries in interface MetricsService

getRunningQueries

public long getRunningQueries()
Specified by:
getRunningQueries in interface MetricsService

getFinishedQueries

public long getFinishedQueries()
Specified by:
getFinishedQueries in interface MetricsService

getTotalAcceptedQueries

public long getTotalAcceptedQueries()
Specified by:
getTotalAcceptedQueries in interface MetricsService

getTotalFinishedQueries

public long getTotalFinishedQueries()
Specified by:
getTotalFinishedQueries in interface MetricsService

getTotalCancelledQueries

public long getTotalCancelledQueries()
Specified by:
getTotalCancelledQueries in interface MetricsService

getTotalFailedQueries

public long getTotalFailedQueries()
Specified by:
getTotalFailedQueries in interface MetricsService

publishReport

public void publishReport()
Specified by:
publishReport in interface MetricsService

getTotalSuccessfulQueries

public long getTotalSuccessfulQueries()
Specified by:
getTotalSuccessfulQueries in interface MetricsService

getReporters

protected List<com.codahale.metrics.ScheduledReporter> getReporters()


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.