Files
impala/testdata/cluster/node_templates
wzhou-code fcaea30b15 IMPALA-10557: Support Kudu's multi-row transaction
Kudu added multi-row transaction so Impala could run query that inserts
multiple rows into Kudu's table in the context of a single transaction.
Kudu provides new Java/C++ client APIs to open/commit/rollback
transaction, create session with transaction, serialize/deserialize
metadata of transaction object. Kudu transaction object has built-in
heartbeater.

This patch added Impala support to use Kudu's multiple-row transaction.
 - Added a new query option to enable Kudu's transaction.
 - When the query option is set, a new Kudu transaction should be
   started for "insert", "CTAS" and "UPDATE/UPSERT/DELETE" statements
   by Impala's frontend of coordinator.
 - The Kudu transaction objects are kept in KuduTransactionManager until
   the transactions are going to be aborted or committed.
 - Frontend serialize the transaction metadata into a transaction token
   and pass to executors.
 - Executors deserialize the transaction token and ingest via that
   transaction handle. For Kudu session in the context of a transaction,
   return the first error if there are any pending errors for the Kudu
   session so that the Kudu transaction will be aborted.
   Since Kudu does not support transaction for "UPDATE/UPSERT/DELETE"
   statements now, Kudu returns error which causes transaction to be
   aborted.
 - Coordinator commits the transaction if everything goes well.
   Otherwise, aborts the transaction.

Also changed code to store KuduClient as shared pointer since KuduClient
has to be passed as a shared pointer when KuduTransaction::Deserialize()
is called.

Testing:
 - Added new e-to-e tests for Kudu transaction.
 - Passed core test.

Change-Id: I876ada48991afdff5d61b5d6a0417571aba7cb34
Reviewed-on: http://gerrit.cloudera.org:8080/17553
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2021-06-24 20:34:45 +00:00
..