Review Board 1.7.22


FLUME-1657 - Regex Extractor Interceptor

Review Request #7700 - Created Oct. 22, 2012 and updated

Cameron Gandevia
flume-1.3.0
Reviewers
Flume
flume-git
A RegexExtractor interceptor that will allow users to extract regex matches and append them as header fields of the event.

 
flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorType.java
Revision c478337 New Change
[20] 20 lines
[+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
  REGEX_FILTER(
27
  ;
27
      org.apache.flume.interceptor.RegexFilteringInterceptor.Builder.class),

    
   
28
  REGEX_EXTRACTOR(org.apache.flume.interceptor.RegexExtractorInterceptor.Builder.class);
28

    
   
29

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

    
   
31

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

    
   
35

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

    
   
39

   
39
}
40
}
flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptor.java
New File
 
flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorMillisSerializer.java
New File
 
flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorPassThroughSerializer.java
New File
 
flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorSerializer.java
New File
 
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptor.java
New File
 
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptorMillisSerializer.java
New File
 
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptorPassThroughSerializer.java
New File
 
flume-ng-doc/sphinx/FlumeUserGuide.rst
Revision 0596473 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/RegexExtractorInterceptor.java: Loading...
  3. flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorMillisSerializer.java: Loading...
  4. flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorPassThroughSerializer.java: Loading...
  5. flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorSerializer.java: Loading...
  6. flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptor.java: Loading...
  7. flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptorMillisSerializer.java: Loading...
  8. flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptorPassThroughSerializer.java: Loading...
  9. flume-ng-doc/sphinx/FlumeUserGuide.rst: Loading...