Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Does nifi (HDF 1.2) have a processor to read records from a hbase table based on a rowkey?

avatar
Contributor

Does nifi (HDF 1.2) have a processor to read records from a hbase table based on a rowkey?

1 ACCEPTED SOLUTION

avatar
Master Guru

There is a GetHBase processor described here:

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.hbase.GetHBase/index.html

It is intended to do an incremental retrieval from an HBase table.

Does this work for your use-case, or are you looking for something different?

View solution in original post

16 REPLIES 16

avatar
Master Guru

Or are you getting the row id, col fam, col qual coming from kafka, and you want to fetch a single cell?

avatar
Contributor

JSON document with key/value pairs should be fine. Just like the response from GetHbase processor. I may create a processor for now to get going.

avatar
Master Guru

@Anoop Nair if you do get something working we would be happy to help you contribute it back to NiFi if you would like to, although perfectly fine to maintain it outside of NiFi as well. Let us know if we can help.

avatar
Contributor

@bbende I was thinking of extending nifi-hbase-bundle and adding a FetchHbaseProcessor using the existing capabilities in the bundle. I'm not sure if it's the right way. I'll give it a shot. Thanks for creating a JIRA request.

avatar
Master Guru

@Anoop Nair adding FetchHBase to the nifi-hbase-bundle sounds like the right approach.

The HBase processors rely on a Controller Service (HBaseClientService) to interact with HBase, which hides the HBase client from the processors. There is currently a scan method in the HBaseClientService:

public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler)
        throws IOException {

Technically you could probably use this with a filter expression limiting to the row id you want, but it would be a lot more efficient to create a new method in that interface that takes the table, row id, and columns to return.

avatar
Master Guru

@Theena R @Anoop Nair

I submitted a pull request for a FetchHBaseRow processor that may solve your use case:

https://github.com/apache/nifi/pull/1349

Keep in mind this is "use at your own risk" right now as it has not been reviewed or merged into the NiFi codebase and is subject to change at any time.

If you have any feedback, please comment on the JIRA:

https://issues.apache.org/jira/browse/NIFI-1784

avatar
New Contributor

@Bryan Bende Thank you. I am able to use it to fetch based on rowkey.