You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Quanlong Huang (Code Review)" <ge...@cloudera.org> on 2026/06/01 06:00:47 UTC

[Impala-ASF-CR] IMPALA-14647: Fix truncate for replicated txn tables always delete data

Hello k.venureddy2103@gmail.com, Zoltan Borok-Nagy, Sai Hemanth Gantasala, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23810

to look at the new patch set (#2).

Change subject: IMPALA-14647: Fix truncate for replicated txn tables always delete data
......................................................................

IMPALA-14647: Fix truncate for replicated txn tables always delete data

If a transactional table is being replicated by Hive replication, Impala
uses the truncateTable HMS API to truncate it. However, the last
parameter (boolean deleteData) is not set, which causing HMS always
delete the data.

In HiveServer, there is a configuration, "hive.acid.truncate.usebase",
to control whether to create a new base_* dir (so keep the data files)
for truncate operation. This patch fixes the API invocation to respect
this configuration.

Tests:
 - Added test to verify the data files exist after truncate.
 - Added util method to fetch effective hadoop and hive configs from the
   /hadoop-varz endpoint.

Change-Id: Ia31991baeb2ef8717c387b841b65cff562dbcae0
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/service/JniCatalog.java
M tests/common/impala_service.py
M tests/common/impala_test_suite.py
M tests/metadata/test_event_processing_base.py
5 files changed, 56 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/23810/2
-- 
To view, visit http://gerrit.cloudera.org:8080/23810
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia31991baeb2ef8717c387b841b65cff562dbcae0
Gerrit-Change-Number: 23810
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Anonymous Coward <k....@gmail.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Sai Hemanth Gantasala <sa...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>