Created 03-12-2016 07:58 AM
Hi,
Can anyone please explain if Flume be used with HBase and how we can use it. If Possibly with example to help me understand.
Created 03-12-2016 08:14 AM
I got below answer:
Apache Flume can be used with HBase using one of the two HBase sinks –
Working of the HBaseSink –
In HBaseSink, a Flume Event is converted into HBase Increments or Puts. Serializer implements the HBaseEventSerializer which is then instantiated when the sink starts. For every event, sink calls the initialize method in the serializer which then translates the Flume Event into HBase increments and puts to be sent to HBase cluster.
Working of the AsyncHBaseSink-
AsyncHBaseSink implements the AsyncHBaseEventSerializer. The initialize method is called only once by the sink when it starts. Sink invokes the setEvent method and then makes calls to the getIncrements and getActions methods just similar to HBase sink. When the sink stops, the cleanUp method is called by the serializer.
Created 03-12-2016 08:03 AM
This Apache document is good on Streaming data into Apache HBase using Apache Flume.
Created 03-12-2016 08:08 AM
@Rohan Pednekar, thanks for sharing this link.
Created 03-12-2016 08:14 AM
I got below answer:
Apache Flume can be used with HBase using one of the two HBase sinks –
Working of the HBaseSink –
In HBaseSink, a Flume Event is converted into HBase Increments or Puts. Serializer implements the HBaseEventSerializer which is then instantiated when the sink starts. For every event, sink calls the initialize method in the serializer which then translates the Flume Event into HBase increments and puts to be sent to HBase cluster.
Working of the AsyncHBaseSink-
AsyncHBaseSink implements the AsyncHBaseEventSerializer. The initialize method is called only once by the sink when it starts. Sink invokes the setEvent method and then makes calls to the getIncrements and getActions methods just similar to HBase sink. When the sink stops, the cleanUp method is called by the serializer.
Created 03-12-2016 09:00 AM
Here's info on both HBase sinks in Flume along with examples https://flume.apache.org/FlumeUserGuide.html#hbasesinks
Alternatively, if you're using Phoenix, there's a connector for that https://phoenix.apache.org/flume.html
Created 03-12-2016 09:04 AM
@Artem Ervits, thanks for sharing this link.