Review Board 1.7.22


FLUME-1358: Add a regex-based filtering interceptor

Review Request #5898 - Created July 11, 2012 and submitted

Patrick Wendell
FLUME-1358
Reviewers
Flume
flume-git
Adding a regex-based filtering interceptor
Unit tests are included
flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorType.java
Revision 0c112d0 New Change
[20] 19 lines
[+20]
20

    
   
20

   
21
public enum InterceptorType {
21
public enum InterceptorType {
22

    
   
22

   
23
  TIMESTAMP(org.apache.flume.interceptor.TimestampInterceptor.Builder.class),
23
  TIMESTAMP(org.apache.flume.interceptor.TimestampInterceptor.Builder.class),
24
  HOST(org.apache.flume.interceptor.HostInterceptor.Builder.class),
24
  HOST(org.apache.flume.interceptor.HostInterceptor.Builder.class),
25
  STATIC(org.apache.flume.interceptor.StaticInterceptor.Builder.class)
25
  STATIC(org.apache.flume.interceptor.StaticInterceptor.Builder.class),

    
   
26
  REGEX_FILTER(org.apache.flume.interceptor.RegexFilteringInterceptor.Builder.class)
26
  ;
27
  ;
27

    
   
28

   
28
  private final Class<? extends Interceptor.Builder> builderClass;
29
  private final Class<? extends Interceptor.Builder> builderClass;
29

    
   
30

   
30
  private InterceptorType(Class<? extends Interceptor.Builder> builderClass) {
31
  private InterceptorType(Class<? extends Interceptor.Builder> builderClass) {
31
    this.builderClass = builderClass;
32
    this.builderClass = builderClass;
32
  }
33
  }
33

    
   
34

   
34
  public Class<? extends Interceptor.Builder> getBuilderClass() {
35
  public Class<? extends Interceptor.Builder> getBuilderClass() {
35
    return builderClass;
36
    return builderClass;
36
  }
37
  }
37

    
   
38

   
38
}
39
}
flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexFilteringInterceptor.java
New File
 
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexFilteringInterceptor.java
New File
 
flume-ng-doc/sphinx/FlumeUserGuide.rst
Revision 7967d7c New Change
 
  1. flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorType.java: Loading...
  2. flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexFilteringInterceptor.java: Loading...
  3. flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexFilteringInterceptor.java: Loading...
  4. flume-ng-doc/sphinx/FlumeUserGuide.rst: Loading...