Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-11-2016 03:45 PM
Hi,
I'm having some permission issue with Hive. I wrote a file in HDFS using the PutHDFS nifi processor.
When i try to create a table from this location in Hive Ambari view i get this error message :
H110 Unable to submit statement. Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [admin] does not have [READ] privilege on [hdfs://sandbox.hortonworks.com:8020/tmp/fb_post_name2] [ERROR_STATUS]
I can fix that by typing :
sudo -u hdfs hadoop fs chown -R admin /tmp/fb_post_name2 sudo -u hdfs hadoop fs chmod 777 /tmp/fb_post_name2
But do i have a way to make it automatic (with the executeProcess processor for instance)?
Thank you in advance.
Created 03-11-2016 04:01 PM
If NiFi is running as a user that can change permissons in HDFS, you should be able to use the following properties in PutHDFS to do the chown/chmod:
Permissions umask
Remote Owner
Remote Group
...according to the documentation: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.hadoop.PutHDFS/index.ht...
Created 03-11-2016 04:01 PM
If NiFi is running as a user that can change permissons in HDFS, you should be able to use the following properties in PutHDFS to do the chown/chmod:
Permissions umask
Remote Owner
Remote Group
...according to the documentation: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.hadoop.PutHDFS/index.ht...
Created 03-11-2016 04:45 PM
Thank you very much. I tried to change the remote Owner but apparently i was not executing nifi as super user. So i went to the shell, stopped nifi and typed :
sudo bash /opt/nifi-1.1.1.0-12/bin/nifi.sh start
However i'm still not considered as super user. Should i change something in the configuration of nifi?
Created 03-11-2016 06:33 PM
Being the client OS superuser doesn't imply that user is a superuser on HDFS. You'd need to add a user to Hadoop with the same UID and GID as your client user, and make the Hadoop user a superuser on that system, or better yet, just give the user the permissions it needs for the desired folder(s): http://stackoverflow.com/questions/24184306/how-to-add-user-in-supergroup-of-hdfs-in-linux