[
https://issues.apache.org/jira/browse/IMPALA-8896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltán Borók-Nagy resolved IMPALA-8896.
---------------------------------------
Fix Version/s: Impala 3.4.0
Resolution: Fixed
> alterPartitionsWithTransaction() emits too many alter table operations
> ----------------------------------------------------------------------
>
> Key: IMPALA-8896
> URL: https://issues.apache.org/jira/browse/IMPALA-8896
> Project: IMPALA
> Issue Type: Bug
> Reporter: Zoltán Borók-Nagy
> Assignee: Zoltán Borók-Nagy
> Priority: Major
> Fix For: Impala 3.4.0
>
>
> alterPartitionsWithTransaction() has a for loop that updates the write ids of
> the partitions.
> Unfortunately it also does an RPC inside the for loop that updates all
> partitions. This could be done outside of the for loop.
> {noformat}
> public static void alterPartitionsWithTransaction(IMetaStoreClient client,
> String dbName, String tblName, List<Partition> partitions,
> TblTransaction tblTxn
> ) throws InvalidOperationException, MetaException, TException {
> for (Partition part : partitions) {
> part.setWriteId(tblTxn.writeId);
> // Correct validWriteIdList is needed
> // to commit the alter partitions operation in hms side.
> client.alter_partitions(dbName, tblName, partitions, null,
> tblTxn.validWriteIds, tblTxn.writeId);
> }
> }{noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]