- First step is to create test table in HBase with CF1 as column family. Everytime Flume gets a event it will write to HBase in test table in CF1 column family
create 'test','CF1'
-
Create Flume configuration file that looks like this, I am using HBase sink with
SimpleHbaseEventSerializer
as Event Serializer. Note that i am assuming that this is unsecured cluster (Sandbox), but if you have secured cluster you should follow steps mentioned in Configure a Secure HBase Sink - Start the Flume server with the following command
bin/flume-ng agent --conf conf --conf-file conf/netcat-hbase.properties --name agent1 -Dflume.root.logger=DEBUG,console
- Now open the netcat client on port 44444 and send some messages to flume
- If you query HBase test table, you should see the messages that were published to netcat
How to use HBase sink with Flume
I wanted to figure out how to use HBase as target for flume, so i created this sample configuration which reads events from netcat and writes them to HBase.
Subscribe to:
Post Comments (Atom)
2 comments:
Simple and Nice!!
Thanks for info....
Website development in Bangalore
Post a Comment