From 50e470791dafb3db017f055f79323aef9a607e43 Mon Sep 17 00:00:00 2001 From: Vijay Nadimpalli Date: Thu, 30 May 2019 14:47:29 -0700 Subject: [PATCH] Organizing rocksdb/table directory by format Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5373 Differential Revision: D15559425 Pulled By: vjnadimpalli fbshipit-source-id: 5d6d6d615582bedd96a4b879bb25d429a6de8b55 --- CMakeLists.txt | 57 ++++++++--------- Makefile | 14 ++--- TARGETS | 58 ++++++++--------- db/builder.cc | 2 +- db/column_family.cc | 2 +- db/compaction_job.cc | 4 +- db/compaction_job_stats_test.cc | 4 +- db/corruption_test.cc | 3 +- db/cuckoo_table_db_test.cc | 4 +- db/db_impl.cc | 4 +- db/db_impl_open.cc | 2 +- db/db_iterator_test.cc | 2 +- db/db_test.cc | 4 +- db/db_test_util.h | 5 +- db/flush_job.cc | 4 +- db/internal_stats.cc | 2 +- db/listener_test.cc | 5 +- db/plain_table_db_test.cc | 6 +- db/table_properties_collector_test.cc | 7 ++- db/version_set.cc | 2 +- options/options.cc | 2 +- options/options_helper.cc | 5 +- options/options_parser.h | 2 +- src.mk | 62 +++++++++---------- .../{ => adaptive}/adaptive_table_factory.cc | 2 +- table/{ => adaptive}/adaptive_table_factory.h | 0 table/{ => block_based}/block.cc | 6 +- table/{ => block_based}/block.h | 6 +- .../block_based_filter_block.cc | 2 +- .../block_based_filter_block.h | 3 +- .../block_based_filter_block_test.cc | 2 +- .../block_based_table_builder.cc | 20 +++--- .../block_based_table_builder.h | 2 +- .../block_based_table_factory.cc | 6 +- .../block_based_table_factory.h | 0 .../block_based_table_reader.cc | 21 +++---- .../block_based_table_reader.h | 8 +-- table/{ => block_based}/block_builder.cc | 4 +- table/{ => block_based}/block_builder.h | 2 +- table/{ => block_based}/block_prefix_index.cc | 2 +- table/{ => block_based}/block_prefix_index.h | 0 table/{ => block_based}/block_test.cc | 5 +- table/{ => block_based}/cachable_entry.h | 0 table/{ => block_based}/data_block_footer.cc | 2 +- table/{ => block_based}/data_block_footer.h | 0 .../data_block_hash_index.cc | 2 +- .../{ => block_based}/data_block_hash_index.h | 0 .../data_block_hash_index_test.cc | 9 +-- table/{ => block_based}/filter_block.h | 2 +- table/{ => block_based}/flush_block_policy.cc | 2 +- table/{ => block_based}/flush_block_policy.h | 0 table/{ => block_based}/full_filter_block.cc | 2 +- table/{ => block_based}/full_filter_block.h | 3 +- .../full_filter_block_test.cc | 2 +- table/{ => block_based}/index_builder.cc | 5 +- table/{ => block_based}/index_builder.h | 4 +- .../partitioned_filter_block.cc | 6 +- .../partitioned_filter_block.h | 11 ++-- .../partitioned_filter_block_test.cc | 8 ++- table/block_fetcher.cc | 4 +- table/block_fetcher.h | 2 +- table/{ => cuckoo}/cuckoo_table_builder.cc | 6 +- table/{ => cuckoo}/cuckoo_table_builder.h | 0 .../{ => cuckoo}/cuckoo_table_builder_test.cc | 2 +- table/{ => cuckoo}/cuckoo_table_factory.cc | 6 +- table/{ => cuckoo}/cuckoo_table_factory.h | 0 table/{ => cuckoo}/cuckoo_table_reader.cc | 4 +- table/{ => cuckoo}/cuckoo_table_reader.h | 0 .../{ => cuckoo}/cuckoo_table_reader_test.cc | 6 +- table/format.cc | 6 +- table/get_context.h | 2 +- table/meta_blocks.cc | 4 +- table/meta_blocks.h | 2 +- table/persistent_cache_helper.cc | 2 +- table/{ => plain}/plain_table_builder.cc | 8 +-- table/{ => plain}/plain_table_builder.h | 5 +- table/{ => plain}/plain_table_factory.cc | 6 +- table/{ => plain}/plain_table_factory.h | 0 table/{ => plain}/plain_table_index.cc | 2 +- table/{ => plain}/plain_table_index.h | 0 table/{ => plain}/plain_table_key_coding.cc | 6 +- table/{ => plain}/plain_table_key_coding.h | 3 +- table/{ => plain}/plain_table_reader.cc | 10 +-- table/{ => plain}/plain_table_reader.h | 4 +- table/sst_file_writer.cc | 3 +- table/table_properties.cc | 3 +- table/table_reader_bench.cc | 4 +- table/table_test.cc | 18 +++--- table/two_level_iterator.cc | 2 +- test_util/testutil.h | 4 +- tools/sst_dump_test.cc | 2 +- tools/sst_dump_tool.cc | 11 ++-- tools/trace_analyzer_tool.cc | 2 +- util/bloom.cc | 4 +- utilities/blob_db/blob_db_impl.cc | 7 ++- utilities/memory/memory_test.cc | 2 +- .../persistent_cache_bench.cc | 2 +- .../persistent_cache/persistent_cache_test.h | 2 +- 98 files changed, 292 insertions(+), 275 deletions(-) rename table/{ => adaptive}/adaptive_table_factory.cc (98%) rename table/{ => adaptive}/adaptive_table_factory.h (100%) rename table/{ => block_based}/block.cc (99%) rename table/{ => block_based}/block.h (99%) rename table/{ => block_based}/block_based_filter_block.cc (99%) rename table/{ => block_based}/block_based_filter_block.h (99%) rename table/{ => block_based}/block_based_filter_block_test.cc (99%) rename table/{ => block_based}/block_based_table_builder.cc (98%) rename table/{ => block_based}/block_based_table_builder.h (100%) rename table/{ => block_based}/block_based_table_factory.cc (99%) rename table/{ => block_based}/block_based_table_factory.h (100%) rename table/{ => block_based}/block_based_table_reader.cc (99%) rename table/{ => block_based}/block_based_table_reader.h (99%) rename table/{ => block_based}/block_builder.cc (98%) rename table/{ => block_based}/block_builder.h (98%) rename table/{ => block_based}/block_prefix_index.cc (99%) rename table/{ => block_based}/block_prefix_index.h (100%) rename table/{ => block_based}/block_test.cc (99%) rename table/{ => block_based}/cachable_entry.h (100%) rename table/{ => block_based}/data_block_footer.cc (97%) rename table/{ => block_based}/data_block_footer.h (100%) rename table/{ => block_based}/data_block_hash_index.cc (98%) rename table/{ => block_based}/data_block_hash_index.h (100%) rename table/{ => block_based}/data_block_hash_index_test.cc (99%) rename table/{ => block_based}/filter_block.h (99%) rename table/{ => block_based}/flush_block_policy.cc (98%) rename table/{ => block_based}/flush_block_policy.h (100%) rename table/{ => block_based}/full_filter_block.cc (99%) rename table/{ => block_based}/full_filter_block.h (99%) rename table/{ => block_based}/full_filter_block_test.cc (99%) rename table/{ => block_based}/index_builder.cc (98%) rename table/{ => block_based}/index_builder.h (99%) rename table/{ => block_based}/partitioned_filter_block.cc (98%) rename table/{ => block_based}/partitioned_filter_block.h (95%) rename table/{ => block_based}/partitioned_filter_block_test.cc (99%) rename table/{ => cuckoo}/cuckoo_table_builder.cc (99%) rename table/{ => cuckoo}/cuckoo_table_builder.h (100%) rename table/{ => cuckoo}/cuckoo_table_builder_test.cc (99%) rename table/{ => cuckoo}/cuckoo_table_factory.cc (94%) rename table/{ => cuckoo}/cuckoo_table_factory.h (100%) rename table/{ => cuckoo}/cuckoo_table_reader.cc (99%) rename table/{ => cuckoo}/cuckoo_table_reader.h (100%) rename table/{ => cuckoo}/cuckoo_table_reader_test.cc (99%) rename table/{ => plain}/plain_table_builder.cc (98%) rename table/{ => plain}/plain_table_builder.h (98%) rename table/{ => plain}/plain_table_factory.cc (98%) rename table/{ => plain}/plain_table_factory.h (100%) rename table/{ => plain}/plain_table_index.cc (99%) rename table/{ => plain}/plain_table_index.h (100%) rename table/{ => plain}/plain_table_key_coding.cc (99%) rename table/{ => plain}/plain_table_key_coding.h (99%) rename table/{ => plain}/plain_table_reader.cc (99%) rename table/{ => plain}/plain_table_reader.h (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6449047fc..5614c83b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -566,36 +566,36 @@ set(SOURCES options/options_parser.cc options/options_sanity_check.cc port/stack_trace.cc - table/adaptive_table_factory.cc - table/block.cc - table/block_based_filter_block.cc - table/block_based_table_builder.cc - table/block_based_table_factory.cc - table/block_based_table_reader.cc - table/block_builder.cc + table/adaptive/adaptive_table_factory.cc + table/block_based/block.cc + table/block_based/block_based_filter_block.cc + table/block_based/block_based_table_builder.cc + table/block_based/block_based_table_factory.cc + table/block_based/block_based_table_reader.cc + table/block_based/block_builder.cc + table/block_based/block_prefix_index.cc + table/block_based/data_block_hash_index.cc + table/block_based/data_block_footer.cc + table/block_based/flush_block_policy.cc + table/block_based/full_filter_block.cc + table/block_based/index_builder.cc + table/block_based/partitioned_filter_block.cc table/block_fetcher.cc - table/block_prefix_index.cc table/bloom_block.cc - table/cuckoo_table_builder.cc - table/cuckoo_table_factory.cc - table/cuckoo_table_reader.cc - table/data_block_hash_index.cc - table/data_block_footer.cc - table/flush_block_policy.cc + table/cuckoo/cuckoo_table_builder.cc + table/cuckoo/cuckoo_table_factory.cc + table/cuckoo/cuckoo_table_reader.cc table/format.cc - table/full_filter_block.cc table/get_context.cc - table/index_builder.cc table/iterator.cc table/merging_iterator.cc table/meta_blocks.cc - table/partitioned_filter_block.cc table/persistent_cache_helper.cc - table/plain_table_builder.cc - table/plain_table_factory.cc - table/plain_table_index.cc - table/plain_table_key_coding.cc - table/plain_table_reader.cc + table/plain/plain_table_builder.cc + table/plain/plain_table_factory.cc + table/plain/plain_table_index.cc + table/plain/plain_table_key_coding.cc + table/plain/plain_table_reader.cc table/sst_file_reader.cc table/sst_file_writer.cc table/table_properties.cc @@ -940,13 +940,14 @@ if(WITH_TESTS) monitoring/statistics_test.cc options/options_settable_test.cc options/options_test.cc - table/block_based_filter_block_test.cc - table/block_test.cc + table/block_based/block_based_filter_block_test.cc + table/block_based/block_test.cc + table/block_based/data_block_hash_index_test.cc + table/block_based/full_filter_block_test.cc + table/block_based/partitioned_filter_block_test.cc table/cleanable_test.cc - table/cuckoo_table_builder_test.cc - table/cuckoo_table_reader_test.cc - table/data_block_hash_index_test.cc - table/full_filter_block_test.cc + table/cuckoo/cuckoo_table_builder_test.cc + table/cuckoo/cuckoo_table_reader_test.cc table/merger_test.cc table/sst_file_reader_test.cc table/table_test.cc diff --git a/Makefile b/Makefile index 16d5da0b1..d41192ab2 100644 --- a/Makefile +++ b/Makefile @@ -1378,13 +1378,13 @@ filename_test: db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS) file_reader_writer_test: util/file_reader_writer_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -block_based_filter_block_test: table/block_based_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) +block_based_filter_block_test: table/block_based/block_based_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -full_filter_block_test: table/full_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) +full_filter_block_test: table/block_based/full_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -partitioned_filter_block_test: table/partitioned_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) +partitioned_filter_block_test: table/block_based/partitioned_filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) log_test: db/log_test.o $(LIBOBJECTS) $(TESTHARNESS) @@ -1396,10 +1396,10 @@ cleanable_test: table/cleanable_test.o $(LIBOBJECTS) $(TESTHARNESS) table_test: table/table_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -block_test: table/block_test.o $(LIBOBJECTS) $(TESTHARNESS) +block_test: table/block_based/block_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -data_block_hash_index_test: table/data_block_hash_index_test.o $(LIBOBJECTS) $(TESTHARNESS) +data_block_hash_index_test: table/block_based/data_block_hash_index_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) inlineskiplist_test: memtable/inlineskiplist_test.o $(LIBOBJECTS) $(TESTHARNESS) @@ -1465,10 +1465,10 @@ rocksdb_dump: tools/dump/rocksdb_dump.o $(LIBOBJECTS) rocksdb_undump: tools/dump/rocksdb_undump.o $(LIBOBJECTS) $(AM_LINK) -cuckoo_table_builder_test: table/cuckoo_table_builder_test.o $(LIBOBJECTS) $(TESTHARNESS) +cuckoo_table_builder_test: table/cuckoo/cuckoo_table_builder_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -cuckoo_table_reader_test: table/cuckoo_table_reader_test.o $(LIBOBJECTS) $(TESTHARNESS) +cuckoo_table_reader_test: table/cuckoo/cuckoo_table_reader_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) cuckoo_table_db_test: db/cuckoo_table_db_test.o $(LIBOBJECTS) $(TESTHARNESS) diff --git a/TARGETS b/TARGETS index c438aa3fb..70d6e2194 100644 --- a/TARGETS +++ b/TARGETS @@ -173,36 +173,36 @@ cpp_library( "options/options_sanity_check.cc", "port/port_posix.cc", "port/stack_trace.cc", - "table/adaptive_table_factory.cc", - "table/block.cc", - "table/block_based_filter_block.cc", - "table/block_based_table_builder.cc", - "table/block_based_table_factory.cc", - "table/block_based_table_reader.cc", - "table/block_builder.cc", + "table/adaptive/adaptive_table_factory.cc", + "table/block_based/block.cc", + "table/block_based/block_based_filter_block.cc", + "table/block_based/block_based_table_builder.cc", + "table/block_based/block_based_table_factory.cc", + "table/block_based/block_based_table_reader.cc", + "table/block_based/block_builder.cc", + "table/block_based/block_prefix_index.cc", + "table/block_based/data_block_hash_index.cc", + "table/block_based/data_block_footer.cc", + "table/block_based/flush_block_policy.cc", + "table/block_based/full_filter_block.cc", + "table/block_based/index_builder.cc", + "table/block_based/partitioned_filter_block.cc", "table/block_fetcher.cc", - "table/block_prefix_index.cc", "table/bloom_block.cc", - "table/cuckoo_table_builder.cc", - "table/cuckoo_table_factory.cc", - "table/cuckoo_table_reader.cc", - "table/data_block_footer.cc", - "table/data_block_hash_index.cc", - "table/flush_block_policy.cc", + "table/cuckoo/cuckoo_table_builder.cc", + "table/cuckoo/cuckoo_table_factory.cc", + "table/cuckoo/cuckoo_table_reader.cc", "table/format.cc", - "table/full_filter_block.cc", "table/get_context.cc", - "table/index_builder.cc", "table/iterator.cc", "table/merging_iterator.cc", "table/meta_blocks.cc", - "table/partitioned_filter_block.cc", "table/persistent_cache_helper.cc", - "table/plain_table_builder.cc", - "table/plain_table_factory.cc", - "table/plain_table_index.cc", - "table/plain_table_key_coding.cc", - "table/plain_table_reader.cc", + "table/plain/plain_table_builder.cc", + "table/plain/plain_table_factory.cc", + "table/plain/plain_table_index.cc", + "table/plain/plain_table_key_coding.cc", + "table/plain/plain_table_reader.cc", "table/sst_file_reader.cc", "table/sst_file_writer.cc", "table/table_properties.cc", @@ -378,12 +378,12 @@ ROCKS_TESTS = [ ], [ "block_based_filter_block_test", - "table/block_based_filter_block_test.cc", + "table/block_based/block_based_filter_block_test.cc", "serial", ], [ "block_test", - "table/block_test.cc", + "table/block_based/block_test.cc", "serial", ], [ @@ -488,7 +488,7 @@ ROCKS_TESTS = [ ], [ "cuckoo_table_builder_test", - "table/cuckoo_table_builder_test.cc", + "table/cuckoo/cuckoo_table_builder_test.cc", "serial", ], [ @@ -498,12 +498,12 @@ ROCKS_TESTS = [ ], [ "cuckoo_table_reader_test", - "table/cuckoo_table_reader_test.cc", + "table/cuckoo/cuckoo_table_reader_test.cc", "serial", ], [ "data_block_hash_index_test", - "table/data_block_hash_index_test.cc", + "table/block_based/data_block_hash_index_test.cc", "serial", ], [ @@ -743,7 +743,7 @@ ROCKS_TESTS = [ ], [ "full_filter_block_test", - "table/full_filter_block_test.cc", + "table/block_based/full_filter_block_test.cc", "serial", ], [ @@ -873,7 +873,7 @@ ROCKS_TESTS = [ ], [ "partitioned_filter_block_test", - "table/partitioned_filter_block_test.cc", + "table/block_based/partitioned_filter_block_test.cc", "serial", ], [ diff --git a/db/builder.cc b/db/builder.cc index 2b97ce1d6..14160f64c 100644 --- a/db/builder.cc +++ b/db/builder.cc @@ -29,7 +29,7 @@ #include "rocksdb/iterator.h" #include "rocksdb/options.h" #include "rocksdb/table.h" -#include "table/block_based_table_builder.h" +#include "table/block_based/block_based_table_builder.h" #include "table/format.h" #include "table/internal_iterator.h" #include "util/file_reader_writer.h" diff --git a/db/column_family.cc b/db/column_family.cc index 325610b88..84f521cd7 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -33,7 +33,7 @@ #include "memtable/hash_skiplist_rep.h" #include "monitoring/thread_status_util.h" #include "options/options_helper.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/merging_iterator.h" #include "util/autovector.h" #include "util/compression.h" diff --git a/db/compaction_job.cc b/db/compaction_job.cc index 9e5d46f87..9e22e161f 100644 --- a/db/compaction_job.cc +++ b/db/compaction_job.cc @@ -49,8 +49,8 @@ #include "rocksdb/statistics.h" #include "rocksdb/status.h" #include "rocksdb/table.h" -#include "table/block.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_factory.h" #include "table/merging_iterator.h" #include "table/table_builder.h" #include "util/coding.h" diff --git a/db/compaction_job_stats_test.cc b/db/compaction_job_stats_test.cc index 91441f5d7..daf413866 100644 --- a/db/compaction_job_stats_test.cc +++ b/db/compaction_job_stats_test.cc @@ -48,9 +48,9 @@ #include "rocksdb/thread_status.h" #include "rocksdb/utilities/checkpoint.h" #include "rocksdb/utilities/write_batch_with_index.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/mock_table.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/scoped_arena_iterator.h" #include "util/compression.h" #include "util/hash.h" diff --git a/db/corruption_test.cc b/db/corruption_test.cc index 379c33e45..130821ff9 100644 --- a/db/corruption_test.cc +++ b/db/corruption_test.cc @@ -25,8 +25,9 @@ #include "rocksdb/env.h" #include "rocksdb/table.h" #include "rocksdb/write_batch.h" -#include "table/block_based_table_builder.h" +#include "table/block_based/block_based_table_builder.h" #include "table/meta_blocks.h" +#include "file/filename.h" #include "util/string_util.h" #include "test_util/testharness.h" #include "test_util/testutil.h" diff --git a/db/cuckoo_table_db_test.cc b/db/cuckoo_table_db_test.cc index ecd6d71ca..f9efbc585 100644 --- a/db/cuckoo_table_db_test.cc +++ b/db/cuckoo_table_db_test.cc @@ -8,8 +8,8 @@ #include "db/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/env.h" -#include "table/cuckoo_table_factory.h" -#include "table/cuckoo_table_reader.h" +#include "table/cuckoo/cuckoo_table_factory.h" +#include "table/cuckoo/cuckoo_table_reader.h" #include "table/meta_blocks.h" #include "util/string_util.h" #include "test_util/testharness.h" diff --git a/db/db_impl.cc b/db/db_impl.cc index 749bd3629..ec162bb96 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -77,8 +77,8 @@ #include "rocksdb/status.h" #include "rocksdb/table.h" #include "rocksdb/write_buffer_manager.h" -#include "table/block.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_factory.h" #include "table/get_context.h" #include "table/merging_iterator.h" #include "table/multiget_context.h" diff --git a/db/db_impl_open.cc b/db/db_impl_open.cc index 0be85031b..db47d1416 100644 --- a/db/db_impl_open.cc +++ b/db/db_impl_open.cc @@ -18,7 +18,7 @@ #include "file/sst_file_manager_impl.h" #include "options/options_helper.h" #include "rocksdb/wal_filter.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "util/rate_limiter.h" #include "test_util/sync_point.h" diff --git a/db/db_iterator_test.cc b/db/db_iterator_test.cc index cc1af2e0a..e2b9f503f 100644 --- a/db/db_iterator_test.cc +++ b/db/db_iterator_test.cc @@ -15,7 +15,7 @@ #include "port/stack_trace.h" #include "rocksdb/iostats_context.h" #include "rocksdb/perf_context.h" -#include "table/flush_block_policy.h" +#include "table/block_based/flush_block_policy.h" namespace rocksdb { diff --git a/db/db_test.cc b/db/db_test.cc index 66df2323d..bf0babd1a 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -54,9 +54,9 @@ #include "rocksdb/utilities/checkpoint.h" #include "rocksdb/utilities/optimistic_transaction_db.h" #include "rocksdb/utilities/write_batch_with_index.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/mock_table.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/scoped_arena_iterator.h" #include "util/compression.h" #include "util/file_reader_writer.h" diff --git a/db/db_test_util.h b/db/db_test_util.h index 3bc107889..1882cde59 100644 --- a/db/db_test_util.h +++ b/db/db_test_util.h @@ -8,6 +8,7 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #pragma once + #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif @@ -41,9 +42,9 @@ #include "rocksdb/statistics.h" #include "rocksdb/table.h" #include "rocksdb/utilities/checkpoint.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/mock_table.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/scoped_arena_iterator.h" #include "util/compression.h" #include "test_util/mock_time_env.h" diff --git a/db/flush_job.cc b/db/flush_job.cc index 4930ecac7..c8729c668 100644 --- a/db/flush_job.cc +++ b/db/flush_job.cc @@ -40,8 +40,8 @@ #include "rocksdb/statistics.h" #include "rocksdb/status.h" #include "rocksdb/table.h" -#include "table/block.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_factory.h" #include "table/merging_iterator.h" #include "table/table_builder.h" #include "table/two_level_iterator.h" diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 57c7427e8..58332f30f 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -23,7 +23,7 @@ #include "db/column_family.h" #include "db/db_impl.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "util/string_util.h" namespace rocksdb { diff --git a/db/listener_test.cc b/db/listener_test.cc index 663116b7b..881534a1f 100644 --- a/db/listener_test.cc +++ b/db/listener_test.cc @@ -22,8 +22,9 @@ #include "rocksdb/slice_transform.h" #include "rocksdb/table.h" #include "rocksdb/table_properties.h" -#include "table/block_based_table_factory.h" -#include "table/plain_table_factory.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/plain/plain_table_factory.h" +#include "file/filename.h" #include "util/hash.h" #include "util/logging.h" #include "util/mutexlock.h" diff --git a/db/plain_table_db_test.cc b/db/plain_table_db_test.cc index 7648ed85f..bfeb54243 100644 --- a/db/plain_table_db_test.cc +++ b/db/plain_table_db_test.cc @@ -25,9 +25,9 @@ #include "rocksdb/table.h" #include "table/bloom_block.h" #include "table/meta_blocks.h" -#include "table/plain_table_factory.h" -#include "table/plain_table_key_coding.h" -#include "table/plain_table_reader.h" +#include "table/plain/plain_table_factory.h" +#include "table/plain/plain_table_key_coding.h" +#include "table/plain/plain_table_reader.h" #include "table/table_builder.h" #include "util/hash.h" #include "util/logging.h" diff --git a/db/table_properties_collector_test.cc b/db/table_properties_collector_test.cc index 6171b2938..0705cc032 100644 --- a/db/table_properties_collector_test.cc +++ b/db/table_properties_collector_test.cc @@ -12,11 +12,12 @@ #include "db/db_impl.h" #include "db/dbformat.h" #include "db/table_properties_collector.h" + +#include "table/meta_blocks.h" #include "options/cf_options.h" #include "rocksdb/table.h" -#include "table/block_based_table_factory.h" -#include "table/meta_blocks.h" -#include "table/plain_table_factory.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/table_builder.h" #include "util/coding.h" #include "util/file_reader_writer.h" diff --git a/db/version_set.cc b/db/version_set.cc index b9616f373..864fc9753 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -45,7 +45,7 @@ #include "table/merging_iterator.h" #include "table/meta_blocks.h" #include "table/multiget_context.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/table_reader.h" #include "table/two_level_iterator.h" #include "util/coding.h" diff --git a/options/options.cc b/options/options.cc index 057727e59..a5037ee78 100644 --- a/options/options.cc +++ b/options/options.cc @@ -31,7 +31,7 @@ #include "rocksdb/table.h" #include "rocksdb/table_properties.h" #include "rocksdb/wal_filter.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "util/compression.h" namespace rocksdb { diff --git a/options/options_helper.cc b/options/options_helper.cc index 82e7a1fa1..0b531a6ec 100644 --- a/options/options_helper.cc +++ b/options/options_helper.cc @@ -9,6 +9,8 @@ #include #include #include + +#include "table/plain/plain_table_factory.h" #include "rocksdb/cache.h" #include "rocksdb/compaction_filter.h" #include "rocksdb/convenience.h" @@ -20,8 +22,7 @@ #include "rocksdb/slice_transform.h" #include "rocksdb/table.h" #include "rocksdb/utilities/object_registry.h" -#include "table/block_based_table_factory.h" -#include "table/plain_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "util/cast_util.h" #include "util/string_util.h" diff --git a/options/options_parser.h b/options/options_parser.h index 5aab3e7e9..b2a806f17 100644 --- a/options/options_parser.h +++ b/options/options_parser.h @@ -12,7 +12,7 @@ #include "options/options_sanity_check.h" #include "rocksdb/env.h" #include "rocksdb/options.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" namespace rocksdb { diff --git a/src.mk b/src.mk index 100b3355e..a0f4043bf 100644 --- a/src.mk +++ b/src.mk @@ -97,36 +97,36 @@ LIB_SOURCES = \ options/options_sanity_check.cc \ port/port_posix.cc \ port/stack_trace.cc \ - table/adaptive_table_factory.cc \ - table/block.cc \ - table/block_based_filter_block.cc \ - table/block_based_table_builder.cc \ - table/block_based_table_factory.cc \ - table/block_based_table_reader.cc \ - table/block_builder.cc \ - table/block_fetcher.cc \ - table/block_prefix_index.cc \ - table/bloom_block.cc \ - table/cuckoo_table_builder.cc \ - table/cuckoo_table_factory.cc \ - table/cuckoo_table_reader.cc \ - table/data_block_hash_index.cc \ - table/data_block_footer.cc \ - table/flush_block_policy.cc \ + table/adaptive/adaptive_table_factory.cc \ + table/block_based/block.cc \ + table/block_based/block_based_filter_block.cc \ + table/block_based/block_based_table_builder.cc \ + table/block_based/block_based_table_factory.cc \ + table/block_based/block_based_table_reader.cc \ + table/block_based/block_builder.cc \ + table/block_based/block_prefix_index.cc \ + table/block_based/data_block_hash_index.cc \ + table/block_based/data_block_footer.cc \ + table/block_based/flush_block_policy.cc \ + table/block_based/full_filter_block.cc \ + table/block_based/index_builder.cc \ + table/block_based/partitioned_filter_block.cc \ + table/block_fetcher.cc \ + table/bloom_block.cc \ + table/cuckoo/cuckoo_table_builder.cc \ + table/cuckoo/cuckoo_table_factory.cc \ + table/cuckoo/cuckoo_table_reader.cc \ table/format.cc \ - table/full_filter_block.cc \ table/get_context.cc \ - table/index_builder.cc \ table/iterator.cc \ table/merging_iterator.cc \ table/meta_blocks.cc \ - table/partitioned_filter_block.cc \ table/persistent_cache_helper.cc \ - table/plain_table_builder.cc \ - table/plain_table_factory.cc \ - table/plain_table_index.cc \ - table/plain_table_key_coding.cc \ - table/plain_table_reader.cc \ + table/plain/plain_table_builder.cc \ + table/plain/plain_table_factory.cc \ + table/plain/plain_table_index.cc \ + table/plain/plain_table_key_coding.cc \ + table/plain/plain_table_reader.cc \ table/sst_file_reader.cc \ table/sst_file_writer.cc \ table/table_properties.cc \ @@ -319,7 +319,6 @@ MAIN_SOURCES = \ db/obsolete_files_test.cc \ db/options_settable_test.cc \ db/options_file_test.cc \ - db/partitioned_filter_block_test.cc \ db/perf_context_test.cc \ db/persistent_cache_test.cc \ db/plain_table_db_test.cc \ @@ -348,13 +347,14 @@ MAIN_SOURCES = \ monitoring/iostats_context_test.cc \ monitoring/statistics_test.cc \ options/options_test.cc \ - table/block_based_filter_block_test.cc \ - table/block_test.cc \ + table/block_based/block_based_filter_block_test.cc \ + table/block_based/block_test.cc \ + table/block_based/data_block_hash_index_test.cc \ + table/block_based/full_filter_block_test.cc \ + table/block_based/partitioned_filter_block_test.cc \ table/cleanable_test.cc \ - table/cuckoo_table_builder_test.cc \ - table/cuckoo_table_reader_test.cc \ - table/data_block_hash_index_test.cc \ - table/full_filter_block_test.cc \ + table/cuckoo/cuckoo_table_builder_test.cc \ + table/cuckoo/cuckoo_table_reader_test.cc \ table/merger_test.cc \ table/sst_file_reader_test.cc \ table/table_reader_bench.cc \ diff --git a/table/adaptive_table_factory.cc b/table/adaptive/adaptive_table_factory.cc similarity index 98% rename from table/adaptive_table_factory.cc rename to table/adaptive/adaptive_table_factory.cc index d5dcbc5f5..0086368a9 100644 --- a/table/adaptive_table_factory.cc +++ b/table/adaptive/adaptive_table_factory.cc @@ -4,7 +4,7 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #ifndef ROCKSDB_LITE -#include "table/adaptive_table_factory.h" +#include "table/adaptive/adaptive_table_factory.h" #include "table/table_builder.h" #include "table/format.h" diff --git a/table/adaptive_table_factory.h b/table/adaptive/adaptive_table_factory.h similarity index 100% rename from table/adaptive_table_factory.h rename to table/adaptive/adaptive_table_factory.h diff --git a/table/block.cc b/table/block_based/block.cc similarity index 99% rename from table/block.cc rename to table/block_based/block.cc index a6cc8d270..dfc4aa3c6 100644 --- a/table/block.cc +++ b/table/block_based/block.cc @@ -9,7 +9,7 @@ // // Decodes the blocks generated by block_builder.cc. -#include "table/block.h" +#include "table/block_based/block.h" #include #include #include @@ -19,8 +19,8 @@ #include "port/port.h" #include "port/stack_trace.h" #include "rocksdb/comparator.h" -#include "table/block_prefix_index.h" -#include "table/data_block_footer.h" +#include "table/block_based/block_prefix_index.h" +#include "table/block_based/data_block_footer.h" #include "table/format.h" #include "util/coding.h" #include "util/logging.h" diff --git a/table/block.h b/table/block_based/block.h similarity index 99% rename from table/block.h rename to table/block_based/block.h index 869d2f1f2..8bf6f5356 100644 --- a/table/block.h +++ b/table/block_based/block.h @@ -22,13 +22,13 @@ #include "db/dbformat.h" #include "db/pinned_iterators_manager.h" -#include "format.h" +#include "table/format.h" #include "rocksdb/iterator.h" #include "rocksdb/options.h" #include "rocksdb/statistics.h" #include "rocksdb/table.h" -#include "table/block_prefix_index.h" -#include "table/data_block_hash_index.h" +#include "table/block_based/block_prefix_index.h" +#include "table/block_based/data_block_hash_index.h" #include "table/internal_iterator.h" #include "util/random.h" #include "test_util/sync_point.h" diff --git a/table/block_based_filter_block.cc b/table/block_based/block_based_filter_block.cc similarity index 99% rename from table/block_based_filter_block.cc rename to table/block_based/block_based_filter_block.cc index 81087b243..fb366b5d3 100644 --- a/table/block_based_filter_block.cc +++ b/table/block_based/block_based_filter_block.cc @@ -7,7 +7,7 @@ // 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 "table/block_based_filter_block.h" +#include "table/block_based/block_based_filter_block.h" #include #include "db/dbformat.h" diff --git a/table/block_based_filter_block.h b/table/block_based/block_based_filter_block.h similarity index 99% rename from table/block_based_filter_block.h rename to table/block_based/block_based_filter_block.h index d1ff58546..74a2285e1 100644 --- a/table/block_based_filter_block.h +++ b/table/block_based/block_based_filter_block.h @@ -18,10 +18,11 @@ #include #include #include + #include "rocksdb/options.h" #include "rocksdb/slice.h" #include "rocksdb/slice_transform.h" -#include "table/filter_block.h" +#include "table/block_based/filter_block.h" #include "util/hash.h" namespace rocksdb { diff --git a/table/block_based_filter_block_test.cc b/table/block_based/block_based_filter_block_test.cc similarity index 99% rename from table/block_based_filter_block_test.cc rename to table/block_based/block_based_filter_block_test.cc index 2cb3abc27..8d074275c 100644 --- a/table/block_based_filter_block_test.cc +++ b/table/block_based/block_based_filter_block_test.cc @@ -7,7 +7,7 @@ // 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 "table/block_based_filter_block.h" +#include "table/block_based/block_based_filter_block.h" #include "rocksdb/filter_policy.h" #include "util/coding.h" diff --git a/table/block_based_table_builder.cc b/table/block_based/block_based_table_builder.cc similarity index 98% rename from table/block_based_table_builder.cc rename to table/block_based/block_based_table_builder.cc index 9a1742e5f..034c6b238 100644 --- a/table/block_based_table_builder.cc +++ b/table/block_based/block_based_table_builder.cc @@ -7,7 +7,7 @@ // 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 "table/block_based_table_builder.h" +#include "table/block_based/block_based_table_builder.h" #include #include @@ -20,6 +20,7 @@ #include #include "db/dbformat.h" +#include "index_builder.h" #include "rocksdb/cache.h" #include "rocksdb/comparator.h" @@ -29,14 +30,15 @@ #include "rocksdb/merge_operator.h" #include "rocksdb/table.h" -#include "table/block.h" -#include "table/block_based_filter_block.h" -#include "table/block_based_table_factory.h" -#include "table/block_based_table_reader.h" -#include "table/block_builder.h" -#include "table/filter_block.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_based_table_reader.h" +#include "table/block_based/block_based_filter_block.h" +#include "table/block_based/block_builder.h" +#include "table/block_based/filter_block.h" +#include "table/block_based/full_filter_block.h" +#include "table/block_based/partitioned_filter_block.h" #include "table/format.h" -#include "table/full_filter_block.h" #include "table/table_builder.h" #include "util/coding.h" @@ -47,8 +49,6 @@ #include "util/string_util.h" #include "util/xxhash.h" -#include "table/index_builder.h" -#include "table/partitioned_filter_block.h" namespace rocksdb { diff --git a/table/block_based_table_builder.h b/table/block_based/block_based_table_builder.h similarity index 100% rename from table/block_based_table_builder.h rename to table/block_based/block_based_table_builder.h index a1ef38891..0c580b445 100644 --- a/table/block_based_table_builder.h +++ b/table/block_based/block_based_table_builder.h @@ -14,11 +14,11 @@ #include #include +#include "table/meta_blocks.h" #include "rocksdb/flush_block_policy.h" #include "rocksdb/listener.h" #include "rocksdb/options.h" #include "rocksdb/status.h" -#include "table/meta_blocks.h" #include "table/table_builder.h" #include "util/compression.h" diff --git a/table/block_based_table_factory.cc b/table/block_based/block_based_table_factory.cc similarity index 99% rename from table/block_based_table_factory.cc rename to table/block_based/block_based_table_factory.cc index 790a2c99e..609679394 100644 --- a/table/block_based_table_factory.cc +++ b/table/block_based/block_based_table_factory.cc @@ -7,7 +7,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 "table/block_based_table_factory.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -24,8 +23,9 @@ #include "rocksdb/cache.h" #include "rocksdb/convenience.h" #include "rocksdb/flush_block_policy.h" -#include "table/block_based_table_builder.h" -#include "table/block_based_table_reader.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_based_table_builder.h" +#include "table/block_based/block_based_table_reader.h" #include "table/format.h" #include "util/mutexlock.h" #include "util/string_util.h" diff --git a/table/block_based_table_factory.h b/table/block_based/block_based_table_factory.h similarity index 100% rename from table/block_based_table_factory.h rename to table/block_based/block_based_table_factory.h diff --git a/table/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc similarity index 99% rename from table/block_based_table_reader.cc rename to table/block_based/block_based_table_reader.cc index 82f964926..725ecdb4e 100644 --- a/table/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -6,7 +6,7 @@ // 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 "table/block_based_table_reader.h" +#include "table/block_based/block_based_table_reader.h" #include #include @@ -15,6 +15,8 @@ #include #include +#include "table/block_fetcher.h" +#include "table/meta_blocks.h" #include "db/dbformat.h" #include "db/pinned_iterators_manager.h" @@ -27,20 +29,17 @@ #include "rocksdb/statistics.h" #include "rocksdb/table.h" #include "rocksdb/table_properties.h" - -#include "table/block.h" -#include "table/block_based_filter_block.h" -#include "table/block_based_table_factory.h" -#include "table/block_fetcher.h" -#include "table/block_prefix_index.h" -#include "table/filter_block.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_filter_block.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_prefix_index.h" +#include "table/block_based/filter_block.h" +#include "table/block_based/full_filter_block.h" +#include "table/block_based/partitioned_filter_block.h" #include "table/format.h" -#include "table/full_filter_block.h" #include "table/get_context.h" #include "table/internal_iterator.h" -#include "table/meta_blocks.h" #include "table/multiget_context.h" -#include "table/partitioned_filter_block.h" #include "table/persistent_cache_helper.h" #include "table/sst_file_writer_collectors.h" #include "table/two_level_iterator.h" diff --git a/table/block_based_table_reader.h b/table/block_based/block_based_table_reader.h similarity index 99% rename from table/block_based_table_reader.h rename to table/block_based/block_based_table_reader.h index 54ce34d61..6d265ba75 100644 --- a/table/block_based_table_reader.h +++ b/table/block_based/block_based_table_reader.h @@ -23,10 +23,10 @@ #include "rocksdb/statistics.h" #include "rocksdb/status.h" #include "rocksdb/table.h" -#include "table/block.h" -#include "table/block_based_table_factory.h" -#include "table/cachable_entry.h" -#include "table/filter_block.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/cachable_entry.h" +#include "table/block_based/filter_block.h" #include "table/format.h" #include "table/get_context.h" #include "table/multiget_context.h" diff --git a/table/block_builder.cc b/table/block_based/block_builder.cc similarity index 98% rename from table/block_builder.cc rename to table/block_based/block_builder.cc index c14b4f6d3..a6a240c8e 100644 --- a/table/block_builder.cc +++ b/table/block_based/block_builder.cc @@ -31,13 +31,13 @@ // num_restarts: uint32 // restarts[i] contains the offset within the block of the ith restart point. -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include #include #include "db/dbformat.h" #include "rocksdb/comparator.h" -#include "table/data_block_footer.h" +#include "table/block_based/data_block_footer.h" #include "util/coding.h" namespace rocksdb { diff --git a/table/block_builder.h b/table/block_based/block_builder.h similarity index 98% rename from table/block_builder.h rename to table/block_based/block_builder.h index 0576279f5..153e57569 100644 --- a/table/block_builder.h +++ b/table/block_based/block_builder.h @@ -13,7 +13,7 @@ #include #include "rocksdb/slice.h" #include "rocksdb/table.h" -#include "table/data_block_hash_index.h" +#include "table/block_based/data_block_hash_index.h" namespace rocksdb { diff --git a/table/block_prefix_index.cc b/table/block_based/block_prefix_index.cc similarity index 99% rename from table/block_prefix_index.cc rename to table/block_based/block_prefix_index.cc index 67c749d4c..0050f1f1e 100644 --- a/table/block_prefix_index.cc +++ b/table/block_based/block_prefix_index.cc @@ -3,7 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "table/block_prefix_index.h" +#include "table/block_based/block_prefix_index.h" #include diff --git a/table/block_prefix_index.h b/table/block_based/block_prefix_index.h similarity index 100% rename from table/block_prefix_index.h rename to table/block_based/block_prefix_index.h diff --git a/table/block_test.cc b/table/block_based/block_test.cc similarity index 99% rename from table/block_test.cc rename to table/block_based/block_test.cc index d359b4e59..a4c567888 100644 --- a/table/block_test.cc +++ b/table/block_based/block_test.cc @@ -3,6 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // + #include #include #include @@ -19,8 +20,8 @@ #include "rocksdb/iterator.h" #include "rocksdb/slice_transform.h" #include "rocksdb/table.h" -#include "table/block.h" -#include "table/block_builder.h" +#include "table/block_based/block.h" +#include "table/block_based/block_builder.h" #include "table/format.h" #include "util/random.h" #include "test_util/testharness.h" diff --git a/table/cachable_entry.h b/table/block_based/cachable_entry.h similarity index 100% rename from table/cachable_entry.h rename to table/block_based/cachable_entry.h diff --git a/table/data_block_footer.cc b/table/block_based/data_block_footer.cc similarity index 97% rename from table/data_block_footer.cc rename to table/block_based/data_block_footer.cc index cb9e14381..2cf31b4c5 100644 --- a/table/data_block_footer.cc +++ b/table/block_based/data_block_footer.cc @@ -7,7 +7,7 @@ // 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 "data_block_footer.h" +#include "table/block_based/data_block_footer.h" #include "rocksdb/table.h" diff --git a/table/data_block_footer.h b/table/block_based/data_block_footer.h similarity index 100% rename from table/data_block_footer.h rename to table/block_based/data_block_footer.h diff --git a/table/data_block_hash_index.cc b/table/block_based/data_block_hash_index.cc similarity index 98% rename from table/data_block_hash_index.cc rename to table/block_based/data_block_hash_index.cc index adb1d7b8c..7737a9491 100644 --- a/table/data_block_hash_index.cc +++ b/table/block_based/data_block_hash_index.cc @@ -6,7 +6,7 @@ #include #include "rocksdb/slice.h" -#include "table/data_block_hash_index.h" +#include "table/block_based/data_block_hash_index.h" #include "util/coding.h" #include "util/hash.h" diff --git a/table/data_block_hash_index.h b/table/block_based/data_block_hash_index.h similarity index 100% rename from table/data_block_hash_index.h rename to table/block_based/data_block_hash_index.h diff --git a/table/data_block_hash_index_test.cc b/table/block_based/data_block_hash_index_test.cc similarity index 99% rename from table/data_block_hash_index_test.cc rename to table/block_based/data_block_hash_index_test.cc index 0511b257a..204e92ecb 100644 --- a/table/data_block_hash_index_test.cc +++ b/table/block_based/data_block_hash_index_test.cc @@ -3,16 +3,17 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). + #include #include #include #include "db/table_properties_collector.h" #include "rocksdb/slice.h" -#include "table/block.h" -#include "table/block_based_table_reader.h" -#include "table/block_builder.h" -#include "table/data_block_hash_index.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_reader.h" +#include "table/block_based/block_builder.h" +#include "table/block_based/data_block_hash_index.h" #include "table/get_context.h" #include "table/table_builder.h" #include "test_util/testharness.h" diff --git a/table/filter_block.h b/table/block_based/filter_block.h similarity index 99% rename from table/filter_block.h rename to table/block_based/filter_block.h index 8abb88e5f..8b01214c7 100644 --- a/table/filter_block.h +++ b/table/block_based/filter_block.h @@ -24,7 +24,7 @@ #include #include #include "db/dbformat.h" -#include "format.h" +#include "table/format.h" #include "rocksdb/options.h" #include "rocksdb/slice.h" #include "rocksdb/slice_transform.h" diff --git a/table/flush_block_policy.cc b/table/block_based/flush_block_policy.cc similarity index 98% rename from table/flush_block_policy.cc rename to table/block_based/flush_block_policy.cc index 1b1675828..31576848c 100644 --- a/table/flush_block_policy.cc +++ b/table/block_based/flush_block_policy.cc @@ -6,7 +6,7 @@ #include "rocksdb/flush_block_policy.h" #include "rocksdb/options.h" #include "rocksdb/slice.h" -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include "table/format.h" #include diff --git a/table/flush_block_policy.h b/table/block_based/flush_block_policy.h similarity index 100% rename from table/flush_block_policy.h rename to table/block_based/flush_block_policy.h diff --git a/table/full_filter_block.cc b/table/block_based/full_filter_block.cc similarity index 99% rename from table/full_filter_block.cc rename to table/block_based/full_filter_block.cc index 9015e96d2..56dc74c67 100644 --- a/table/full_filter_block.cc +++ b/table/block_based/full_filter_block.cc @@ -3,7 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "table/full_filter_block.h" +#include "table/block_based/full_filter_block.h" #ifdef ROCKSDB_MALLOC_USABLE_SIZE #ifdef OS_FREEBSD diff --git a/table/full_filter_block.h b/table/block_based/full_filter_block.h similarity index 99% rename from table/full_filter_block.h rename to table/block_based/full_filter_block.h index f97952a7c..3e5d82733 100644 --- a/table/full_filter_block.h +++ b/table/block_based/full_filter_block.h @@ -10,12 +10,13 @@ #include #include #include + #include "rocksdb/options.h" #include "rocksdb/slice.h" #include "rocksdb/slice_transform.h" #include "db/dbformat.h" #include "util/hash.h" -#include "table/filter_block.h" +#include "table/block_based/filter_block.h" namespace rocksdb { diff --git a/table/full_filter_block_test.cc b/table/block_based/full_filter_block_test.cc similarity index 99% rename from table/full_filter_block_test.cc rename to table/block_based/full_filter_block_test.cc index 0ef5c5a97..8b99f54b0 100644 --- a/table/full_filter_block_test.cc +++ b/table/block_based/full_filter_block_test.cc @@ -3,7 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "table/full_filter_block.h" +#include "table/block_based/full_filter_block.h" #include "rocksdb/filter_policy.h" #include "table/full_filter_bits_builder.h" diff --git a/table/index_builder.cc b/table/block_based/index_builder.cc similarity index 98% rename from table/index_builder.cc rename to table/block_based/index_builder.cc index 63cb80598..f11ecd4f4 100644 --- a/table/index_builder.cc +++ b/table/block_based/index_builder.cc @@ -7,7 +7,8 @@ // 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 "table/index_builder.h" +#include "table/block_based/index_builder.h" + #include #include @@ -17,7 +18,7 @@ #include "rocksdb/comparator.h" #include "rocksdb/flush_block_policy.h" #include "table/format.h" -#include "table/partitioned_filter_block.h" +#include "table/block_based/partitioned_filter_block.h" // Without anonymous namespace here, we fail the warning -Wmissing-prototypes namespace rocksdb { diff --git a/table/index_builder.h b/table/block_based/index_builder.h similarity index 99% rename from table/index_builder.h rename to table/block_based/index_builder.h index 2f349fc54..7e6a4bb07 100644 --- a/table/index_builder.h +++ b/table/block_based/index_builder.h @@ -17,8 +17,8 @@ #include #include "rocksdb/comparator.h" -#include "table/block_based_table_factory.h" -#include "table/block_builder.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_builder.h" #include "table/format.h" namespace rocksdb { diff --git a/table/partitioned_filter_block.cc b/table/block_based/partitioned_filter_block.cc similarity index 98% rename from table/partitioned_filter_block.cc rename to table/block_based/partitioned_filter_block.cc index 3ccc79463..315e63306 100644 --- a/table/partitioned_filter_block.cc +++ b/table/block_based/partitioned_filter_block.cc @@ -3,7 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "table/partitioned_filter_block.h" +#include "table/block_based/partitioned_filter_block.h" #ifdef ROCKSDB_MALLOC_USABLE_SIZE #ifdef OS_FREEBSD @@ -17,8 +17,8 @@ #include "monitoring/perf_context_imp.h" #include "port/port.h" #include "rocksdb/filter_policy.h" -#include "table/block.h" -#include "table/block_based_table_reader.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_reader.h" #include "util/coding.h" namespace rocksdb { diff --git a/table/partitioned_filter_block.h b/table/block_based/partitioned_filter_block.h similarity index 95% rename from table/partitioned_filter_block.h rename to table/block_based/partitioned_filter_block.h index 2563dd2bf..735f1c6e3 100644 --- a/table/partitioned_filter_block.h +++ b/table/block_based/partitioned_filter_block.h @@ -9,15 +9,14 @@ #include #include #include "db/dbformat.h" +#include "index_builder.h" #include "rocksdb/options.h" #include "rocksdb/slice.h" #include "rocksdb/slice_transform.h" - -#include "table/block.h" -#include "table/block_based_table_reader.h" -#include "table/cachable_entry.h" -#include "table/full_filter_block.h" -#include "table/index_builder.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_reader.h" +#include "table/block_based/full_filter_block.h" +#include "table/block_based/cachable_entry.h" #include "util/autovector.h" namespace rocksdb { diff --git a/table/partitioned_filter_block_test.cc b/table/block_based/partitioned_filter_block_test.cc similarity index 99% rename from table/partitioned_filter_block_test.cc rename to table/block_based/partitioned_filter_block_test.cc index 4bdc2fd36..2bcafa977 100644 --- a/table/partitioned_filter_block_test.cc +++ b/table/block_based/partitioned_filter_block_test.cc @@ -3,13 +3,15 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). + #include #include "rocksdb/filter_policy.h" #include "table/full_filter_bits_builder.h" -#include "table/index_builder.h" -#include "table/partitioned_filter_block.h" +#include "table/block_based/partitioned_filter_block.h" + +#include "index_builder.h" #include "util/coding.h" #include "util/hash.h" #include "util/logging.h" @@ -96,7 +98,7 @@ class PartitionedFilterBlockTest partition_size * table_options_.block_size_deviation / 100; } - int last_offset = 10; + uint64_t last_offset = 10; BlockHandle Write(const Slice& slice) { BlockHandle bh(last_offset + 1, slice.size()); slices[bh.offset()] = slice; diff --git a/table/block_fetcher.cc b/table/block_fetcher.cc index 1f209210c..6c6637029 100644 --- a/table/block_fetcher.cc +++ b/table/block_fetcher.cc @@ -15,8 +15,8 @@ #include "monitoring/perf_context_imp.h" #include "monitoring/statistics.h" #include "rocksdb/env.h" -#include "table/block.h" -#include "table/block_based_table_reader.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_reader.h" #include "table/format.h" #include "table/persistent_cache_helper.h" #include "util/coding.h" diff --git a/table/block_fetcher.h b/table/block_fetcher.h index 0dcdfc761..56b74b504 100644 --- a/table/block_fetcher.h +++ b/table/block_fetcher.h @@ -8,7 +8,7 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #pragma once -#include "table/block.h" +#include "table/block_based/block.h" #include "table/format.h" #include "util/memory_allocator.h" diff --git a/table/cuckoo_table_builder.cc b/table/cuckoo/cuckoo_table_builder.cc similarity index 99% rename from table/cuckoo_table_builder.cc rename to table/cuckoo/cuckoo_table_builder.cc index f590e6ad4..f1a64cb6a 100644 --- a/table/cuckoo_table_builder.cc +++ b/table/cuckoo/cuckoo_table_builder.cc @@ -4,7 +4,7 @@ // (found in the LICENSE.Apache file in the root directory). #ifndef ROCKSDB_LITE -#include "table/cuckoo_table_builder.h" +#include "table/cuckoo/cuckoo_table_builder.h" #include #include @@ -15,8 +15,8 @@ #include "db/dbformat.h" #include "rocksdb/env.h" #include "rocksdb/table.h" -#include "table/block_builder.h" -#include "table/cuckoo_table_factory.h" +#include "table/block_based/block_builder.h" +#include "table/cuckoo/cuckoo_table_factory.h" #include "table/format.h" #include "table/meta_blocks.h" #include "util/autovector.h" diff --git a/table/cuckoo_table_builder.h b/table/cuckoo/cuckoo_table_builder.h similarity index 100% rename from table/cuckoo_table_builder.h rename to table/cuckoo/cuckoo_table_builder.h diff --git a/table/cuckoo_table_builder_test.cc b/table/cuckoo/cuckoo_table_builder_test.cc similarity index 99% rename from table/cuckoo_table_builder_test.cc rename to table/cuckoo/cuckoo_table_builder_test.cc index eeba94805..1467e2a8d 100644 --- a/table/cuckoo_table_builder_test.cc +++ b/table/cuckoo/cuckoo_table_builder_test.cc @@ -11,7 +11,7 @@ #include #include "table/meta_blocks.h" -#include "table/cuckoo_table_builder.h" +#include "table/cuckoo/cuckoo_table_builder.h" #include "util/file_reader_writer.h" #include "test_util/testharness.h" #include "test_util/testutil.h" diff --git a/table/cuckoo_table_factory.cc b/table/cuckoo/cuckoo_table_factory.cc similarity index 94% rename from table/cuckoo_table_factory.cc rename to table/cuckoo/cuckoo_table_factory.cc index 74d18d512..4ca29f364 100644 --- a/table/cuckoo_table_factory.cc +++ b/table/cuckoo/cuckoo_table_factory.cc @@ -4,11 +4,11 @@ // (found in the LICENSE.Apache file in the root directory). #ifndef ROCKSDB_LITE -#include "table/cuckoo_table_factory.h" +#include "table/cuckoo/cuckoo_table_factory.h" #include "db/dbformat.h" -#include "table/cuckoo_table_builder.h" -#include "table/cuckoo_table_reader.h" +#include "table/cuckoo/cuckoo_table_builder.h" +#include "table/cuckoo/cuckoo_table_reader.h" namespace rocksdb { diff --git a/table/cuckoo_table_factory.h b/table/cuckoo/cuckoo_table_factory.h similarity index 100% rename from table/cuckoo_table_factory.h rename to table/cuckoo/cuckoo_table_factory.h diff --git a/table/cuckoo_table_reader.cc b/table/cuckoo/cuckoo_table_reader.cc similarity index 99% rename from table/cuckoo_table_reader.cc rename to table/cuckoo/cuckoo_table_reader.cc index f4df2467f..72885be94 100644 --- a/table/cuckoo_table_reader.cc +++ b/table/cuckoo/cuckoo_table_reader.cc @@ -8,7 +8,7 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #ifndef ROCKSDB_LITE -#include "table/cuckoo_table_reader.h" +#include "table/cuckoo/cuckoo_table_reader.h" #include #include @@ -19,7 +19,7 @@ #include "rocksdb/table.h" #include "table/internal_iterator.h" #include "table/meta_blocks.h" -#include "table/cuckoo_table_factory.h" +#include "table/cuckoo/cuckoo_table_factory.h" #include "table/get_context.h" #include "util/arena.h" #include "util/coding.h" diff --git a/table/cuckoo_table_reader.h b/table/cuckoo/cuckoo_table_reader.h similarity index 100% rename from table/cuckoo_table_reader.h rename to table/cuckoo/cuckoo_table_reader.h diff --git a/table/cuckoo_table_reader_test.cc b/table/cuckoo/cuckoo_table_reader_test.cc similarity index 99% rename from table/cuckoo_table_reader_test.cc rename to table/cuckoo/cuckoo_table_reader_test.cc index 6d596f6e1..71e231336 100644 --- a/table/cuckoo_table_reader_test.cc +++ b/table/cuckoo/cuckoo_table_reader_test.cc @@ -22,9 +22,9 @@ int main() { #include #include -#include "table/cuckoo_table_builder.h" -#include "table/cuckoo_table_factory.h" -#include "table/cuckoo_table_reader.h" +#include "table/cuckoo/cuckoo_table_builder.h" +#include "table/cuckoo/cuckoo_table_factory.h" +#include "table/cuckoo/cuckoo_table_reader.h" #include "table/get_context.h" #include "table/meta_blocks.h" #include "util/arena.h" diff --git a/table/format.cc b/table/format.cc index 476db85f7..1adcce6f3 100644 --- a/table/format.cc +++ b/table/format.cc @@ -12,12 +12,12 @@ #include #include +#include "block_fetcher.h" #include "monitoring/perf_context_imp.h" #include "monitoring/statistics.h" #include "rocksdb/env.h" -#include "table/block.h" -#include "table/block_based_table_reader.h" -#include "table/block_fetcher.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_reader.h" #include "table/persistent_cache_helper.h" #include "util/coding.h" #include "util/compression.h" diff --git a/table/get_context.h b/table/get_context.h index 856e01a95..8df343b36 100644 --- a/table/get_context.h +++ b/table/get_context.h @@ -11,7 +11,7 @@ #include "rocksdb/env.h" #include "rocksdb/statistics.h" #include "rocksdb/types.h" -#include "table/block.h" +#include "table/block_based/block.h" namespace rocksdb { class MergeContext; diff --git a/table/meta_blocks.cc b/table/meta_blocks.cc index 98e05a4d0..9d56c5b9c 100644 --- a/table/meta_blocks.cc +++ b/table/meta_blocks.cc @@ -7,11 +7,11 @@ #include #include +#include "block_fetcher.h" #include "db/table_properties_collector.h" #include "rocksdb/table.h" #include "rocksdb/table_properties.h" -#include "table/block.h" -#include "table/block_fetcher.h" +#include "table/block_based/block.h" #include "table/format.h" #include "table/internal_iterator.h" #include "table/persistent_cache_helper.h" diff --git a/table/meta_blocks.h b/table/meta_blocks.h index 6efd1225e..5224c5471 100644 --- a/table/meta_blocks.h +++ b/table/meta_blocks.h @@ -15,7 +15,7 @@ #include "rocksdb/memory_allocator.h" #include "rocksdb/options.h" #include "rocksdb/slice.h" -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include "table/format.h" #include "util/kv_map.h" diff --git a/table/persistent_cache_helper.cc b/table/persistent_cache_helper.cc index 4e90697a6..8431f13db 100644 --- a/table/persistent_cache_helper.cc +++ b/table/persistent_cache_helper.cc @@ -4,7 +4,7 @@ // (found in the LICENSE.Apache file in the root directory). #include "table/persistent_cache_helper.h" -#include "table/block_based_table_reader.h" +#include "table/block_based/block_based_table_reader.h" #include "table/format.h" namespace rocksdb { diff --git a/table/plain_table_builder.cc b/table/plain/plain_table_builder.cc similarity index 98% rename from table/plain_table_builder.cc rename to table/plain/plain_table_builder.cc index 453b6c768..6160d7afd 100644 --- a/table/plain_table_builder.cc +++ b/table/plain/plain_table_builder.cc @@ -4,7 +4,7 @@ // (found in the LICENSE.Apache file in the root directory). #ifndef ROCKSDB_LITE -#include "table/plain_table_builder.h" +#include "table/plain/plain_table_builder.h" #include @@ -17,11 +17,11 @@ #include "rocksdb/filter_policy.h" #include "rocksdb/options.h" #include "rocksdb/table.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "db/dbformat.h" -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include "table/bloom_block.h" -#include "table/plain_table_index.h" +#include "table/plain/plain_table_index.h" #include "table/format.h" #include "table/meta_blocks.h" #include "util/coding.h" diff --git a/table/plain_table_builder.h b/table/plain/plain_table_builder.h similarity index 98% rename from table/plain_table_builder.h rename to table/plain/plain_table_builder.h index 9a5b44b9c..0a29098d6 100644 --- a/table/plain_table_builder.h +++ b/table/plain/plain_table_builder.h @@ -4,6 +4,7 @@ // (found in the LICENSE.Apache file in the root directory). #pragma once + #ifndef ROCKSDB_LITE #include #include @@ -13,8 +14,8 @@ #include "rocksdb/table.h" #include "rocksdb/table_properties.h" #include "table/bloom_block.h" -#include "table/plain_table_index.h" -#include "table/plain_table_key_coding.h" +#include "table/plain/plain_table_index.h" +#include "table/plain/plain_table_key_coding.h" #include "table/table_builder.h" namespace rocksdb { diff --git a/table/plain_table_factory.cc b/table/plain/plain_table_factory.cc similarity index 98% rename from table/plain_table_factory.cc rename to table/plain/plain_table_factory.cc index 0dccec552..6c6905dab 100644 --- a/table/plain_table_factory.cc +++ b/table/plain/plain_table_factory.cc @@ -4,7 +4,7 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #ifndef ROCKSDB_LITE -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include #include @@ -12,8 +12,8 @@ #include "options/options_helper.h" #include "port/port.h" #include "rocksdb/convenience.h" -#include "table/plain_table_builder.h" -#include "table/plain_table_reader.h" +#include "table/plain/plain_table_builder.h" +#include "table/plain/plain_table_reader.h" #include "util/string_util.h" namespace rocksdb { diff --git a/table/plain_table_factory.h b/table/plain/plain_table_factory.h similarity index 100% rename from table/plain_table_factory.h rename to table/plain/plain_table_factory.h diff --git a/table/plain_table_index.cc b/table/plain/plain_table_index.cc similarity index 99% rename from table/plain_table_index.cc rename to table/plain/plain_table_index.cc index 437409239..196be22cf 100644 --- a/table/plain_table_index.cc +++ b/table/plain/plain_table_index.cc @@ -11,7 +11,7 @@ #include -#include "table/plain_table_index.h" +#include "table/plain/plain_table_index.h" #include "util/coding.h" #include "util/hash.h" diff --git a/table/plain_table_index.h b/table/plain/plain_table_index.h similarity index 100% rename from table/plain_table_index.h rename to table/plain/plain_table_index.h diff --git a/table/plain_table_key_coding.cc b/table/plain/plain_table_key_coding.cc similarity index 99% rename from table/plain_table_key_coding.cc rename to table/plain/plain_table_key_coding.cc index 6f5ee9b4a..9c4b614b5 100644 --- a/table/plain_table_key_coding.cc +++ b/table/plain/plain_table_key_coding.cc @@ -4,13 +4,13 @@ // (found in the LICENSE.Apache file in the root directory). #ifndef ROCKSDB_LITE -#include "table/plain_table_key_coding.h" +#include "table/plain/plain_table_key_coding.h" #include #include #include "db/dbformat.h" -#include "table/plain_table_reader.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_reader.h" +#include "table/plain/plain_table_factory.h" #include "util/file_reader_writer.h" namespace rocksdb { diff --git a/table/plain_table_key_coding.h b/table/plain/plain_table_key_coding.h similarity index 99% rename from table/plain_table_key_coding.h rename to table/plain/plain_table_key_coding.h index 93f8f7af4..26af3f6d8 100644 --- a/table/plain_table_key_coding.h +++ b/table/plain/plain_table_key_coding.h @@ -4,12 +4,13 @@ // (found in the LICENSE.Apache file in the root directory). #pragma once + #ifndef ROCKSDB_LITE #include #include "rocksdb/slice.h" #include "db/dbformat.h" -#include "table/plain_table_reader.h" +#include "table/plain/plain_table_reader.h" // The file contains three helper classes of PlainTable format, // PlainTableKeyEncoder, PlainTableKeyDecoder and PlainTableFileReader. diff --git a/table/plain_table_reader.cc b/table/plain/plain_table_reader.cc similarity index 99% rename from table/plain_table_reader.cc rename to table/plain/plain_table_reader.cc index f33afdefc..b4aad5587 100644 --- a/table/plain_table_reader.cc +++ b/table/plain/plain_table_reader.cc @@ -5,7 +5,7 @@ #ifndef ROCKSDB_LITE -#include "table/plain_table_reader.h" +#include "table/plain/plain_table_reader.h" #include #include @@ -19,15 +19,15 @@ #include "rocksdb/options.h" #include "rocksdb/statistics.h" -#include "table/block.h" +#include "table/block_based/block.h" #include "table/bloom_block.h" -#include "table/filter_block.h" +#include "table/block_based/filter_block.h" #include "table/format.h" #include "table/internal_iterator.h" #include "table/meta_blocks.h" #include "table/two_level_iterator.h" -#include "table/plain_table_factory.h" -#include "table/plain_table_key_coding.h" +#include "table/plain/plain_table_factory.h" +#include "table/plain/plain_table_key_coding.h" #include "table/get_context.h" #include "monitoring/histogram.h" diff --git a/table/plain_table_reader.h b/table/plain/plain_table_reader.h similarity index 98% rename from table/plain_table_reader.h rename to table/plain/plain_table_reader.h index 12b22aaf1..ec6e6a7fe 100644 --- a/table/plain_table_reader.h +++ b/table/plain/plain_table_reader.h @@ -19,8 +19,8 @@ #include "rocksdb/table.h" #include "rocksdb/table_properties.h" #include "table/table_reader.h" -#include "table/plain_table_factory.h" -#include "table/plain_table_index.h" +#include "table/plain/plain_table_factory.h" +#include "table/plain/plain_table_index.h" #include "util/arena.h" #include "util/dynamic_bloom.h" #include "util/file_reader_writer.h" diff --git a/table/sst_file_writer.cc b/table/sst_file_writer.cc index 71b395fd6..69993492d 100644 --- a/table/sst_file_writer.cc +++ b/table/sst_file_writer.cc @@ -6,9 +6,10 @@ #include "rocksdb/sst_file_writer.h" #include + #include "db/dbformat.h" #include "rocksdb/table.h" -#include "table/block_based_table_builder.h" +#include "table/block_based/block_based_table_builder.h" #include "table/sst_file_writer_collectors.h" #include "util/file_reader_writer.h" #include "test_util/sync_point.h" diff --git a/table/table_properties.cc b/table/table_properties.cc index 8cfa26195..6e481798c 100644 --- a/table/table_properties.cc +++ b/table/table_properties.cc @@ -4,10 +4,11 @@ // (found in the LICENSE.Apache file in the root directory). #include "rocksdb/table_properties.h" + #include "port/port.h" #include "rocksdb/env.h" #include "rocksdb/iterator.h" -#include "table/block.h" +#include "table/block_based/block.h" #include "table/internal_iterator.h" #include "table/table_properties_internal.h" #include "util/string_util.h" diff --git a/table/table_reader_bench.cc b/table/table_reader_bench.cc index 6b05d385e..f2ae016c1 100644 --- a/table/table_reader_bench.cc +++ b/table/table_reader_bench.cc @@ -17,10 +17,10 @@ int main() { #include "rocksdb/db.h" #include "rocksdb/slice_transform.h" #include "rocksdb/table.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/get_context.h" #include "table/internal_iterator.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/table_builder.h" #include "util/file_reader_writer.h" #include "util/gflags_compat.h" diff --git a/table/table_test.cc b/table/table_test.cc index aeb66f8d3..372443b53 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -16,11 +16,13 @@ #include #include +#include "block_fetcher.h" #include "cache/lru_cache.h" #include "db/dbformat.h" #include "db/memtable.h" #include "db/write_batch_internal.h" #include "memtable/stl_wrappers.h" +#include "meta_blocks.h" #include "monitoring/statistics.h" #include "port/port.h" #include "rocksdb/cache.h" @@ -32,18 +34,16 @@ #include "rocksdb/slice_transform.h" #include "rocksdb/statistics.h" #include "rocksdb/write_buffer_manager.h" -#include "table/block.h" -#include "table/block_based_table_builder.h" -#include "table/block_based_table_factory.h" -#include "table/block_based_table_reader.h" -#include "table/block_builder.h" -#include "table/block_fetcher.h" -#include "table/flush_block_policy.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_builder.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_based_table_reader.h" +#include "table/block_based/block_builder.h" +#include "table/block_based/flush_block_policy.h" #include "table/format.h" #include "table/get_context.h" #include "table/internal_iterator.h" -#include "table/meta_blocks.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/scoped_arena_iterator.h" #include "table/sst_file_writer_collectors.h" #include "util/compression.h" diff --git a/table/two_level_iterator.cc b/table/two_level_iterator.cc index a8f617dee..ba883763e 100644 --- a/table/two_level_iterator.cc +++ b/table/two_level_iterator.cc @@ -11,7 +11,7 @@ #include "db/pinned_iterators_manager.h" #include "rocksdb/options.h" #include "rocksdb/table.h" -#include "table/block.h" +#include "table/block_based/block.h" #include "table/format.h" #include "util/arena.h" diff --git a/test_util/testutil.h b/test_util/testutil.h index 2aab3df72..7890ce5f5 100644 --- a/test_util/testutil.h +++ b/test_util/testutil.h @@ -20,9 +20,9 @@ #include "rocksdb/options.h" #include "rocksdb/slice.h" #include "rocksdb/table.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/internal_iterator.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "util/mutexlock.h" #include "util/random.h" diff --git a/tools/sst_dump_test.cc b/tools/sst_dump_test.cc index a2c226b92..ea27f3c8d 100644 --- a/tools/sst_dump_test.cc +++ b/tools/sst_dump_test.cc @@ -13,7 +13,7 @@ #include "rocksdb/sst_dump_tool.h" #include "rocksdb/filter_policy.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "table/table_builder.h" #include "util/file_reader_writer.h" #include "test_util/testharness.h" diff --git a/tools/sst_dump_tool.cc b/tools/sst_dump_tool.cc index 5cbbfc385..aa051da01 100644 --- a/tools/sst_dump_tool.cc +++ b/tools/sst_dump_tool.cc @@ -1,3 +1,4 @@ + // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License @@ -28,13 +29,13 @@ #include "rocksdb/status.h" #include "rocksdb/table_properties.h" #include "rocksdb/utilities/ldb_cmd.h" -#include "table/block.h" -#include "table/block_based_table_builder.h" -#include "table/block_based_table_factory.h" -#include "table/block_builder.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_builder.h" +#include "table/block_based/block_based_table_factory.h" +#include "table/block_based/block_builder.h" #include "table/format.h" #include "table/meta_blocks.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/table_reader.h" #include "util/compression.h" #include "util/random.h" diff --git a/tools/trace_analyzer_tool.cc b/tools/trace_analyzer_tool.cc index a01869252..03057afbc 100644 --- a/tools/trace_analyzer_tool.cc +++ b/tools/trace_analyzer_tool.cc @@ -41,7 +41,7 @@ #include "rocksdb/utilities/ldb_cmd.h" #include "rocksdb/write_batch.h" #include "table/meta_blocks.h" -#include "table/plain_table_factory.h" +#include "table/plain/plain_table_factory.h" #include "table/table_reader.h" #include "tools/trace_analyzer_tool.h" #include "util/coding.h" diff --git a/util/bloom.cc b/util/bloom.cc index 1da4f2aa4..bedf4a658 100644 --- a/util/bloom.cc +++ b/util/bloom.cc @@ -10,9 +10,9 @@ #include "rocksdb/filter_policy.h" #include "rocksdb/slice.h" -#include "table/block_based_filter_block.h" +#include "table/block_based/block_based_filter_block.h" #include "table/full_filter_bits_builder.h" -#include "table/full_filter_block.h" +#include "table/block_based/full_filter_block.h" #include "util/coding.h" #include "util/hash.h" diff --git a/utilities/blob_db/blob_db_impl.cc b/utilities/blob_db/blob_db_impl.cc index 54eb3f2db..a93169c30 100644 --- a/utilities/blob_db/blob_db_impl.cc +++ b/utilities/blob_db/blob_db_impl.cc @@ -1,3 +1,4 @@ + // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License @@ -22,9 +23,9 @@ #include "rocksdb/iterator.h" #include "rocksdb/utilities/stackable_db.h" #include "rocksdb/utilities/transaction.h" -#include "table/block.h" -#include "table/block_based_table_builder.h" -#include "table/block_builder.h" +#include "table/block_based/block.h" +#include "table/block_based/block_based_table_builder.h" +#include "table/block_based/block_builder.h" #include "table/meta_blocks.h" #include "util/cast_util.h" #include "util/crc32c.h" diff --git a/utilities/memory/memory_test.cc b/utilities/memory/memory_test.cc index c3ff64081..224f7886b 100644 --- a/utilities/memory/memory_test.cc +++ b/utilities/memory/memory_test.cc @@ -10,7 +10,7 @@ #include "rocksdb/table.h" #include "rocksdb/utilities/memory_util.h" #include "rocksdb/utilities/stackable_db.h" -#include "table/block_based_table_factory.h" +#include "table/block_based/block_based_table_factory.h" #include "util/string_util.h" #include "test_util/testharness.h" #include "test_util/testutil.h" diff --git a/utilities/persistent_cache/persistent_cache_bench.cc b/utilities/persistent_cache/persistent_cache_bench.cc index 64d75c7a5..8bc795455 100644 --- a/utilities/persistent_cache/persistent_cache_bench.cc +++ b/utilities/persistent_cache/persistent_cache_bench.cc @@ -23,7 +23,7 @@ int main() { fprintf(stderr, "Please install gflags to run tools\n"); } #include "monitoring/histogram.h" #include "port/port.h" -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include "util/gflags_compat.h" #include "util/mutexlock.h" #include "util/stop_watch.h" diff --git a/utilities/persistent_cache/persistent_cache_test.h b/utilities/persistent_cache/persistent_cache_test.h index 33cda4ea7..6d15d13b6 100644 --- a/utilities/persistent_cache/persistent_cache_test.h +++ b/utilities/persistent_cache/persistent_cache_test.h @@ -20,7 +20,7 @@ #include "db/db_test_util.h" #include "rocksdb/cache.h" -#include "table/block_builder.h" +#include "table/block_based/block_builder.h" #include "port/port.h" #include "util/arena.h" #include "test_util/testharness.h"