You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/08/27 22:27:00 UTC
[jira] [Commented] (IMPALA-8896) alterPartitionsWithTransaction()
emits too many alter table operations
[ https://issues.apache.org/jira/browse/IMPALA-8896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917176#comment-16917176 ]
ASF subversion and git services commented on IMPALA-8896:
---------------------------------------------------------
Commit db007486a3d11ca935c3a6722f9ae388fb097853 in impala's branch refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=db00748 ]
IMPALA-8896: fix alterPartitionsWithTransaction() that emitted too many alter tables.
Moved 'alter_partitions()' RPC outside of the for-loop
in alterPartitionsWithTransaction(). Having it inside the for-loop made
many unnecessary RPC calls towards HMS.
Change-Id: I47d9d732caf3093206efb1f283fec2eee3347671
Reviewed-on: http://gerrit.cloudera.org:8080/14148
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
> 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
>
> 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: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org