Class MetricsRecordImpl
java.lang.Object
com.mapr.org.apache.hadoop.metrics.spi.MetricsRecordImpl
- All Implemented Interfaces:
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
ConstructorsModifierConstructorDescriptionprotectedMetricsRecordImpl(String recordName, AbstractMetricsContext context) Creates a new instance of FileRecord -
Method Summary
Modifier and TypeMethodDescriptionReturns the record name.voidincrMetric(String metricName, byte metricValue) Increments the named metric by the specified value.voidincrMetric(String metricName, float metricValue) Increments the named metric by the specified value.voidincrMetric(String metricName, int metricValue) Increments the named metric by the specified value.voidincrMetric(String metricName, long metricValue) Increments the named metric by the specified value.voidincrMetric(String metricName, short metricValue) Increments the named metric by the specified value.voidremove()Removes the row, if it exists, in the buffered data table having tags that equal the tags that have been set on this record.voidRemoves any tag of the specified name.voidSets the named metric to the specified value.voidSets the named metric to the specified value.voidSets the named metric to the specified value.voidSets the named metric to the specified value.voidSets the named metric to the specified value.voidSets the named tag to the specified value.voidSets the named tag to the specified value.voidSets the named tag to the specified value.voidSets the named tag to the specified value.voidSets the named tag to the specified value.voidupdate()Updates the table of buffered data which is to be sent periodically.
-
Constructor Details
-
MetricsRecordImpl
Creates a new instance of FileRecord
-
-
Method Details
-
getRecordName
Returns the record name.- Specified by:
getRecordNamein interfaceMetricsRecord- Returns:
- the record name
-
setTag
Sets the named tag to the specified value.- Specified by:
setTagin interfaceMetricsRecord- Parameters:
tagName- name of the tagtagValue- new value of the tag- Throws:
MetricsException- if the tagName conflicts with the configuration
-
setTag
Sets the named tag to the specified value.- Specified by:
setTagin interfaceMetricsRecord- Parameters:
tagName- name of the tagtagValue- new value of the tag- Throws:
MetricsException- if the tagName conflicts with the configuration
-
setTag
Sets the named tag to the specified value.- Specified by:
setTagin interfaceMetricsRecord- Parameters:
tagName- name of the tagtagValue- new value of the tag- Throws:
MetricsException- if the tagName conflicts with the configuration
-
setTag
Sets the named tag to the specified value.- Specified by:
setTagin interfaceMetricsRecord- Parameters:
tagName- name of the tagtagValue- new value of the tag- Throws:
MetricsException- if the tagName conflicts with the configuration
-
setTag
Sets the named tag to the specified value.- Specified by:
setTagin interfaceMetricsRecord- Parameters:
tagName- name of the tagtagValue- new value of the tag- Throws:
MetricsException- if the tagName conflicts with the configuration
-
removeTag
Removes any tag of the specified name.- Specified by:
removeTagin interfaceMetricsRecord- Parameters:
tagName- name of a tag
-
setMetric
Sets the named metric to the specified value.- Specified by:
setMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- new value of the metric- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
setMetric
Sets the named metric to the specified value.- Specified by:
setMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- new value of the metric- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
setMetric
Sets the named metric to the specified value.- Specified by:
setMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- new value of the metric- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
setMetric
Sets the named metric to the specified value.- Specified by:
setMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- new value of the metric- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
setMetric
Sets the named metric to the specified value.- Specified by:
setMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- new value of the metric- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
incrMetric
Increments the named metric by the specified value.- Specified by:
incrMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- incremental value- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
incrMetric
Increments the named metric by the specified value.- Specified by:
incrMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- incremental value- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
incrMetric
Increments the named metric by the specified value.- Specified by:
incrMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- incremental value- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
incrMetric
Increments the named metric by the specified value.- Specified by:
incrMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- incremental value- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
incrMetric
Increments the named metric by the specified value.- Specified by:
incrMetricin interfaceMetricsRecord- Parameters:
metricName- name of the metricmetricValue- incremental value- Throws:
MetricsException- if the metricName or the type of the metricValue conflicts with the configuration
-
update
public void update()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:
updatein interfaceMetricsRecord
-
remove
public void remove()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:
removein interfaceMetricsRecord
-
getTagNames
-
createOutputRecord
-