org.apache.hadoop.hbase.metrics.file
Class TimeStampingFileContext

java.lang.Object
  extended by org.apache.hadoop.metrics.spi.AbstractMetricsContext
      extended by org.apache.hadoop.metrics.file.FileContext
          extended by org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
All Implemented Interfaces:
org.apache.hadoop.metrics.MetricsContext

public class TimeStampingFileContext
extends org.apache.hadoop.metrics.file.FileContext

Add timestamp to FileContext.emitRecord(String, String, OutputRecord).


Field Summary
 
Fields inherited from class org.apache.hadoop.metrics.file.FileContext
FILE_NAME_PROPERTY, PERIOD_PROPERTY
 
Fields inherited from interface org.apache.hadoop.metrics.MetricsContext
DEFAULT_PERIOD
 
Constructor Summary
TimeStampingFileContext()
           
 
Method Summary
 void emitRecord(String contextName, String recordName, org.apache.hadoop.metrics.spi.OutputRecord outRec)
           
 void flush()
           
 void init(String contextName, org.apache.hadoop.metrics.ContextFactory factory)
           
 void startMonitoring()
           
 void stopMonitoring()
           
 
Methods inherited from class org.apache.hadoop.metrics.file.FileContext
getFileName
 
Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext
close, createRecord, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, registerUpdater, remove, setPeriod, unregisterUpdater, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeStampingFileContext

public TimeStampingFileContext()
Method Detail

init

public void init(String contextName,
                 org.apache.hadoop.metrics.ContextFactory factory)
Specified by:
init in interface org.apache.hadoop.metrics.MetricsContext
Overrides:
init in class org.apache.hadoop.metrics.file.FileContext

startMonitoring

public void startMonitoring()
                     throws IOException
Specified by:
startMonitoring in interface org.apache.hadoop.metrics.MetricsContext
Overrides:
startMonitoring in class org.apache.hadoop.metrics.file.FileContext
Throws:
IOException

stopMonitoring

public void stopMonitoring()
Specified by:
stopMonitoring in interface org.apache.hadoop.metrics.MetricsContext
Overrides:
stopMonitoring in class org.apache.hadoop.metrics.file.FileContext

emitRecord

public void emitRecord(String contextName,
                       String recordName,
                       org.apache.hadoop.metrics.spi.OutputRecord outRec)
Overrides:
emitRecord in class org.apache.hadoop.metrics.file.FileContext

flush

public void flush()
Overrides:
flush in class org.apache.hadoop.metrics.file.FileContext


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