Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20690 )

Change subject: [cfile] clean up on IndexBlock{Builder,Iterator,Reader}
......................................................................


Patch Set 6:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/20690/6/src/kudu/cfile/index_block.cc
File src/kudu/cfile/index_block.cc:

http://gerrit.cloudera.org:8080/#/c/20690/6/src/kudu/cfile/index_block.cc@149
PS6, Line 149: max_size
> What does max_size mean here? Does it represent the limit for sanity check
That's the maximum possible size for sanity checks, and majority of the sized 
in the code below.  More details on the index block layout could be found at 
docs/design-docs/cfile.md


http://gerrit.cloudera.org:8080/#/c/20690/6/src/kudu/cfile/index_block.cc@152
PS6, Line 152: fieds
> fields
Done


http://gerrit.cloudera.org:8080/#/c/20690/6/src/kudu/cfile/index_block.cc@153
PS6, Line 153: // IndexBlockTrailerPB message, it contains at least two 
required fields now:
             :   //   * int32_t num_entries: at least one byte serialized with 
varint encoding
             :   //   * BlockType type: enum, at least one byte serialized
             :   // So, the total for the minimum length is 5 bytes: (1 + 1) + 
(1 + 1).
> Is it possible to add some details as comments to represent an example in s
Ah, there was a typo (addressed in PS7) and probably that was the reason for 
the confusion.

For protobuf encoding and serialization, one can find details and examples at 
https://protobuf.dev/programming-guides/encoding/ which is referred as [1] in 
the comment.  For layout of index blocks, the details and with visualizations 
could be found at 
https://github.com/apache/kudu/blob/master/docs/design-docs/cfile.md#cfile-index
 which is referred as [3] in the comment as of PS7.

I don't think it's worth it duplicating the generic information available at 
[1] and [3] in this code, but the information on the size estimates for this 
particular case are provided.



--
To view, visit http://gerrit.cloudera.org:8080/20690
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If83dd132b577a481a2ddaa09e2657639f8b92c7d
Gerrit-Change-Number: 20690
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ara...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 10 Nov 2023 18:31:16 +0000
Gerrit-HasComments: Yes

Reply via email to