## org.apache.hadoop.metrics2
Class MetricsFilter

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

All Implemented Interfaces:
  MetricsPlugin

Direct Known Subclasses:
  GlobFilter, RegexFilter

    public abstract class MetricsFilter

extends Object
implements MetricsPlugin

The metrics filter interface

Constructor Summary
`MetricsFilter()`

Method Summary
`abstract boolean` `accepts(Iterable<MetricsTag> tags)` Whether to accept the tags
`boolean` `accepts(MetricsRecord record)` Whether to accept the record
`abstract boolean` `accepts(MetricsTag tag)` Whether to accept the tag
`abstract boolean` `accepts(String name)` Whether to accept the name
`abstract void` `init(org.apache.commons.configuration.SubsetConfiguration conf)` Initialize the plugin

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

Constructor Detail

### MetricsFilter

    public MetricsFilter()

Method Detail

### init

    public abstract void init(org.apache.commons.configuration.SubsetConfiguration conf)

  Description copied from interface: `MetricsPlugin`
  Initialize the plugin

  Specified by:
    `init` in interface `MetricsPlugin`
  Parameters:
    `conf` - the configuration object for the plugin

### accepts

    public abstract boolean accepts(String name)

  Whether to accept the name

  Parameters:
    `name` - to filter on
  Returns:
    true to accept; false otherwise.

### accepts

    public abstract boolean accepts(MetricsTag tag)

  Whether to accept the tag

  Parameters:
    `tag` - to filter on
  Returns:
    true to accept; false otherwise

### accepts

    public abstract boolean accepts(Iterable<MetricsTag> tags)

  Whether to accept the tags

  Parameters:
    `tags` - to filter on
  Returns:
    true to accept; false otherwise

### accepts

    public boolean accepts(MetricsRecord record)

  Whether to accept the record

  Parameters:
    `record` - to filter on
  Returns:
    true to accept; false otherwise.

Copyright © 2009 The Apache Software Foundation