Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20690


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

[cfile] clean up on IndexBlock{Builder,Iterator,Reader}

This patch contains the following updates:

  * the code in IndexBlockReader::Parse() now catches corruption
    of index block's trailer in a more robust manner
  * removed a few unused fields
  * a few class member functions became static
  * added PREDICT_{TRUE,FALSE} macros for better branch prediction
    where appropriate
  * modernized the code a bit:
    ** fixed const-correctness
    ** changed CHECK() to DCHECK() for the code paths where the
       assertions might trigger due to the variation of control paths,
       but independent of the input data
    ** added more DCHECK() assertions where appropriate
    ** updated the code to conform to the project's current style guide
    ** other minor updates

I also added a test to cover the behavior of IndexBlockReader::Parse()
when parsing corrupted data.

Change-Id: If83dd132b577a481a2ddaa09e2657639f8b92c7d
---
M src/kudu/cfile/index-test.cc
M src/kudu/cfile/index_block.cc
M src/kudu/cfile/index_block.h
M src/kudu/cfile/index_btree.cc
M src/kudu/cfile/index_btree.h
5 files changed, 379 insertions(+), 257 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/20690/1
--
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: newchange
Gerrit-Change-Id: If83dd132b577a481a2ddaa09e2657639f8b92c7d
Gerrit-Change-Number: 20690
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <ale...@apache.org>

Reply via email to