org.apache.hadoop.hive.common.metrics
Class Metrics.MetricsScope

java.lang.Object
  extended by org.apache.hadoop.hive.common.metrics.Metrics.MetricsScope
Enclosing class:
Metrics

public class Metrics.MetricsScope
extends Object

MetricsScope : A class that encapsulates an idea of a metered scope. Instantiating a named scope and then closing it exposes two counters: (i) a "number of calls" counter ( <name>.n ), and (ii) a "number of msecs spent between scope open and close" counter. ( <name>.t)


Method Summary
 void close()
          Closes scope, and records the time taken
 void open()
          Opens scope, and makes note of the time started, increments run counter
 void reopen()
          Closes scope if open, and reopens it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

open

public void open()
          throws IOException
Opens scope, and makes note of the time started, increments run counter

Throws:
IOException

close

public void close()
           throws IOException
Closes scope, and records the time taken

Throws:
IOException

reopen

public void reopen()
            throws IOException
Closes scope if open, and reopens it

Throws:
IOException


Copyright © 2013 The Apache Software Foundation