- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
insert overwrite directory - beeline
- Labels:
-
Apache Hive
Created 07-10-2017 09:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
INSERT OVERWRITE DIRECTORY '/tmp' ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE SELECT visit_id, ivm from abcd.xyz WHERE feed_date BETWEEN '2006-04-01' and '2006-05-01' AND ivm IS NOT NULL limit 10;
Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [rvchinta] does not have [WRITE] privilege on [/tmp] (state=42000,code=40000) 0: jdbc:hive2://hostname.abc.com:8443>
ranger policy /tmp has 777 to public
HDP version 2.6.1
Created 07-10-2017 09:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i updated directory path to hdfs:CLUSTERNAMEHA/tmp and it worked.
Created 07-10-2017 09:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not see this permission denied in ranger audit as well.
Created 07-10-2017 09:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i updated directory path to hdfs:CLUSTERNAMEHA/tmp and it worked.
Created 01-26-2018 07:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can confirm that I had the same problem on HDP 2.6.3. Like suggested, using the fully qualified path (hdfs://<cluster>/path) makes it work.
Created 02-09-2018 06:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
INSERT OVERWRITE DIRECTORY "hdfs://sandbox-hdp.hortonworks.com/tmp/hey2" SELECT * FROM mytable;
(i.e. you need to specify full name of cluster) works fine when you have correct configuration in Ranger, but INSERT OVERWRITE DIRECTORY "/tmp/hey2" SELECT * FROM mytable; will fail. At least this is true for HDP 2.6.3
Created 05-15-2018 08:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there a workaround solution for the above or is it a behaviour of 2.6.3 and above?
