Support Questions

Find answers, ask questions, and share your expertise

Use of Sequence in Nifi without using a custom processor

avatar
Explorer

In Nifi , I need to load a csv file to hbase and as a rowkey I want to provide a running number (like oracle sequence) to each record as the rowkey. can this be done using Nifi existing processors and not putting down any custom processor.

1 ACCEPTED SOLUTION

avatar
Master Guru

Yes you can. This requires state to keep track of the number. Use distributed map cache (DMC) to fetch and put your sequence. Your DMC put would be existing number plus 1.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

This isnot an answer your looking for but for your own knowledge, HBase does not like sequential row keys, you will cause what's called a hot-spotting issue, AKA monotonously increasing keys. Which essentially will direct all your rows to a single region server and cause bottlenecks. Avoid at all costs, row keys need to be complex (consist of different parts) and random in nature. All that said, you can probably generate these keys with an ExecuteScript processor or something else.

avatar
Master Guru

Yes you can. This requires state to keep track of the number. Use distributed map cache (DMC) to fetch and put your sequence. Your DMC put would be existing number plus 1.