This project has retired. For details please refer to its Attic page.
MetricsServiceImpl (Lens 2.0.1-beta-incubating API)

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)
          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()
           
 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 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

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

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)
Description copied from interface: MetricsService
Increment a counter with the given name Actual name of the counter will be

MetricRegistry.name(MetricsService.class, counter)
 

Specified by:
incrCounter in interface MetricsService
Parameters:
counter - the counter

decrCounter

public void decrCounter(String counter)
Description copied from interface: MetricsService
Decrement a counter with the given name Actual name of the counter will be

MetricRegistry.name(MetricsService.class, counter)
 

Specified by:
decrCounter in interface MetricsService
Parameters:
counter - the counter

incrCounter

public void incrCounter(Class<?> cls,
                        String counter)
Description copied from interface: MetricsService
Increment a counter with the name constructed using given class and counter name Actual name of the counter will be

MetricRegistry.name(cls, counter)
 

Specified by:
incrCounter in interface MetricsService
Parameters:
cls - Class of the counter for namespacing the counter
counter - the counter

decrCounter

public void decrCounter(Class<?> cls,
                        String counter)
Description copied from interface: MetricsService
Decrement a counter with the name costructed using given class and counter name Actual name of the counter will be

MetricRegistry.name(cls, counter)
 

Specified by:
decrCounter in interface MetricsService
Parameters:
cls - Class of the counter for namespacing of counters
counter - the counter

getCounter

public long getCounter(String counter)
Description copied from interface: MetricsService
Get current value of the counter.

Specified by:
getCounter in interface MetricsService
Parameters:
counter - the counter
Returns:
the counter

getCounter

public long getCounter(Class<?> cls,
                       String counter)
Description copied from interface: MetricsService
Get current value of the counter.

Specified by:
getCounter in interface MetricsService
Parameters:
cls - the cls
counter - the counter
Returns:
the counter

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()
Description copied from interface: MetricsService
Publish report.

Specified by:
publishReport in interface MetricsService

getTotalSuccessfulQueries

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


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