Created 04-18-2016 06:50 PM
Does nifi (HDF 1.2) have a processor to read records from a hbase table based on a rowkey?
Created 04-18-2016 06:54 PM
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?
Created 04-19-2016 06:37 PM
Or are you getting the row id, col fam, col qual coming from kafka, and you want to fetch a single cell?
Created 04-19-2016 08:26 PM
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.
Created 04-20-2016 02:27 PM
@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.
Created 04-20-2016 02:55 PM
@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.
Created 04-20-2016 03:10 PM
@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.
Created 12-21-2016 05:36 PM
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:
Created 12-23-2016 07:06 PM
@Bryan Bende Thank you. I am able to use it to fetch based on rowkey.