Csaba Ringhofer has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/17313


Change subject: WIP: IMPALA-10656: Fire insert events before commit
......................................................................

WIP: IMPALA-10656: Fire insert events before commit

Before this fix Impala committed an insert first, then reloaded the table
from HMS, and generated the insert events based on the difference between
the two snapshots. (e.g. which file was not present in the old snapshot
but are there in the new one).

Hive replication expects the insert events before the commit, so this may
potentially lead to issues there.

The solution is to collect the new files during the insert in the backend,
and send the insert events based on this file set. This wasn't very hard
to do as we were alrady collecting the files in some cases:
- to move them from staging dir to their final location in case of
  non-partitioned tables
- to write the file list to snapshot files in case of Icebert tables
This patch unifies the paths above and collects all information about
the created files regardless of the table type.

Testing:
- no new tests
- I wasn't able to run EE tests yet, this is the reason behind the poc
  state
- done some basic manual testing

Change-Id: I2ed812dbcb5f55efff3a910a3daeeb76cd3295b9
---
M be/src/exec/hbase-table-sink.cc
M be/src/exec/hdfs-table-sink.cc
M be/src/exec/hdfs-text-table-writer.cc
M be/src/exec/output-partition.h
M be/src/exec/parquet/hdfs-parquet-table-writer.cc
M be/src/runtime/dml-exec-state.cc
M be/src/runtime/dml-exec-state.h
M be/src/service/client-request-state.cc
M common/protobuf/control_service.proto
M common/thrift/CatalogService.thrift
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M 
fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
12 files changed, 225 insertions(+), 216 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/13/17313/3
--
To view, visit http://gerrit.cloudera.org:8080/17313
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ed812dbcb5f55efff3a910a3daeeb76cd3295b9
Gerrit-Change-Number: 17313
Gerrit-PatchSet: 3
Gerrit-Owner: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>

Reply via email to