[ 
https://issues.apache.org/jira/browse/SENTRY-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228768#comment-15228768
 ] 

Sravya Tirukkovalur commented on SENTRY-1184:
---------------------------------------------

So here are the different cases for renameAuthzObject
1. oldName == newName, oldPath != newPath. That is only the location needs to 
be updated. This is as simple as newName.add(newPath), newName.delete(oldPath)
2. oldName != newName and
    oldPath == newPath : rename external table, new_table.add(new_path), 
new_table.add(old_table_partition_paths), old_table.dropAllPaths
    oldPath != newPath : rename managed table, new_table.add(new_path), 
*new_table.add(new_table_partition_paths)?*, old_table.dropAllPaths
  
I am not sure if HMS invokes post event listener for all partitions when a 
managed table is renamed. Will check.

> NPE in HMSPaths#renameAuthzObject
> ---------------------------------
>
>                 Key: SENTRY-1184
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1184
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Sravya Tirukkovalur
>            Assignee: Sravya Tirukkovalur
>         Attachments: SENTRY-1184.001-branch-1.5.1.patch, SENTRY-1184.002.patch
>
>
> java.lang.NullPointerException
> at org.apache.sentry.hdfs.HMSPaths.renameAuthzObject(HMSPaths.java:571)
> at 
> org.apache.sentry.hdfs.UpdateableAuthzPaths.applyPartialUpdate(UpdateableAuthzPaths.java:106)
> at 
> org.apache.sentry.hdfs.UpdateableAuthzPaths.updatePartial(UpdateableAuthzPaths.java:75)
> at 
> org.apache.sentry.hdfs.SentryAuthorizationInfo.processUpdates(SentryAuthorizationInfo.java:174)
> at 
> org.apache.sentry.hdfs.SentryAuthorizationInfo.update(SentryAuthorizationInfo.java:131)
> at 
> org.apache.sentry.hdfs.SentryAuthorizationInfo.run(SentryAuthorizationInfo.java:193)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to