Hello Tidy Bot, Alexey Serbin, Yifan Zhang, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18742
to look at the new patch set (#10).
Change subject: KUDU-3353 [schema] Add an immutable attribute on column schema
(part 1)
......................................................................
KUDU-3353 [schema] Add an immutable attribute on column schema (part 1)
The overview of design:
1. Add a new column attribute IMMUTABLE, meaning the column cell
value can not be updated after it's been written during inserting
the row.
2. An attempt to modify an immutable cell of an existing row by
UPDATE or UPSERT operation results in returning the newly added
Status::IsImmutable().
3. Use UPDATE_IGNORE and add UPSERT_IGNORE, for UPDATE and UPSERT
ops but ignore update errors on IMMUTABLE columns. Note that
the rest of the columns are updated accordingly to the
operation's data, only the immutable columns aren't changed.
With this change, UPDATE_IGNORE ops ignore both 'key not found'
and 'update on immutable column' errors.
Some use cases:
1. A column represents a semantically constant entity. The
corresponding value is present in every row for a particular
primary key and might change, but it's captured upon the very
first occurrence. An example is 'first_login_timestamp' for
a particular user while 'login_timestamp' is present in every
login record.
2. Similar to the item 1, but the corresponding value, if present,
is the same with every record for a particular primary key.
Here the intention is to reduce the length of the column's
change list. An example is a 'birthday' column.
This patch includes the changes on the server side, proto files, and
necessary changes on the client side because of ColumnSchema
constructor's been changed.
Change-Id: I01e5a806c0e873239b49e6d0b37a7e36578b508d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduSession.java
M src/kudu/client/client-internal.cc
M src/kudu/client/client-test.cc
M src/kudu/client/scan_configuration.cc
M src/kudu/client/schema.cc
M src/kudu/codegen/codegen-test.cc
M src/kudu/common/column_predicate-test.cc
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators-test.cc
M src/kudu/common/partial_row-test.cc
M src/kudu/common/partition-test.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/row_operations.proto
M src/kudu/common/schema-test.cc
M src/kudu/common/schema.cc
M src/kudu/common/schema.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/consensus/log-test.cc
M src/kudu/master/master.proto
M src/kudu/master/master_service.cc
M src/kudu/tablet/all_types-scan-correctness-test.cc
M src/kudu/tablet/cfile_set-test.cc
M src/kudu/tablet/diskrowset-test.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/ops/op.cc
M src/kudu/tablet/ops/op.h
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/ops/write_op.h
M src/kudu/tablet/row_op.cc
M src/kudu/tablet/tablet-decoder-eval-test.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet-test-util.h
M src/kudu/tablet/tablet-test.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metrics.cc
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/txn_participant-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tserver/tablet_server_authorization-test.cc
M src/kudu/tserver/tserver.proto
M src/kudu/util/status.cc
M src/kudu/util/status.h
50 files changed, 429 insertions(+), 80 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/18742/10
--
To view, visit http://gerrit.cloudera.org:8080/18742
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I01e5a806c0e873239b49e6d0b37a7e36578b508d
Gerrit-Change-Number: 18742
Gerrit-PatchSet: 10
Gerrit-Owner: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>