问题描述
我已经使用 Apache Cloudera
HBase 和 Flume
>。我有一个运行在 linux
服务器上的 flume
代理,其中 HBase
当前主设备正在运行。
我试图从 spooldir
写入 HBase
,但我得到以下错误:
...
错误org.apache.flume.node.PollingPropertiesFileConfigurationProvider:无法启动代理程序,因为未找到依赖项类路径。错误如下。
java.lang.NoClassDefFoundError:org / apache / hadoop / hbase / HBaseConfiguration
at org.apache.flume.sink.hbase.HBaseSink。< init>(HbaseSink.java:116)
...
水槽配置:
...
#Sinks
tier1.sinks.hbase-sink.channel =内存通道
tier1.sinks.hbase-sink.type = org.apache.flume.sink.hbase.HBaseSink
tier1.sinks.hbase-sink.table = FlumeTable
tier1.sinks.hbase-sink.columnFamily = FlumeColumn
$ c $我尝试修改 flume-env.sh
并将设置为
$ b>
> HBASE_HOME
HADOOP_HOME
,但它没有任何变化。
我已成功写入 HDFS
,但是 HBase
存在问题。
解决方案我可以通过将hbase-libraries的路径添加到conf / flume-env.sh中的FLUME_CLASSPATH来解决此问题,即,在我的情况下文件看起来像:
FLUME_CLASSPATH =/ home / USERNAME / hbase-1.0.1.1 / lib / *
希望它有帮助。
I have installed HBase
and Flume
using Apache Cloudera
. I have a flume
agent running on a linux
server, where the HBase
current master is running.I'm trying to write from a spooldir
to HBase
but I get the following error:
...
ERROR org.apache.flume.node.PollingPropertiesFileConfigurationProvider: Failed to start agent because dependencies were not found in classpath. Error follows.
java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration
at org.apache.flume.sink.hbase.HBaseSink.<init>(HbaseSink.java:116)
...
Flume configuration:
...
#Sinks
tier1.sinks.hbase-sink.channel = memory-channel
tier1.sinks.hbase-sink.type = org.apache.flume.sink.hbase.HBaseSink
tier1.sinks.hbase-sink.table = FlumeTable
tier1.sinks.hbase-sink.columnFamily = FlumeColumn
I tried to modify the flume-env.sh
and set HBASE_HOME
HADOOP_HOME
, but it changed nothing.
I have succeeded to write to HDFS
, but the HBase
is making problems.
解决方案 I could resolve this problem by adding the path of the hbase-libraries to the FLUME_CLASSPATH in the conf/flume-env.sh, i.e., in my case the file looked like:
FLUME_CLASSPATH="/home/USERNAME/hbase-1.0.1.1/lib/*"
Hope it helps.
这篇关于Flume到HBase依赖性失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!