org.apache.hadoop.hbase.thrift
Class ThriftMetrics

java.lang.Object
  extended by org.apache.hadoop.hbase.thrift.ThriftMetrics
All Implemented Interfaces:
org.apache.hadoop.metrics.Updater

public class ThriftMetrics
extends Object
implements org.apache.hadoop.metrics.Updater

This class is for maintaining the various statistics of thrift server and publishing them through the metrics interfaces.


Field Summary
static String CONTEXT_NAME
           
static long DEFAULT_SLOW_RESPONSE_NANO_SEC
           
static org.apache.commons.logging.Log LOG
           
static String SLOW_RESPONSE_NANO_SEC
           
 
Constructor Summary
ThriftMetrics(int port, org.apache.hadoop.conf.Configuration conf, Class<?> iface)
           
 
Method Summary
 void doUpdates(org.apache.hadoop.metrics.MetricsContext context)
          Push the metrics to the monitoring subsystem on doUpdate() call.
 void incMethodTime(String name, int time)
           
 void incNumRowKeysInBatchGet(int diff)
           
 void incNumRowKeysInBatchMutate(int diff)
           
 void incTimeInQueue(long time)
           
 void setCallQueueLen(int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

CONTEXT_NAME

public static final String CONTEXT_NAME
See Also:
Constant Field Values

SLOW_RESPONSE_NANO_SEC

public static final String SLOW_RESPONSE_NANO_SEC
See Also:
Constant Field Values

DEFAULT_SLOW_RESPONSE_NANO_SEC

public static final long DEFAULT_SLOW_RESPONSE_NANO_SEC
See Also:
Constant Field Values
Constructor Detail

ThriftMetrics

public ThriftMetrics(int port,
                     org.apache.hadoop.conf.Configuration conf,
                     Class<?> iface)
Method Detail

incTimeInQueue

public void incTimeInQueue(long time)

setCallQueueLen

public void setCallQueueLen(int len)

incNumRowKeysInBatchGet

public void incNumRowKeysInBatchGet(int diff)

incNumRowKeysInBatchMutate

public void incNumRowKeysInBatchMutate(int diff)

incMethodTime

public void incMethodTime(String name,
                          int time)

doUpdates

public void doUpdates(org.apache.hadoop.metrics.MetricsContext context)
Push the metrics to the monitoring subsystem on doUpdate() call.

Specified by:
doUpdates in interface org.apache.hadoop.metrics.Updater


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.