You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (JIRA)" <ji...@apache.org> on 2018/05/29 10:13:00 UTC
[jira] [Assigned] (HIVE-19718) Adding partitions in bulk also
fetches table for each partition
[ https://issues.apache.org/jira/browse/HIVE-19718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Vary reassigned HIVE-19718:
---------------------------------
Assignee: Peter Vary
> Adding partitions in bulk also fetches table for each partition
> ---------------------------------------------------------------
>
> Key: HIVE-19718
> URL: https://issues.apache.org/jira/browse/HIVE-19718
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Affects Versions: 3.0.0
> Environment: Looking at {{convertToMPart}}:
> {code:Java}
> private MPartition convertToMPart(Partition part, boolean useTableCD)
> throws InvalidObjectException, MetaException {
> MTable mt = getMTable(part.getCatName(), part.getDbName(), part.getTableName());
> ...
> {code}
> So what we have as a result is that we fetch table for every partition where it should be done just once.
> Reporter: Alexander Kolbasov
> Assignee: Peter Vary
> Priority: Major
>
> The ObjectStore.addPartitions() method does this:
> {code:java}
> for (Partition part : parts) {
> if (!part.getTableName().equals(tblName) || !part.getDbName().equals(dbName)) {
> throw new MetaException("Partition does not belong to target table "
> + dbName + "." + tblName + ": " + part);
> }
> MPartition mpart = convertToMPart(part, true); // <-- Here
> toPersist.add(mpart);
> ...{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)