1

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.

4

1 回答 1

2

我可以通过将 hbase-libraries 的路径添加到 conf/flume-env.sh 中的 FLUME_CLASSPATH 来解决这个问题,即,在我的情况下,文件看起来像:

FLUME_CLASSPATH="/home/USERNAME/hbase-1.0.1.1/lib/*"

希望能帮助到你。

于 2015-06-25T19:22:56.290 回答