org.apache.hadoop.metrics.spi
Class MetricsRecordImpl

java.lang.Object
  extended by org.apache.hadoop.metrics.spi.MetricsRecordImpl
All Implemented Interfaces:
MetricsRecord

Deprecated. in favor of org.apache.hadoop.metrics2 usage.

@Deprecated
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class MetricsRecordImpl
extends Object
implements MetricsRecord

An implementation of MetricsRecord. Keeps a back-pointer to the context from which it was created, and delegates back to it on update and remove().


Constructor Summary
protected MetricsRecordImpl(String recordName, AbstractMetricsContext context)
          Deprecated. Creates a new instance of FileRecord
 
Method Summary
 String getRecordName()
          Deprecated. Returns the record name.
 void incrMetric(String metricName, byte metricValue)
          Deprecated. Increments the named metric by the specified value.
 void incrMetric(String metricName, float metricValue)
          Deprecated. Increments the named metric by the specified value.
 void incrMetric(String metricName, int metricValue)
          Deprecated. Increments the named metric by the specified value.
 void incrMetric(String metricName, long metricValue)
          Deprecated. Increments the named metric by the specified value.
 void incrMetric(String metricName, short metricValue)
          Deprecated. Increments the named metric by the specified value.
 void remove()
          Deprecated. Removes the row, if it exists, in the buffered data table having tags that equal the tags that have been set on this record.
 void removeTag(String tagName)
          Deprecated. Removes any tag of the specified name.
 void setMetric(String metricName, byte metricValue)
          Deprecated. Sets the named metric to the specified value.
 void setMetric(String metricName, float metricValue)
          Deprecated. Sets the named metric to the specified value.
 void setMetric(String metricName, int metricValue)
          Deprecated. Sets the named metric to the specified value.
 void setMetric(String metricName, long metricValue)
          Deprecated. Sets the named metric to the specified value.
 void setMetric(String metricName, short metricValue)
          Deprecated. Sets the named metric to the specified value.
 void setTag(String tagName, byte tagValue)
          Deprecated. Sets the named tag to the specified value.
 void setTag(String tagName, int tagValue)
          Deprecated. Sets the named tag to the specified value.
 void setTag(String tagName, long tagValue)
          Deprecated. Sets the named tag to the specified value.
 void setTag(String tagName, short tagValue)
          Deprecated. Sets the named tag to the specified value.
 void setTag(String tagName, String tagValue)
          Deprecated. Sets the named tag to the specified value.
 void update()
          Deprecated. Updates the table of buffered data which is to be sent periodically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricsRecordImpl

protected MetricsRecordImpl(String recordName,
                            AbstractMetricsContext context)
Deprecated. 
Creates a new instance of FileRecord

Method Detail

getRecordName

public String getRecordName()
Deprecated. 
Returns the record name.

Specified by:
getRecordName in interface MetricsRecord
Returns:
the record name

setTag

public void setTag(String tagName,
                   String tagValue)
Deprecated. 
Sets the named tag to the specified value.

Specified by:
setTag in interface MetricsRecord
Parameters:
tagName - name of the tag
tagValue - new value of the tag
Throws:
MetricsException - if the tagName conflicts with the configuration

setTag

public void setTag(String tagName,
                   int tagValue)
Deprecated. 
Sets the named tag to the specified value.

Specified by:
setTag in interface MetricsRecord
Parameters:
tagName - name of the tag
tagValue - new value of the tag
Throws:
MetricsException - if the tagName conflicts with the configuration

setTag

public void setTag(String tagName,
                   long tagValue)
Deprecated. 
Sets the named tag to the specified value.

Specified by:
setTag in interface MetricsRecord
Parameters:
tagName - name of the tag
tagValue - new value of the tag
Throws:
MetricsException - if the tagName conflicts with the configuration

setTag

public void setTag(String tagName,
                   short tagValue)
Deprecated. 
Sets the named tag to the specified value.

Specified by:
setTag in interface MetricsRecord
Parameters:
tagName - name of the tag
tagValue - new value of the tag
Throws:
MetricsException - if the tagName conflicts with the configuration

setTag

public void setTag(String tagName,
                   byte tagValue)
Deprecated. 
Sets the named tag to the specified value.

Specified by:
setTag in interface MetricsRecord
Parameters:
tagName - name of the tag
tagValue - new value of the tag
Throws:
MetricsException - if the tagName conflicts with the configuration

removeTag

public void removeTag(String tagName)
Deprecated. 
Removes any tag of the specified name.

Specified by:
removeTag in interface MetricsRecord
Parameters:
tagName - name of a tag

setMetric

public void setMetric(String metricName,
                      int metricValue)
Deprecated. 
Sets the named metric to the specified value.

Specified by:
setMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - new value of the metric
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

setMetric

public void setMetric(String metricName,
                      long metricValue)
Deprecated. 
Sets the named metric to the specified value.

Specified by:
setMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - new value of the metric
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

setMetric

public void setMetric(String metricName,
                      short metricValue)
Deprecated. 
Sets the named metric to the specified value.

Specified by:
setMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - new value of the metric
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

setMetric

public void setMetric(String metricName,
                      byte metricValue)
Deprecated. 
Sets the named metric to the specified value.

Specified by:
setMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - new value of the metric
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

setMetric

public void setMetric(String metricName,
                      float metricValue)
Deprecated. 
Sets the named metric to the specified value.

Specified by:
setMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - new value of the metric
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

incrMetric

public void incrMetric(String metricName,
                       int metricValue)
Deprecated. 
Increments the named metric by the specified value.

Specified by:
incrMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - incremental value
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

incrMetric

public void incrMetric(String metricName,
                       long metricValue)
Deprecated. 
Increments the named metric by the specified value.

Specified by:
incrMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - incremental value
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

incrMetric

public void incrMetric(String metricName,
                       short metricValue)
Deprecated. 
Increments the named metric by the specified value.

Specified by:
incrMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - incremental value
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

incrMetric

public void incrMetric(String metricName,
                       byte metricValue)
Deprecated. 
Increments the named metric by the specified value.

Specified by:
incrMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - incremental value
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

incrMetric

public void incrMetric(String metricName,
                       float metricValue)
Deprecated. 
Increments the named metric by the specified value.

Specified by:
incrMetric in interface MetricsRecord
Parameters:
metricName - name of the metric
metricValue - incremental value
Throws:
MetricsException - if the metricName or the type of the metricValue conflicts with the configuration

update

public void update()
Deprecated. 
Updates the table of buffered data which is to be sent periodically. If the tag values match an existing row, that row is updated; otherwise, a new row is added.

Specified by:
update in interface MetricsRecord

remove

public void remove()
Deprecated. 
Removes the row, if it exists, in the buffered data table having tags that equal the tags that have been set on this record.

Specified by:
remove in interface MetricsRecord


Copyright © 2009 The Apache Software Foundation