Skip to content

Commit

Permalink
[RocksDB] Move table.h to table/
Browse files Browse the repository at this point in the history
Summary:
- don't see a point exposing table.h to the public.
- fixed make clean to remove also *.d files.

Test Plan: make check; db_stress

Reviewers: dhruba, heyongqiang

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D10479
  • Loading branch information
haoboxu committed Apr 22, 2013
1 parent 344e832 commit eb6d139
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ valgrind_check: all $(PROGRAMS) $(TESTS)
done

clean:
-rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) $(THRIFTSERVER) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
-rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) $(THRIFTSERVER) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk */*.d */*/*.d
-rm -rf ios-x86/* ios-arm/*

$(LIBRARY): $(LIBOBJECTS)
Expand Down
2 changes: 1 addition & 1 deletion db/corruption_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#include <sys/types.h>
#include "leveldb/cache.h"
#include "leveldb/env.h"
#include "leveldb/table.h"
#include "leveldb/write_batch.h"
#include "db/db_impl.h"
#include "db/filename.h"
#include "db/log_format.h"
#include "db/version_set.h"
#include "table/table.h"
#include "util/logging.h"
#include "util/testharness.h"
#include "util/testutil.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
#include "leveldb/env.h"
#include "leveldb/statistics.h"
#include "leveldb/status.h"
#include "leveldb/table.h"
#include "leveldb/table_builder.h"
#include "port/port.h"
#include "table/block.h"
#include "table/merger.h"
#include "table/table.h"
#include "table/two_level_iterator.h"
#include "util/auto_roll_logger.h"
#include "util/build_version.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl_readonly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include "leveldb/db.h"
#include "leveldb/env.h"
#include "leveldb/status.h"
#include "leveldb/table.h"
#include "leveldb/table_builder.h"
#include "port/port.h"
#include "table/block.h"
#include "table/merger.h"
#include "table/table.h"
#include "table/two_level_iterator.h"
#include "util/coding.h"
#include "util/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "db/write_batch_internal.h"
#include "leveldb/cache.h"
#include "leveldb/env.h"
#include "leveldb/table.h"
#include "table/table.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mutexlock.h"
Expand Down
2 changes: 1 addition & 1 deletion db/table_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "db/filename.h"

#include "leveldb/table.h"
#include "leveldb/statistics.h"
#include "table/table.h"
#include "util/coding.h"

namespace leveldb {
Expand Down
2 changes: 1 addition & 1 deletion db/table_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "db/dbformat.h"
#include "leveldb/env.h"
#include "leveldb/cache.h"
#include "leveldb/table.h"
#include "port/port.h"
#include "table/table.h"
#include "util/storage_options.h"

namespace leveldb {
Expand Down
12 changes: 5 additions & 7 deletions table/block_test.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) 2012 Facebook.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "leveldb/table.h"

#include <string>
#include "db/dbformat.h"
#include "db/memtable.h"
Expand All @@ -14,6 +11,7 @@
#include "leveldb/table_builder.h"
#include "table/block.h"
#include "table/block_builder.h"
#include "table/table.h"
#include "table/format.h"
#include "util/random.h"
#include "util/testharness.h"
Expand Down Expand Up @@ -60,7 +58,7 @@ TEST(BlockTest, SimpleTest) {
// read serialized contents of the block
Slice rawblock = builder.Finish();

// create block reader
// create block reader
BlockContents contents;
contents.data = rawblock;
contents.cachable = false;
Expand All @@ -71,7 +69,7 @@ TEST(BlockTest, SimpleTest) {
int count = 0;
Iterator* iter = reader.NewIterator(options.comparator);
for (iter->SeekToFirst();iter->Valid(); count++, iter->Next()) {

// read kv from block
Slice k = iter->key();
Slice v = iter->value();
Expand All @@ -81,8 +79,8 @@ TEST(BlockTest, SimpleTest) {
ASSERT_EQ(v.ToString().compare(values[count]), 0);
}
delete iter;
// read block contents randomly

// read block contents randomly
iter = reader.NewIterator(options.comparator);
for (int i = 0; i < num_records; i++) {

Expand Down
3 changes: 1 addition & 2 deletions table/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "leveldb/table.h"

#include "leveldb/cache.h"
#include "leveldb/comparator.h"
#include "leveldb/env.h"
Expand All @@ -13,6 +11,7 @@
#include "table/block.h"
#include "table/filter_block.h"
#include "table/format.h"
#include "table/table.h"
#include "table/two_level_iterator.h"
#include "util/coding.h"

Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions table/table_test.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "leveldb/table.h"

#include <map>
#include <string>
#include "db/dbformat.h"
Expand All @@ -16,6 +13,7 @@
#include "table/block.h"
#include "table/block_builder.h"
#include "table/format.h"
#include "table/table.h"
#include "util/random.h"
#include "util/testharness.h"
#include "util/testutil.h"
Expand Down
2 changes: 1 addition & 1 deletion table/two_level_iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#include "table/two_level_iterator.h"

#include "leveldb/table.h"
#include "table/block.h"
#include "table/format.h"
#include "table/table.h"
#include "table/iterator_wrapper.h"

namespace leveldb {
Expand Down
2 changes: 1 addition & 1 deletion tools/sst_dump.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "leveldb/table.h"
#include "table/table.h"

#include <map>
#include <string>
Expand Down

0 comments on commit eb6d139

Please sign in to comment.