hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mithun Radhakrishnan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-10250) Optimize AuthorizationPreEventListener to reuse TableWrapper objects
Date Wed, 08 Apr 2015 01:00:14 GMT

     [ https://issues.apache.org/jira/browse/HIVE-10250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mithun Radhakrishnan updated HIVE-10250:
----------------------------------------
    Attachment: HIVE-10250.1.patch

Tentative fix. I'll have to rebase this once HIVE-9609 goes in.

> Optimize AuthorizationPreEventListener to reuse TableWrapper objects
> --------------------------------------------------------------------
>
>                 Key: HIVE-10250
>                 URL: https://issues.apache.org/jira/browse/HIVE-10250
>             Project: Hive
>          Issue Type: Bug
>          Components: Authorization
>            Reporter: Mithun Radhakrishnan
>         Attachments: HIVE-10250.1.patch
>
>
> Here's the {{PartitionWrapper}} class in {{AuthorizationPreEventListener}}:
> {code:java|title=AuthorizationPreEventListener.java}
>  public static class PartitionWrapper extends org.apache.hadoop.hive.ql.metadata.Partition
{
> ...
>     public PartitionWrapper(org.apache.hadoop.hive.metastore.api.Partition mapiPart,
PreEventContext context) throws ... {
>  Partition wrapperApiPart   = mapiPart.deepCopy();
>  Table t = context.getHandler().get_table_core(
>              mapiPart.getDbName(), 
>              mapiPart.getTableName());
> ...
> }
> {code}
> {{PreAddPartitionEvent}} (and soon, {{PreDropPartitionEvent}}) correspond not just to
a single partition, but an entire set of partitions added atomically. When the event is authorized,
{{HMSHandler.get_table_core()}} will be called once for every partition in the Event instance.
> Since we already make the assumption that the partition-sets correspond to a single table,
we might as well make a single call.
> I'll have a patch for this, shortly.



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

Mime
View raw message