File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
main/java/org/apache/flume/interceptor
test/java/org/apache/flume/interceptor Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ public class HeaderJoinInterceptor implements Interceptor {
76
76
private HeaderJoinInterceptor (String joinKeys , String joinKeyDefaultValues ,
77
77
String joinDelimiter , boolean preserveExisting ,
78
78
String key ) {
79
- this .joinKeys = (joinKeys == null || joinKeys .isEmpty ())
80
- ? new String []{ key } : joinKeys .split (" " );
79
+ this .joinKeys = joinKeys .split (" " );
81
80
this .joinKeyDefaultValues = joinKeyDefaultValues .split (" " );
82
81
this .joinDelimiter = joinDelimiter ;
83
82
this .preserveExisting = preserveExisting ;
@@ -162,7 +161,7 @@ public Interceptor build() {
162
161
163
162
public static class Constants {
164
163
public static final String JOIN_KEYS = "joinKeys" ;
165
- public static final String JOIN_KEYS_DEFAULT = null ;
164
+ public static final String JOIN_KEYS_DEFAULT = "key" ;
166
165
167
166
public static final String JOIN_KEY_DEFAULT_VALUES = "joinKeyDefaultValues" ;
168
167
public static final String JOIN_KEY_DEFAULT_VALUES_DEFAULT = "NA" ;
Original file line number Diff line number Diff line change @@ -107,8 +107,6 @@ public void testReplace() throws ClassNotFoundException,
107
107
@ Test
108
108
public void testPreserve () throws ClassNotFoundException ,
109
109
InstantiationException , IllegalAccessException {
110
- Interceptor .Builder builder = InterceptorBuilderFactory .newInstance (
111
- InterceptorType .STATIC .toString ());
112
110
Context ctx = new Context ();
113
111
ctx .put (Constants .PRESERVE , "true" );
114
112
ctx .put (Constants .JOIN_KEY_DEFAULT_VALUES , "replacement+value" );
You can’t perform that action at this time.
0 commit comments