org.apache.hadoop.hbase.client.metrics
Class ScanMetrics

java.lang.Object
  extended by org.apache.hadoop.hbase.client.metrics.ScanMetrics

@InterfaceAudience.Private
public class ScanMetrics
extends Object

Provides client-side metrics related to scan operations The data can be passed to mapreduce framework or other systems. We use atomic longs so that one thread can increment, while another atomically resets to zero after the values are reported to hadoop's counters. Some of these metrics are general for any client operation such as put However, there is no need for this. So they are defined under scan operation for now.


Field Summary
 AtomicLong countOfBytesInRemoteResults
          number of bytes in Result objects from remote region servers
 AtomicLong countOfBytesInResults
          number of bytes in Result objects from region servers
 AtomicLong countOfNSRE
          number of NotServingRegionException caught
 AtomicLong countOfRegions
          number of regions
 AtomicLong countOfRemoteRPCcalls
          number of remote RPC calls
 AtomicLong countOfRemoteRPCRetries
          number of remote RPC retries
 AtomicLong countOfRPCcalls
          number of RPC calls
 AtomicLong countOfRPCRetries
          number of RPC retries
 AtomicLong sumOfMillisSecBetweenNexts
          sum of milliseconds between sequential next calls
 
Constructor Summary
ScanMetrics()
          constructor
 
Method Summary
 Map<String,Long> getMetricsMap()
          Get all of the values since the last time this function was called.
 void setCounter(String counterName, long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

countOfRPCcalls

public final AtomicLong countOfRPCcalls
number of RPC calls


countOfRemoteRPCcalls

public final AtomicLong countOfRemoteRPCcalls
number of remote RPC calls


sumOfMillisSecBetweenNexts

public final AtomicLong sumOfMillisSecBetweenNexts
sum of milliseconds between sequential next calls


countOfNSRE

public final AtomicLong countOfNSRE
number of NotServingRegionException caught


countOfBytesInResults

public final AtomicLong countOfBytesInResults
number of bytes in Result objects from region servers


countOfBytesInRemoteResults

public final AtomicLong countOfBytesInRemoteResults
number of bytes in Result objects from remote region servers


countOfRegions

public final AtomicLong countOfRegions
number of regions


countOfRPCRetries

public final AtomicLong countOfRPCRetries
number of RPC retries


countOfRemoteRPCRetries

public final AtomicLong countOfRemoteRPCRetries
number of remote RPC retries

Constructor Detail

ScanMetrics

public ScanMetrics()
constructor

Method Detail

setCounter

public void setCounter(String counterName,
                       long value)

getMetricsMap

public Map<String,Long> getMetricsMap()
Get all of the values since the last time this function was called. Calling this function will reset all AtomicLongs in the instance back to 0.

Returns:
A Map of String -> Long for metrics


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.