-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63288/
-----------------------------------------------------------

Review request for Flume.


Repository: flume-git


Description
-------

Now Host interceptor can only insert the hostname or only IP address of the 
host into the event header. But in some scenarios, the hostname and IP address 
should be preserved at the same time.
Add a config useHostname in Host interceptor. When useIP=true and 
useHostname=true, the hostname and IP address will both be put into the event 
header. The header key of hostname and IP can also be customed. The config can 
be used like this:
  a1.sources = r1
  a1.channels = c1
  a1.sources.r1.interceptors = i1
  a1.sources.r1.interceptors.i1.type = host
  a1.sources.r1.interceptors.i1.useIP = true
  a1.sources.r1.interceptors.i1.useHostname = true
  a1.sources.r1.interceptors.i1.ip = ipKey
  a1.sources.r1.interceptors.i1.hostname = hostnameKey


Diffs
-----

  flume-ng-core/src/main/java/org/apache/flume/interceptor/HostInterceptor.java 
a2ad0186 
  
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestHostInterceptor.java
 0b39e80a 
  flume-ng-doc/sphinx/FlumeUserGuide.rst 73ed7b87 


Diff: https://reviews.apache.org/r/63288/diff/1/


Testing
-------

All tests in TestHostInterceptor passed.


Thanks,

qiao wen

Reply via email to