Apache Flume used with Hbase
-
- Apache Flume can be used with HBase utilizing one of the two HBase sinks –
- HBaseSink (org.apache.flume.sink.hbase.HBaseSink) – It supports protected HBase clusters and furthrtmore the novel HBase IPC that was presented in the version HBase 0.96.
- AsyncHBaseSink (org.apache.flume.sink.hbase.AsyncHBaseSink) – It has improved performance than HBase sink as it can simply make non-blocking calls to HBase.
- Apache Flume can be used with HBase utilizing one of the two HBase sinks –
Working of the HBaseSink
-
-
- In HBaseSink, a Flume Event is changed over into HBase Increments or Puts. Serializer executes the HBaseEventSerializer which is then instantiated when the sink begins.
- For each and 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
-
- This sink executes the AsyncHBaseEventSerializer. The initialize method is called just once by the sink when it begins.
- The sink invokes the setEvent method and then makes calls to the getIncrements and getActions methods just similar to HBase sink. When the sink pause, the cleanUp method is called by the serializer.