## org.apache.hadoop.metrics2.filter
Class GlobFilter

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

All Implemented Interfaces:
  MetricsPlugin

    public class GlobFilter

extends MetricsFilter

A glob pattern filter for metrics

Field Summary
`protected static String` `EXCLUDE_KEY`
`protected static String` `EXCLUDE_TAGS_KEY`
`protected static String` `INCLUDE_KEY`
`protected static String` `INCLUDE_TAGS_KEY`

Constructor Summary
`GlobFilter()`

Method Summary
`boolean` `accepts(Iterable<MetricsTag> tags)` Whether to accept the tags
`boolean` `accepts(MetricsTag tag)` Whether to accept the tag
`boolean` `accepts(String name)` Whether to accept the name
`protected Pattern` `compile(String s)` Compile a string pattern in to a pattern object
`void` `init(org.apache.commons.configuration.SubsetConfiguration conf)` Initialize the plugin

Methods inherited from class org.apache.hadoop.metrics2.MetricsFilter
`accepts`

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

Field Detail

### INCLUDE_KEY

    protected static final String INCLUDE_KEY

See Also:
  Constant Field Values

### EXCLUDE_KEY

    protected static final String EXCLUDE_KEY

See Also:
  Constant Field Values

### INCLUDE_TAGS_KEY

    protected static final String INCLUDE_TAGS_KEY

See Also:
  Constant Field Values

### EXCLUDE_TAGS_KEY

    protected static final String EXCLUDE_TAGS_KEY

See Also:
  Constant Field Values

Constructor Detail

### GlobFilter

    public GlobFilter()

Method Detail

### compile

    protected Pattern compile(String s)

  Compile a string pattern in to a pattern object

  Parameters:
    `s` - the string pattern to compile
  Returns:
    the compiled pattern object

### init

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

  Description copied from interface: `MetricsPlugin`
  Initialize the plugin

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

### accepts

    public boolean accepts(MetricsTag tag)

  Description copied from class: `MetricsFilter`
  Whether to accept the tag

  Specified by:
    `accepts` in class `MetricsFilter`
  Parameters:
    `tag` - to filter on
  Returns:
    true to accept; false otherwise

### accepts

    public boolean accepts(Iterable<MetricsTag> tags)

  Description copied from class: `MetricsFilter`
  Whether to accept the tags

  Specified by:
    `accepts` in class `MetricsFilter`
  Parameters:
    `tags` - to filter on
  Returns:
    true to accept; false otherwise

### accepts

    public boolean accepts(String name)

  Description copied from class: `MetricsFilter`
  Whether to accept the name

  Specified by:
    `accepts` in class `MetricsFilter`
  Parameters:
    `name` - to filter on
  Returns:
    true to accept; false otherwise.

Copyright © 2009 The Apache Software Foundation