saihemanth-cloudera commented on code in PR #5997:
URL: https://github.com/apache/hive/pull/5997#discussion_r2267802732


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -3050,18 +3050,6 @@ private boolean drop_table_core(final RawStore ms, final 
String catName, final S
       firePreEvent(new PreDropTableEvent(tbl, deleteData, this));
 
       tableDataShouldBeDeleted = checkTableDataShouldBeDeleted(tbl, 
deleteData);
-      if (tableDataShouldBeDeleted && tbl.getSd().getLocation() != null) {

Review Comment:
   @zxl-333 - Based on the scenario you mentioned, I believe this is a Hive or 
Ranger config issue.
   Regarding Hive config, what is hive.server2.enable.doAs set to? It should be 
set to true. By doing so, assuming that you are running queries from jdbc 
client like beeline, when an end-user runs some query, user 'hive' does all the 
operations in the HDFS. Now if an end-user drops a table, user 'hive' will try 
to drop the data for the table path and its partitions.  Now user 'hive' is 
having issues with the permissions with the path that leads to the Ranger 
config issue.
   Regarding ranger config, user 'hive' should be added in hdfs service in the 
ranger policy for hive warehouse table path, and I believe the issue here 
because of this missing policy in hdfs service. Also, when ranger policies are 
missing, the Hadoop ACLs permissions takes into effect.
   
   So I feel, this is not a product issue, and you might have to abandon this 
patch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to