Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

PutHiveStreaming Nifi processor; various errors

Solved Go to solution
Highlighted

Re: PutHiveStreaming Nifi processor; various errors

New Contributor

Hi Matt,

I had faced thrift server connectivity issue with NiFi-1.2.0 (Installed in HDP 2.6.0). I tried replacing the .nar file with yours given .nar, But it did not help.

I tried to install NiFi-1.1.0 and tried to run without replacing the .nar file. It did not help either. But, when I did replaced the .nar with yours .nar file with NiFi-1.1.0, then it worked for me !!

Can you please help me generating the 'nifi-hive.nar' file for NiFi-1.2.0. Also, it would be great if you provide the steps to generate the .nar file and what specific changes were made, so that .nar file worked for NiFi-1.1.0.

Thanks in advance.

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

Contributor

Hello, thanks for quick answer! Is any way to solve this issue between HDP v 2.5 and HDF v 2.0?

Or we have only one way is to downgrade our HDP to version 2.4?

Is any documented way to do this downgrade?

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

Explorer

Hey

You can follow the steps mentioned by Matthew.

If you want the exact steps please do the following.

1. Download the jar.

2. Go to /usr/hdf/current/nifi/lib/ which is the usual installation directory of HDF NiFi.

3. Backup the file nifi-hive-nar-1.0.0.2.0.0.0-579.nar

4. Replace it with the one provided by Matthew.

Then you should be able to run the streaming processor.

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

Contributor

Thank You very much, suggestion You've provided solved my issue.

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

New Contributor

Hi Matt,

I did faced the same issue with thrift server connectivity. Replacing the .nar file with your given .nar file has resolved my issue.

But, can you please help me is getting the .nar file generated for the latest version of NiFi-1.2.0 ?

Because, I tried replacing the .nar in NiFi-1.2.0 version. But, the issue was same. I tried installing NiFi-1.1.0 and then replaced the .nar file and it worked !!

Thanks in advance.

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

New Contributor

@Matt Burgess

Hi Matt, I am using nifi-1.4.0 with HDP 2.6. I was facing the same issue in PutHiveStreaming processor. I replaced it with the nar you provided. It is working fine when I'm writing to a non partitioned table. But when I tried to write it to a partitioned hive table, it throws the following error :

PutHiveStreaming[id=9b7b6af6-015f-1000-8772-6b70eb0a4841] failed to process due to java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------; rolling back session: {}
java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------

I have provided all the necessary permissions to /tmp/hive folder, still I'm facing the same issue.

Please let me know if I'm missing something.

Thanks,
Mohit Jain

,

@Matt Burgess I am using nifi 1.4.0 with HDP 2.6. I was facing the same error. I replaced the hive nar bundle with the one you provided. It is now working fine for the unpartitioned table. But when I'm trying to ingest on the partitioned table, it throws the following error:
PutHiveStreaming[id=9b7b6af6-015f-1000-8772-6b70eb0a4841] failed to process due to java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------; rolling back session: {}

java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:523)

at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.createPartitionIfNotExists(HiveEndPoint.java:454)

at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.<init>(HiveEndPoint.java:318)

at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.<init>(HiveEndPoint.java:278)

at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnectionImpl(HiveEndPoint.java:215)

at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnection(HiveEndPoint.java:192)

at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnection(HiveEndPoint.java:122)

at org.apache.nifi.util.hive.HiveWriter.lambda$newConnection$6(HiveWriter.java:237)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------

at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:613)

at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:555)

at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:509)

... 11 common frames omitted


I have given all the permissions to the /tmp/hive folder, still it throws the same error. Please let me know if I'm missing something.

Thanks,

Mohit

Re: PutHiveStreaming Nifi processor; various errors

Issue Resolved.

In HDP 3.0, please use PutHive3Streaming, PutHive3QL and SelectHiveQL.

Cheers.

Highlighted

Re: PutHiveStreaming Nifi processor; various errors

New Contributor

I am getting same error in HDP 3.

Don't have an account?
Coming from Hortonworks? Activate your account here