1、引入 pom依赖
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>interceptor</artifactId>
<version>1.0-SNAPSHOT</version>
<name>interceptor</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency

本文介绍了如何创建和使用自定义的Flume Interceptor。首先,文章讲解了添加必要的pom依赖,接着详细说明了拦截器类的编写过程。然后,指导读者如何打包并把jar文件放入Flume的lib目录。接着,配置Flume的配置文件,并最后通过测试验证自定义拦截器的功能。
最低0.47元/天 解锁文章
6226

被折叠的 条评论
为什么被折叠?



