Skip to content

Commit

Permalink
[INLONG-11135][Agent] Support filtering capability when supplementing…
Browse files Browse the repository at this point in the history
… data
  • Loading branch information
justinwwhuang committed Sep 19, 2024
1 parent 378b193 commit 59f731b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class TaskConstants extends CommonConstants {
public static final String PREDEFINE_FIELDS = "task.predefinedFields";
public static final String FILE_SOURCE_EXTEND_CLASS = "task.fileTask.extendedClass";
public static final String DEFAULT_FILE_SOURCE_EXTEND_CLASS =
"org.apache.inlong.agent.plugin.sources.file.extend.ExtendedHandler";
"org.apache.inlong.agent.plugin.sources.file.extend.DefaultExtendedHandler";
public static final String TASK_AUDIT_VERSION = "task.auditVersion";

// Kafka task
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.inlong.agent.plugin.sources.file.extend;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.plugin.Message;

import java.util.Map;

public class DefaultExtendedHandler extends ExtendedHandler {

public DefaultExtendedHandler(InstanceProfile profile) {
super(profile);
}

// Modify the header by the body
public void dealWithHeader(Map<String, String> header, byte[] body) {
}

public boolean filterMessage(Message msg) {
return true;
}

public static class Constants {

}
}

0 comments on commit 59f731b

Please sign in to comment.