You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2017/12/16 22:18:34 UTC
[kudu-CR] design-docs: improve cfile.md
Hello David Ribeiro Alves, Andrew Wong, Hao Hao, Todd Lipcon,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/8860
to review the following change.
Change subject: design-docs: improve cfile.md
......................................................................
design-docs: improve cfile.md
I've continually found the CFile abstraction difficult to place in
context with the higher-level DiskRowSet and lower-level BlockManager
abstractions. Every time I revisit the CFile code I have to re-research
these relationships and interactions. cfile.md is currently lacking in
these details, so this is an attempt to fix that.
WIP:
- I've added a bunch of TODOs where the doc is unclear, especially in
places where I'm not sure of the answer. I'd apprecitate reviewers
chiming in via comments if they can answer any of the questions.
- The markdown formatting of the doc is pretty attrocious, I intend to
fix this in a follow-up revision. I think the doc was written
originally as just a text file.
Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
---
M docs/design-docs/cfile.md
M docs/design-docs/tablet.md
2 files changed, 58 insertions(+), 10 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/8860/1
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 3:
I'm going to land this for now, with the intention to update it soon if I can get the renames landed (cfile -> chunk, cblock -> page).
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 3
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 25 Jan 2018 19:05:49 +0000
Gerrit-HasComments: No
[kudu-CR] design-docs: improve cfile.md
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(5 comments)
Filled in some things
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64: TODO(dan): point out when/what version the v1 -> v2 transition was made.
https://github.com/apache/kudu/commit/f82cf6918c00dff6aecad5a6b50836b7eb5db508 seems like 1.3?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@76
PS1, Line 76: How big is a data block in bytes and row count, typically?
: - How do we decide when a data block is full (by data size, by # of values, ...)?
: - For Prefix encoding, how many restart points can we expect to be in a single
: block?
- cfile block size is determined by the cfile_default_block_size flag (min is 512B), seems to dictate the size of the buffer we allocate for it in the BlockBuilder implementations
- looking at a couple encoding types (rle, binary_plain), data is appended to a specified-sized buffer, and once it's at the end of the buffer, it's considered full, at which point the cblock is finished
- not sure, although this information might be better suited for binary_prefix_block.h? Seems like it's missing a few details...
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@113
PS1, Line 113: Group Varint Frame-Of-Reference Encoding
apparently this is deprecated? See common.proto
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@133
PS1, Line 133: TODO(dan): No discussion of dictionary encoding, and the associated dictionary
: block.
Not sure if we need all of the encodings described in this doc. For a list of them, there's common.proto, and at least for dictionary encoding, binary_dict_block.h is pretty informative, unless there's something you'd like to see that's missing.
Maybe a map between encodings and the .h's?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@170
PS1, Line 170: ODO(dan): What's the branching factor of the B-Tree?
:
: TODO(dan): is the 'configured block size' the same for index and data blocks?
:
: TODO(dan): What does `Int` signify in the diagram below? There is some
: explanation/background missing here.
There should probably be some mention of concurrent_btree.h
- Interesting. From concurrent_btree.h:
keyptr_space = Traits::kInternalNodeSize - constant_overhead;
kFanout = keyptr_space / (sizeof(KeyInlineSlice) + sizeof(NodePtr<Traits>))
- from cfile_writer.cc, index_block_size is 32KB
- I think "Int" refers to an InternalNode on CBTree
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 19 Dec 2017 09:27:30 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64: v1 -> v2
Would it be nice to briefly doc why do we need to have two versions of CFiles?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@86
PS1, Line 86: group-varint coded
Not sure if group-varint encoding is also deprecated for this?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@100
PS1, Line 100: restart point" which is necessary for
: faster binary searching.
A bit more explanation on how it is related to faster binary searching?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@133
PS1, Line 133: TODO(dan): No discussion of dictionary encoding, and the associated dictionary
: block.
> Not sure if we need all of the encodings described in this doc. For a list
Yeah, I think it would be useful to link the more detail doc on .h
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@222
PS1, Line 222: queries like: "seek to the data block
: containing the Nth entry in this CFile".
Should we add some insight on from which layer these queries are issued?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@260
PS1, Line 260: incompatible_features
This is the first time mention 'incompatible_features'. And do not see it in the above diagram about footer?
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 20 Dec 2017 00:13:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 2:
(18 comments)
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@18
PS1, Line 18: RowSet](tablet.md) each column and DeltaFile will
: map to a single CFile. In addit
> maybe: "in a separate CFile" to make the distinction from when it's stored
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@24
PS1, Line 24: ter
> remove 'the'
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@23
PS1, Line 23: o-one with a file
: in the filesystem. The mapping of CFiles to the filesystem is determined by the
: [BlockManager](../../src/kudu/fs/block_manager.
> Maybe it's be clearer to mention that a CFIle is a logically a unit with he
I don't think that would make this section clearer; this is all about the relationship between a CFile and the lower-level BlockManager. The bigginning/middle/end is discussed below in 'File Format'.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64: | field | width (bytes) | notes |
> https://github.com/apache/kudu/commit/f82cf6918c00dff6aecad5a6b50836b7eb5db
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64: | field | width (bytes) | notes |
> Maybe add a version history with a super short blurb and commit hashes?
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64:
> Would it be nice to briefly doc why do we need to have two versions of CFil
I added a link to the commit, which goes into good detail.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@76
PS1, Line 76: ersion | string |
: | --- | --- |
> does this necessarily have to be in this file, if there are no limits to th
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@76
PS1, Line 76: rsion | string |
: | --- | --- |
: | CFile v1 | `kuducfil` |
: | CFile v2
> It'd also be nice to clarify the behavior if a value overflows the buffer.
I've added the phrase 'best-effort size limited', which hopefully makes this clear. If you think it's vague I can expound, though.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@86
PS1, Line 86:
> It's not.
Ack
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@113
PS1, Line 113:
> apparently this is deprecated? See common.proto
I've added a note on how it's used internally.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@133
PS1, Line 133:
: ### Plain Encodin
> Do we actually have good descriptions of these encodings, though?
I've added descriptions of all encodings, because I personally feel that it's a useful reference.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@170
PS1, Line 170: | --- |
> again, should this be here?
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@170
PS1, Line 170: --- |
: | number of elements |
: | ordinal position |
: | restart interval |
: | unused |
:
> Is concurrent_btree.h the same btree? I was under the impression that conc
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@199
PS1, Line 199: un-length Encodi
> Yeah. I think the diagram may be overkill, but I think we should mention th
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@212
PS1, Line 212:
: ### Group Varint Frame-of-Refe
> interspersed, iirc
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@217
PS1, Line 217:
: Starts with a header of four [group-varint](group-varint) encoded
> +1
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@225
PS1, Line 225:
> not your fault, but typo.
Done
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@260
PS1, Line 260: | |
> This is the first time mention 'incompatible_features'. And do not see it i
Done
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 2
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Sat, 20 Jan 2018 03:06:32 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
The doc also fails to mention the block cache, which I believe is in-scope, since the block cache's blocks are CFile data blocks.
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Sat, 16 Dec 2017 22:34:27 +0000
Gerrit-HasComments: No
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@133
PS1, Line 133: TODO(dan): No discussion of dictionary encoding, and the associated dictionary
: block.
> +1 to leaving out the details of encodings here and just referring elsewher
Do we actually have good descriptions of these encodings, though?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@170
PS1, Line 170: ODO(dan): What's the branching factor of the B-Tree?
:
: TODO(dan): is the 'configured block size' the same for index and data blocks?
:
: TODO(dan): What does `Int` signify in the diagram below? There is some
: explanation/background missing here.
Is concurrent_btree.h the same btree? I was under the impression that concurrent_btree was just used for the MRS.
> I think "Int" refers to an InternalNode on CBTree
Good call. Completely obvious in retrospect, but I don't think I ever would have made that leap. I'll call it out more explicitly.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@199
PS1, Line 199: my best guess is
> fwiw, I agree with your guess
Yeah. I think the diagram may be overkill, but I think we should mention they are written to the CFile in post-order traversal with a link to https://en.wikipedia.org/wiki/Tree_traversal#Post-order.
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 22 Dec 2017 20:58:30 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(8 comments)
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@18
PS1, Line 18: compound primary key, then the associated ad-hoc
: index will be stored in a CFile
maybe: "in a separate CFile" to make the distinction from when it's stored inline with the data.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@23
PS1, Line 23: A CFile is
: written to a single BlockManager Block (not to be confused with the data blocks,
: which are internal to CFiles, discussed below).
Maybe it's be clearer to mention that a CFIle is a logically a unit with header, middle section and footer, but that its then split into blocks and the mapping of blocks to actual files is determined by the block manager
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@64
PS1, Line 64: TODO(dan): point out when/what version the v1 -> v2 transition was made.
Maybe add a version history with a super short blurb and commit hashes?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@76
PS1, Line 76: How big is a data block in bytes and row count, typically?
: - How do we decide when a data block is full (by data size, by # of values, ...)?
does this necessarily have to be in this file, if there are no limits to these things? maybe it'd be more helpful to list the most relevant flags?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@170
PS1, Line 170: TODO(dan): What's the branching factor of the B-Tree?
again, should this be here?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@212
PS1, Line 212: TODO(dan): are the index blocks written out contiguously, or are they
: interspersed with data blocks?
interspersed, iirc
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@217
PS1, Line 217: The info about the different types of indexes is super important,
: conceptually. It should probably be part of the intro paragraphs.
+1
Also we should hint at their uses.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@225
PS1, Line 225: reponsible
not your fault, but typo.
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 22 Dec 2017 20:43:26 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 3
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 24 Jan 2018 23:47:34 +0000
Gerrit-HasComments: No
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 2:
rendered: https://github.com/danburkert/kudu/blob/cfile-design/docs/design-docs/cfile.md#group-varint-frame-of-reference-encoding
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 2
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Sat, 20 Jan 2018 03:08:38 +0000
Gerrit-HasComments: No
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
design-docs: improve cfile.md
I've continually found the CFile abstraction difficult to place in
context with the higher-level DiskRowSet and lower-level BlockManager
abstractions. Every time I revisit the CFile code I have to re-research
these relationships and interactions. cfile.md is currently lacking in
these details, so this is an attempt to fix that.
Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Reviewed-on: http://gerrit.cloudera.org:8080/8860
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <da...@gmail.com>
---
M docs/design-docs/cfile.md
M docs/design-docs/tablet.md
2 files changed, 253 insertions(+), 149 deletions(-)
Approvals:
Kudu Jenkins: Verified
David Ribeiro Alves: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 4
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] design-docs: improve cfile.md
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(7 comments)
http://gerrit.cloudera.org:8080/#/c/8860/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/8860/1//COMMIT_MSG@19
PS1, Line 19: attrocious
nit: atrocious
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@76
PS1, Line 76: How big is a data block in bytes and row count, typically?
: - How do we decide when a data block is full (by data size, by # of values, ...)?
: - For Prefix encoding, how many restart points can we expect to be in a single
: block?
> - cfile block size is determined by the cfile_default_block_size flag (min
It'd also be nice to clarify the behavior if a value overflows the buffer. Do we extend the buffer to fit it or truncate the buffer and put the value first in the next cblock? What happens if a single cell value is too big for a block?
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@86
PS1, Line 86: group-varint coded
> Not sure if group-varint encoding is also deprecated for this?
It's not.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@100
PS1, Line 100: restart point" which is necessary for
: faster binary searching.
> A bit more explanation on how it is related to faster binary searching?
Without restarts, the nth value in the block has to be computed from values 1..(n - 1), so binary searching into the block is not possible without decoding all previous values. With restart points, binary searching can find the largest restart point <= the desired value, and decode forward from there.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@133
PS1, Line 133: TODO(dan): No discussion of dictionary encoding, and the associated dictionary
: block.
> Yeah, I think it would be useful to link the more detail doc on .h
+1 to leaving out the details of encodings here and just referring elsewhere.
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@199
PS1, Line 199: my best guess is
fwiw, I agree with your guess
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@222
PS1, Line 222: queries like: "seek to the data block
: containing the Nth entry in this CFile".
> Should we add some insight on from which layer these queries are issued?
+1. I'm thinking it'd be used to skip forward to index i in CFiles for non-primary key columns when the value index was used to skip forward and ended up at index i?
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 20 Dec 2017 21:52:15 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8860 )
Change subject: design-docs: improve cfile.md
......................................................................
Patch Set 1:
(1 comment)
Rendered version: https://github.com/danburkert/kudu/blob/cfile-design/docs/design-docs/cfile.md
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md
File docs/design-docs/cfile.md:
http://gerrit.cloudera.org:8080/#/c/8860/1/docs/design-docs/cfile.md@24
PS1, Line 24: the
remove 'the'
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Sat, 16 Dec 2017 22:22:12 +0000
Gerrit-HasComments: Yes
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, David Ribeiro Alves, Kudu Jenkins, Andrew Wong, Hao Hao, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/8860
to look at the new patch set (#2).
Change subject: design-docs: improve cfile.md
......................................................................
design-docs: improve cfile.md
I've continually found the CFile abstraction difficult to place in
context with the higher-level DiskRowSet and lower-level BlockManager
abstractions. Every time I revisit the CFile code I have to re-research
these relationships and interactions. cfile.md is currently lacking in
these details, so this is an attempt to fix that.
Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
---
M docs/design-docs/cfile.md
M docs/design-docs/tablet.md
M src/kudu/cfile/cfile_writer.cc
M src/kudu/cfile/encoding-test.cc
4 files changed, 270 insertions(+), 156 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/8860/2
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 2
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] design-docs: improve cfile.md
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, David Ribeiro Alves, Kudu Jenkins, Andrew Wong, Hao Hao, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/8860
to look at the new patch set (#3).
Change subject: design-docs: improve cfile.md
......................................................................
design-docs: improve cfile.md
I've continually found the CFile abstraction difficult to place in
context with the higher-level DiskRowSet and lower-level BlockManager
abstractions. Every time I revisit the CFile code I have to re-research
these relationships and interactions. cfile.md is currently lacking in
these details, so this is an attempt to fix that.
Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
---
M docs/design-docs/cfile.md
M docs/design-docs/tablet.md
2 files changed, 253 insertions(+), 149 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/8860/3
--
To view, visit http://gerrit.cloudera.org:8080/8860
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I770028bba3f7a49c96f32893c285221c84be39ce
Gerrit-Change-Number: 8860
Gerrit-PatchSet: 3
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>