Support Questions
Find answers, ask questions, and share your expertise

Issue Using PutHiveQL processor

Issue Using PutHiveQL processor

Hello,

I'm trying to test the PutHiveQL processor. As Nifi tool is quite new for me, maybe I'm doing something wrong:

16031-2017-06-06-10-30-32-nifi.png

I'm trying to generate flow file with a simple statement (such as show databases for example) and send it to a PutHiveQL processor. The flow file stays in queue and I can see this error in the bulletin board:

16034-2017-06-06-11-40-38-nifi.png

And also, when I put the processor in debug mode, although I have a flow file in the input queue, the bulletin board keeps showing this message: No incoming FlowFiles:

16020-2017-06-06-10-26-57-nifi.png

Any idea on what I'm doing wrong?

Best regards,

Franck

2 REPLIES 2

Re: Issue Using PutHiveQL processor

Super Guru

Can you share the relevant error (same as the bulletin) and stack trace in nifi-app.log? I'd like to see where that NullPointerException is occurring in the code. Also can you share your PutHiveQL configuration? Are you generating valid HiveQL in the GenerateFlowFile processor?

Re: Issue Using PutHiveQL processor

Super Guru

The "No incoming FlowFiles" is logged at a DEBUG level and happens when the processor executes but there is no flow file available at that time. That doesn't indicate an error. However the NullPointerException is concerning (see my comment above requesting more context/trace information). For your use case, if you want to use a HiveQL statement such as "show databases", I'm guessing you are interested in the rows returned. If so, you will want to use SelectHiveQL rather than PutHiveQL. The major difference between them is that SelectHiveQL expects a ResultSet to be returned by the query, and PutHiveQL ignores any results returned. The former is used to fetch data (either in tables or metadata like "show databases"), the latter for things like INSERT, UPDATE, DELETE, and DDL (CREATE TABLE, e.g.).