This is an automated email from the ASF dual-hosted git repository. adar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit e7d9d02479d5e3801b711164a157c51a2c9109c5 Author: lingbin <[email protected]> AuthorDate: Mon Sep 30 13:25:38 2019 +0800 [docs] Fix code block formatting Change-Id: Ibc54ba74ee58e1c601bf7e60a3a51c6d48659345 Reviewed-on: http://gerrit.cloudera.org:8080/14320 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins --- docs/design-docs/tablet.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/design-docs/tablet.md b/docs/design-docs/tablet.md index fb2d0fe..6e581a4 100644 --- a/docs/design-docs/tablet.md +++ b/docs/design-docs/tablet.md @@ -453,8 +453,8 @@ number of REDO delta files. ``` Major delta compactions satisfy delta compaction goals 1 and 2, but cost more -than than minor delta compactions since they must read and re-write the base -data, which is typically larger than the delta data. +than minor delta compactions since they must read and re-write the base data, +which is typically larger than the delta data. A major REDO delta compaction may be performed against any subset of the columns in a DiskRowSet -- if only a single column has received a significant number of updates, @@ -647,11 +647,16 @@ Additionally, if the key is not needed in the query results, the query plan need not consult the key except perhaps to determine scan boundaries. As an example, consider the query: + +``` > SELECT SUM(cpu_usage) FROM timeseries WHERE machine = 'foo.cloudera.com' AND unix_time BETWEEN 1349658729 AND 1352250720; ... given a composite primary key (host, unix_time) +``` This may be evaluated in Kudu with the following pseudo-code: + +``` sum = 0 foreach RowSet: start_rowid = rowset.lookup_key(1349658729) @@ -662,6 +667,7 @@ This may be evaluated in Kudu with the following pseudo-code: while remaining > 0: block = iter.fetch_upto(remaining) sum += sum(block) +``` The fetching of blocks can be done very efficiently since the application of any potential mutations can simply index into the block and replace
