0

我尝试将水槽与 syslogs 源和 hbase 接收器一起使用。
当我运行水槽代理时,我收到此错误:Failed to start agent because dependencies were not found in classpath. Error follows. java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration,这意味着(从那个问题)缺少一些 hbase 库,要解决它,我需要在 flume-env.sh 文件中设置这些库的路径,这就是我所做的,并运行水槽,但这里仍然存在错误是我用来运行水槽代理的命令: bin/flume-ng agent --conf ./conf --conf-file ./conf/flume.properties --name agent -Dflume.root.logger=INFO,console
所以我的问题是,如果我使用的解决方案是正确的(我需要将 lib 添加到水槽)为什么我仍然得到相同的错误,如果不是如何解决这个问题


从我阅读的文档中编辑The flume-ng executable looks for and sources a file named "flume-env.sh" in the conf directory specified by the --conf/-c commandline option.: 。
我还没有测试它,但我认为这是解决方案(我只需要确认)

4

1 回答 1

1

我建议您下载 HBase 完整的 tar 球并将 HBASE_HOME 等环境变量设置到正确的位置。然后 Flume 可以自动从 HBase repo 中选择库。

于 2016-12-09T12:28:30.987 回答