-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5407/
-----------------------------------------------------------
Review request for Flume and Hari Shreedharan.
Description
-------
The Flume NG docs specify that %{host} can be used in the HDFS bucket path.
This means that the 'host' header must exist within a Flume event. But Flume
events don't have it by default. So some users (including myself) have resorted
to writing a custom interceptor that adds it.
It would be beneficial to have a built-in HostInterceptor that adds a 'host'
header to all events passing through that interceptor. The interceptor should
have properties that allow an existing 'host' header's value to be preserved,
and that allow to choose between including the hostname or host IP for the
'host' header value.
The built-in HostInterceptor would serve the same purpose as the built-in
TimestampInterceptor, which is to allow all bucket path escape sequences
specified in the docs to be used without each user needing to write their own
custom interceptor for this common case.
This addresses bug FLUME-1284.
https://issues.apache.org/jira/browse/FLUME-1284
Diffs
-----
flume-ng-core/src/main/java/org/apache/flume/interceptor/HostInterceptor.java
e69de29
flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorType.java
320a057
flume-ng-core/src/test/java/org/apache/flume/interceptor/TestHostInterceptor.java
e69de29
Diff: https://reviews.apache.org/r/5407/diff/
Testing
-------
Unit tests passed, and are included in the patch. Also tested by running with
host interceptor attached to netcat source, and confirmed host header appeared
in logger sink output.
Thanks,
Will McQueen