typo improvement

main
Wankai Zhang 10 years ago committed by wankai
parent be25ee44fe
commit dff2b1a8f8
  1. 18
      table/block_based_table_builder.cc

@ -133,12 +133,12 @@ class ShortenedIndexBuilder : public IndexBuilder {
index_block_builder_.Add(*last_key_in_current_block, handle_encoding); index_block_builder_.Add(*last_key_in_current_block, handle_encoding);
} }
virtual Status Finish(IndexBlocks* index_blocks) { virtual Status Finish(IndexBlocks* index_blocks) override {
index_blocks->index_block_contents = index_block_builder_.Finish(); index_blocks->index_block_contents = index_block_builder_.Finish();
return Status::OK(); return Status::OK();
} }
virtual size_t EstimatedSize() const { virtual size_t EstimatedSize() const override {
return index_block_builder_.CurrentSizeEstimate(); return index_block_builder_.CurrentSizeEstimate();
} }
@ -175,14 +175,14 @@ class HashIndexBuilder : public IndexBuilder {
explicit HashIndexBuilder(const Comparator* comparator, explicit HashIndexBuilder(const Comparator* comparator,
const SliceTransform* hash_key_extractor) const SliceTransform* hash_key_extractor)
: IndexBuilder(comparator), : IndexBuilder(comparator),
primary_index_builder(comparator), primary_index_builder_(comparator),
hash_key_extractor_(hash_key_extractor) {} hash_key_extractor_(hash_key_extractor) {}
virtual void AddIndexEntry(std::string* last_key_in_current_block, virtual void AddIndexEntry(std::string* last_key_in_current_block,
const Slice* first_key_in_next_block, const Slice* first_key_in_next_block,
const BlockHandle& block_handle) override { const BlockHandle& block_handle) override {
++current_restart_index_; ++current_restart_index_;
primary_index_builder.AddIndexEntry(last_key_in_current_block, primary_index_builder_.AddIndexEntry(last_key_in_current_block,
first_key_in_next_block, block_handle); first_key_in_next_block, block_handle);
} }
@ -213,9 +213,9 @@ class HashIndexBuilder : public IndexBuilder {
} }
} }
virtual Status Finish(IndexBlocks* index_blocks) { virtual Status Finish(IndexBlocks* index_blocks) override {
FlushPendingPrefix(); FlushPendingPrefix();
primary_index_builder.Finish(index_blocks); primary_index_builder_.Finish(index_blocks);
index_blocks->meta_blocks.insert( index_blocks->meta_blocks.insert(
{kHashIndexPrefixesBlock.c_str(), prefix_block_}); {kHashIndexPrefixesBlock.c_str(), prefix_block_});
index_blocks->meta_blocks.insert( index_blocks->meta_blocks.insert(
@ -223,8 +223,8 @@ class HashIndexBuilder : public IndexBuilder {
return Status::OK(); return Status::OK();
} }
virtual size_t EstimatedSize() const { virtual size_t EstimatedSize() const override {
return primary_index_builder.EstimatedSize() + prefix_block_.size() + return primary_index_builder_.EstimatedSize() + prefix_block_.size() +
prefix_meta_block_.size(); prefix_meta_block_.size();
} }
@ -237,7 +237,7 @@ class HashIndexBuilder : public IndexBuilder {
PutVarint32(&prefix_meta_block_, pending_block_num_); PutVarint32(&prefix_meta_block_, pending_block_num_);
} }
ShortenedIndexBuilder primary_index_builder; ShortenedIndexBuilder primary_index_builder_;
const SliceTransform* hash_key_extractor_; const SliceTransform* hash_key_extractor_;
// stores a sequence of prefixes // stores a sequence of prefixes

Loading…
Cancel
Save