首页 新闻 会员 周边 捐助

Flume报错:Error: Could not find or load main class org.apache.flume.node.Application

0
悬赏园豆:40 [待解决问题]

Flume配置从文件导入Kafka,执行如下命令,发生了错误:

/apache-flume-1.7.0-bin/bin/flume-ng agent --conf conf --conf-file /apache-flume-1.7.0-bin/conf/file-flume-kafka.conf --name a1 -Dflume.root.logger=INFO,console -Dorg.apache.flume.log.printconfig=true -Dorg.apache.flume.log.rawdata=true

报错:

Error: Could not find or load main class org.apache.flume.node.Application,请问这是什么原因?

我的配置文件如下:

复制代码
a1.sources=r1
a1.channels=c1 c2


# configure source
a1.sources.r1.type = TAILDIR
a1.sources.r1.positionFile = /opt/module/flume/test/log_position.json
a1.sources.r1.filegroups = f1
a1.sources.r1.filegroups.f1 = /tmp/logs/app.+
a1.sources.r1.fileHeader = true
a1.sources.r1.channels = c1 c2


#拦截器
a1.sources.r1.interceptors =  i1 i2
a1.sources.r1.interceptors.i1.type = vip.shuai7boy.flume.interceptor.LogETLInterceptor$Builder
a1.sources.r1.interceptors.i2.type = vip.shuai7boy.flume.interceptor.LogTypeInterceptor$Builder
#选择器
a1.sources.r1.selector.type = multiplexing
a1.sources.r1.selector.header = topic
a1.sources.r1.selector.mapping.topic_start = c1
a1.sources.r1.selector.mapping.topic_event = c2


# configure channel
a1.channels.c1.type = org.apache.flume.channel.kafka.KafkaChannel
a1.channels.c1.brokerList = tuge1:9092,tuge2:9092,tuge3:9092
a1.channels.c1.zookeeperConnect=tuge1:2181,tuge2:2181,tuge3:2181
a1.channels.c1.kafka.bootstrap.servers = tuge1:9092,tuge2:9092,tuge3:9092
a1.channels.c1.kafka.topic = topic_start
a1.channels.c1.parseAsFlumeEvent = false
a1.channels.c1.kafka.consumer.group.id = flume-consumer
# configure channe2
a1.channels.c2.type = org.apache.flume.channel.kafka.KafkaChannel
a1.channels.c2.brokerList = tuge1:9092,tuge2:9092,tuge3:9092
a1.channels.c2.zookeeperConnect=tuge1:2181,tuge2:2181,tuge3:2181
a1.channels.c2.kafka.bootstrap.servers = tuge1:9092,tuge2:9092,tuge3:9092
a1.channels.c2.kafka.topic = topic_event
a1.channels.c2.parseAsFlumeEvent = false
a1.channels.c2.kafka.consumer.group.id = flume-consumer
复制代码

我将拦截器的包也引入到flume的lib下面的,还有网上说环境变量路径问题,我看了看对着呢,请大佬指点!

shuai7boy的主页 shuai7boy | 菜鸟二级 | 园豆:225
提问于:2020-07-21 01:32
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册