SequenceFileInputFilter.RegexFilter (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.mapred
Class SequenceFileInputFilter.RegexFilter

    java.lang.Object
      org.apache.hadoop.mapred.SequenceFileInputFilter.FilterBase
          org.apache.hadoop.mapred.SequenceFileInputFilter.RegexFilter

All Implemented Interfaces:
  Configurable, SequenceFileInputFilter.Filter

Enclosing class:
  SequenceFileInputFilter<K,V>

    public static class SequenceFileInputFilter.RegexFilter

extends SequenceFileInputFilter.FilterBase

Records filter by matching key to regex

Constructor Summary
`SequenceFileInputFilter.RegexFilter()`

Method Summary
`boolean` | `accept(Object key)` Filtering method If key matches the regex, return true; otherwise return false
`void` | `setConf(Configuration conf)` configure the Filter by checking the configuration
`static void` | `setPattern(Configuration conf, String regex)` Define the filtering regex and stores it in conf

Methods inherited from class org.apache.hadoop.mapred.SequenceFileInputFilter.FilterBase
`getConf`

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

Constructor Detail

### SequenceFileInputFilter.RegexFilter

    public SequenceFileInputFilter.RegexFilter()

Method Detail

### setPattern

    public static void setPattern(Configuration conf,
                                  String regex)
                           throws PatternSyntaxException

  Define the filtering regex and stores it in conf

  Parameters:
    `conf` - where the regex is set
    `regex` - regex used as a filter
  Throws:
    `PatternSyntaxException`

### setConf

    public void setConf(Configuration conf)

  configure the Filter by checking the configuration

### accept

    public boolean accept(Object key)

  Filtering method If key matches the regex, return true; otherwise return false

  Parameters:
    `key` - record key
  Returns:
    true if a record is accepted; return false otherwise
  See Also:
    `SequenceFileInputFilter.Filter.accept(Object)`

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