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

Sushanth Sowmyan commented on HIVE-9736:
----------------------------------------

The problem, as Sergio mentions, is that accessMethod is instantiated via 
reflection as a method that can take a Path and a FsAction. In the call, 
however, it is called with a FileStatus and an FsAction.

To wit, this will fix it:

{noformat}
-          accessMethod.invoke(fs, statuses.next(), combine(actions));
+          accessMethod.invoke(fs, statuses.next().getPath(), combine(actions));
{noformat}

This is easily fixed as a one-line fix, but I feel we need more testing. At the 
very least, I can see a case for a nullcheck past what I just mentioned.

At this time, I recommend we close HIVE-10638 as a DUPLICATE, revert HIVE-9736, 
reopen it, add this fix in, run through the precommit tests again, and then get 
it in.


> StorageBasedAuthProvider should batch namenode-calls where possible.
> --------------------------------------------------------------------
>
>                 Key: HIVE-9736
>                 URL: https://issues.apache.org/jira/browse/HIVE-9736
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Security
>            Reporter: Mithun Radhakrishnan
>            Assignee: Mithun Radhakrishnan
>             Fix For: 1.2.0
>
>         Attachments: HIVE-9736.1.patch, HIVE-9736.2.patch, HIVE-9736.3.patch, 
> HIVE-9736.4.patch, HIVE-9736.5.patch, HIVE-9736.6.patch
>
>
> Consider a table partitioned by 2 keys (dt, region). Say a dt partition could 
> have 10000 associated regions. Consider that the user does:
> {code:sql}
> ALTER TABLE my_table DROP PARTITION (dt='20150101');
> {code}
> As things stand now, {{StorageBasedAuthProvider}} will make individual 
> {{DistributedFileSystem.listStatus()}} calls for each partition-directory, 
> and authorize each one separately. It'd be faster to batch the calls, and 
> examine multiple FileStatus objects at once.



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

Reply via email to