MetricsRecordBuilder (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.metrics2
Class MetricsRecordBuilder

    java.lang.Object
      org.apache.hadoop.metrics2.MetricsRecordBuilder

    public abstract class MetricsRecordBuilder

extends Object

The metrics record builder interface

Constructor Summary
`MetricsRecordBuilder()`

Method Summary
`abstract MetricsRecordBuilder` | `add(Metric metric)` Add a pre-made immutable metric object
`abstract MetricsRecordBuilder` | `add(MetricsTag tag)` Add an immutable metrics tag object
`abstract MetricsRecordBuilder` | `addCounter(String name, String description, int value)` Add an int counter metric
`abstract MetricsRecordBuilder` | `addCounter(String name, String description, long value)` Add an long counter metric
`abstract MetricsRecordBuilder` | `addGauge(String name, String description, double value)` Add a double gauge metric
`abstract MetricsRecordBuilder` | `addGauge(String name, String description, float value)` Add a float gauge metric
`abstract MetricsRecordBuilder` | `addGauge(String name, String description, int value)` Add a int gauge metric
`abstract MetricsRecordBuilder` | `addGauge(String name, String description, long value)` Add a long gauge metric
`abstract MetricsRecordBuilder` | `setContext(String value)` Set the context tag
`abstract MetricsRecordBuilder` | `tag(String name, String description, String value)` Add a metrics tag

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetricsRecordBuilder

    public MetricsRecordBuilder()

Method Detail

### tag

    public abstract MetricsRecordBuilder tag(String name,
                                             String description,
                                             String value)

  Add a metrics tag

  Parameters:
    `name` - of the tag
    `description` - of the tag
    `value` - of the tag
  Returns:
    self

### add

    public abstract MetricsRecordBuilder add(MetricsTag tag)

  Add an immutable metrics tag object

  Parameters:
    `tag` - a pre-made tag object (potentially save an object construction)
  Returns:
    self

### setContext

    public abstract MetricsRecordBuilder setContext(String value)

  Set the context tag

  Parameters:
    `value` - of the context
  Returns:
    self

### addCounter

    public abstract MetricsRecordBuilder addCounter(String name,
                                                    String description,
                                                    int value)

  Add an int counter metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### addCounter

    public abstract MetricsRecordBuilder addCounter(String name,
                                                    String description,
                                                    long value)

  Add an long counter metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### addGauge

    public abstract MetricsRecordBuilder addGauge(String name,
                                                  String description,
                                                  int value)

  Add a int gauge metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### addGauge

    public abstract MetricsRecordBuilder addGauge(String name,
                                                  String description,
                                                  long value)

  Add a long gauge metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### addGauge

    public abstract MetricsRecordBuilder addGauge(String name,
                                                  String description,
                                                  float value)

  Add a float gauge metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### addGauge

    public abstract MetricsRecordBuilder addGauge(String name,
                                                  String description,
                                                  double value)

  Add a double gauge metric

  Parameters:
    `name` - of the metric
    `description` - of the metric
    `value` - of the metric
  Returns:
    self

### add

    public abstract MetricsRecordBuilder add(Metric metric)

  Add a pre-made immutable metric object

  Parameters:
    `metric` - the pre-made metric to save an object construction
  Returns:
    self

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation