Class AbstractPatternFilter

java.lang.Object
org.apache.hadoop.metrics2.MetricsFilter
org.apache.hadoop.metrics2.filter.AbstractPatternFilter
All Implemented Interfaces:
MetricsPlugin
Direct Known Subclasses:
GlobFilter, RegexFilter

@Private public abstract class AbstractPatternFilter extends MetricsFilter
Base class for pattern based filters
  • Field Details

  • Method Details

    • init

      public void init(org.apache.commons.configuration2.SubsetConfiguration conf)
      Description copied from interface: MetricsPlugin
      Initialize the plugin
      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.
    • compile

      protected abstract com.google.re2j.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