Zoltan Borok-Nagy has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23810 )
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. Note that for non-transactional tables, the behavior is still deleting the data files, which is consistent with Hive. 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 Reviewed-on: http://gerrit.cloudera.org:8080/23810 Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Csaba Ringhofer <[email protected]> --- 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, 59 insertions(+), 6 deletions(-) Approvals: Impala Public Jenkins: Verified Csaba Ringhofer: Looks good to me, approved -- 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: merged Gerrit-Change-Id: Ia31991baeb2ef8717c387b841b65cff562dbcae0 Gerrit-Change-Number: 23810 Gerrit-PatchSet: 7 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
