我试图用Nifi发送一些文件。我可以用Flume发送它,但在我工作的其他步骤中,我遇到了Flume的一些问题,我想:为什么我不使用Nifi而不是Flume?
我读过Nifi有一些问题要发送数据作为Flume。我发现了一些名为:" ExecuteFlumeSink"和" ExecuteFlumeSource"。你能看到我在尝试什么吗?
处理器内部" ExecuteFlumeSink"是:
sink type -> avro
Agent name -> cp2
sink name -> k2
Flume Configuration -> cp2.channels =c2
cp2.channels.c2.type =memory
cp2.sinks.k2.channel =c2
cp2.sinks.k2.type =avro
cp2.sinks.k2.hostname =computer1
cp2.sinks.k2.port =11111
我有错误:" Flume事件传递失败"。是不是我可以尝试?
谢谢
nifi-app.log:
2018-04-12 10:53:36,402 ERROR [定时器驱动的进程线程-3] oanpflume.ExecuteFlumeSource ExecuteFlumeSource [id = b904159e-0162-1000-c810-813cc9cb7d6b] ExecuteFlumeSource [id = b904159e-0162-1000 -c810-813cc9cb7d6b]由于java.lang.NullPointerException而无法处理会话:{}
java.lang.NullPointerException:null 在org.apache.flume.source.AvroSource.stop(AvroSource.java:302) 在org.apache.flume.source.EventDrivenSourceRunner.stop(EventDrivenSourceRunner.java:51) 在org.apache.nifi.processors.flume.ExecuteFlumeSource.stopped(ExecuteFlumeSource.java:150) at org.apache.nifi.processors.flume.ExecuteFlumeSource.onTrigger(ExecuteFlumeSource.java:171) 在org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) 在org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) 在org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) 在org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent $ 1.run(TimerDrivenSchedulingAgent.java:128) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624) 在java.lang.Thread.run(Thread.java:748)