Move memtable related files into memtable directory

Summary:
Move memtable related files into memtable directory.
Closes https://github.com/facebook/rocksdb/pull/2087

Differential Revision: D4829242

Pulled By: yiwu-arbug

fbshipit-source-id: ca70ab6
This commit is contained in:
Yi Wu 2017-04-06 13:59:31 -07:00 committed by Facebook Github Bot
parent 107c5f6a60
commit df6f5a3772
25 changed files with 65 additions and 62 deletions

View File

@ -316,7 +316,6 @@ set(SOURCES
db/log_writer.cc
db/managed_iterator.cc
db/memtable.cc
db/memtable_allocator.cc
db/memtable_list.cc
db/merge_helper.cc
db/merge_operator.cc
@ -341,6 +340,7 @@ set(SOURCES
memtable/hash_cuckoo_rep.cc
memtable/hash_linklist_rep.cc
memtable/hash_skiplist_rep.cc
memtable/memtable_allocator.cc
memtable/skiplistrep.cc
memtable/vectorrep.cc
monitoring/histogram.cc
@ -590,7 +590,6 @@ set(TESTS
db/file_indexer_test.cc
db/filename_test.cc
db/flush_job_test.cc
db/inlineskiplist_test.cc
db/listener_test.cc
db/log_test.cc
db/manual_compaction_test.cc
@ -602,7 +601,6 @@ set(TESTS
db/plain_table_db_test.cc
db/prefix_test.cc
db/repair_test.cc
db/skiplist_test.cc
db/table_properties_collector_test.cc
db/version_builder_test.cc
db/version_edit_test.cc
@ -614,6 +612,8 @@ set(TESTS
env/env_basic_test.cc
env/env_test.cc
env/mock_env_test.cc
memtable/inlineskiplist_test.cc
memtable/skiplist_test.cc
monitoring/histogram_test.cc
monitoring/iostats_context_test.cc
monitoring/statistics_test.cc
@ -674,10 +674,10 @@ if(WITH_LIBRADOS)
endif()
set(BENCHMARKS
cache/cache_bench.cc
memtable/memtablerep_bench.cc
tools/db_bench.cc
table/table_reader_bench.cc
cache/cache_bench.cc
db/memtablerep_bench.cc
utilities/column_aware_encoding_exp.cc
utilities/persistent_cache/hash_table_bench.cc)
add_library(testharness OBJECT util/testharness.cc)

View File

@ -907,7 +907,7 @@ cache_bench: cache/cache_bench.o $(LIBOBJECTS) $(TESTUTIL)
persistent_cache_bench: utilities/persistent_cache/persistent_cache_bench.o $(LIBOBJECTS) $(TESTUTIL)
$(AM_LINK)
memtablerep_bench: db/memtablerep_bench.o $(LIBOBJECTS) $(TESTUTIL)
memtablerep_bench: memtable/memtablerep_bench.o $(LIBOBJECTS) $(TESTUTIL)
$(AM_LINK)
db_stress: tools/db_stress.o $(LIBOBJECTS) $(TESTUTIL)
@ -1179,10 +1179,10 @@ table_test: table/table_test.o $(LIBOBJECTS) $(TESTHARNESS)
block_test: table/block_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)
inlineskiplist_test: db/inlineskiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
inlineskiplist_test: memtable/inlineskiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)
skiplist_test: db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
skiplist_test: memtable/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)
version_edit_test: db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS)

View File

@ -55,6 +55,7 @@
#include "util/log_buffer.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/random.h"
#include "util/sst_file_manager_impl.h"
#include "util/stop_watch.h"
#include "util/string_util.h"

View File

@ -24,7 +24,6 @@
#include "db/event_helpers.h"
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "db/memtable.h"
#include "db/memtable_list.h"
#include "db/merge_context.h"
#include "db/version_set.h"
@ -33,6 +32,7 @@
#include "monitoring/thread_status_util.h"
#include "port/likely.h"
#include "port/port.h"
#include "db/memtable.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/statistics.h"

View File

@ -16,10 +16,9 @@
#include <unordered_map>
#include <vector>
#include "db/dbformat.h"
#include "db/memtable_allocator.h"
#include "db/range_del_aggregator.h"
#include "db/skiplist.h"
#include "db/version_edit.h"
#include "memtable/memtable_allocator.h"
#include "monitoring/instrumented_mutex.h"
#include "options/cf_options.h"
#include "rocksdb/db.h"

View File

@ -14,7 +14,6 @@
#include "db/dbformat.h"
#include "db/memtable.h"
#include "db/range_del_aggregator.h"
#include "db/skiplist.h"
#include "monitoring/instrumented_mutex.h"
#include "rocksdb/db.h"
#include "rocksdb/iterator.h"

View File

@ -16,6 +16,7 @@
#include "rocksdb/write_batch.h"
#include "port/port.h"
#include "util/logging.h"
#include "util/random.h"
#include "util/sync_point.h"
#include "util/testharness.h"

View File

@ -9,6 +9,7 @@
#include <thread>
#include "db/column_family.h"
#include "port/port.h"
#include "util/random.h"
#include "util/sync_point.h"
namespace rocksdb {

View File

@ -16,7 +16,7 @@
#include <vector>
#include "db/memtable.h"
#include "db/skiplist.h"
#include "memtable/skiplist.h"
#include "memtable/stl_wrappers.h"
#include "port/port.h"
#include "rocksdb/memtablerep.h"

View File

@ -10,7 +10,7 @@
#include <algorithm>
#include <atomic>
#include "db/memtable.h"
#include "db/skiplist.h"
#include "memtable/skiplist.h"
#include "monitoring/histogram.h"
#include "port/port.h"
#include "rocksdb/memtablerep.h"

View File

@ -16,7 +16,7 @@
#include "port/port.h"
#include "util/murmurhash.h"
#include "db/memtable.h"
#include "db/skiplist.h"
#include "memtable/skiplist.h"
namespace rocksdb {
namespace {

View File

@ -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 "db/inlineskiplist.h"
#include "memtable/inlineskiplist.h"
#include <set>
#include <unordered_set>
#include "rocksdb/env.h"

View File

@ -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 "db/memtable_allocator.h"
#include "memtable/memtable_allocator.h"
#include <assert.h>
#include "rocksdb/write_buffer_manager.h"

View File

@ -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 "db/skiplist.h"
#include "memtable/skiplist.h"
#include <set>
#include "rocksdb/env.h"
#include "util/arena.h"

View File

@ -3,7 +3,7 @@
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
#include "db/inlineskiplist.h"
#include "memtable/inlineskiplist.h"
#include "db/memtable.h"
#include "rocksdb/memtablerep.h"
#include "util/arena.h"

80
src.mk
View File

@ -1,8 +1,8 @@
# These are the sources from which librocksdb.a is built:
LIB_SOURCES = \
cache/clock_cache.cc \
cache/lru_cache.cc \
cache/sharded_cache.cc \
cache/clock_cache.cc \
cache/lru_cache.cc \
cache/sharded_cache.cc \
db/builder.cc \
db/c.cc \
db/column_family.cc \
@ -15,9 +15,9 @@ LIB_SOURCES = \
db/db_filesnapshot.cc \
db/db_impl.cc \
db/db_impl_write.cc \
db/db_impl_compaction_flush.cc \
db/db_impl_compaction_flush.cc \
db/db_impl_files.cc \
db/db_impl_open.cc \
db/db_impl_open.cc \
db/db_impl_debug.cc \
db/db_impl_experimental.cc \
db/db_impl_readonly.cc \
@ -36,7 +36,6 @@ LIB_SOURCES = \
db/log_writer.cc \
db/managed_iterator.cc \
db/memtable.cc \
db/memtable_allocator.cc \
db/memtable_list.cc \
db/merge_helper.cc \
db/merge_operator.cc \
@ -54,35 +53,36 @@ LIB_SOURCES = \
db/write_batch_base.cc \
db/write_controller.cc \
db/write_thread.cc \
env/env.cc \
env/env_chroot.cc \
env/env_hdfs.cc \
env/env_posix.cc \
env/io_posix.cc \
env/memenv.cc \
env/env.cc \
env/env_chroot.cc \
env/env_hdfs.cc \
env/env_posix.cc \
env/io_posix.cc \
env/memenv.cc \
memtable/hash_cuckoo_rep.cc \
memtable/hash_linklist_rep.cc \
memtable/hash_skiplist_rep.cc \
memtable/memtable_allocator.cc \
memtable/skiplistrep.cc \
memtable/vectorrep.cc \
monitoring/histogram.cc \
monitoring/histogram_windowing.cc \
monitoring/instrumented_mutex.cc \
monitoring/iostats_context.cc \
monitoring/perf_context.cc \
monitoring/perf_level.cc \
monitoring/statistics.cc \
monitoring/thread_status_impl.cc \
monitoring/thread_status_updater.cc \
monitoring/thread_status_updater_debug.cc \
monitoring/thread_status_util.cc \
monitoring/thread_status_util_debug.cc \
options/cf_options.cc \
options/db_options.cc \
options/options.cc \
options/options_helper.cc \
options/options_parser.cc \
options/options_sanity_check.cc \
monitoring/histogram.cc \
monitoring/histogram_windowing.cc \
monitoring/instrumented_mutex.cc \
monitoring/iostats_context.cc \
monitoring/perf_context.cc \
monitoring/perf_level.cc \
monitoring/statistics.cc \
monitoring/thread_status_impl.cc \
monitoring/thread_status_updater.cc \
monitoring/thread_status_updater_debug.cc \
monitoring/thread_status_util.cc \
monitoring/thread_status_util_debug.cc \
options/cf_options.cc \
options/db_options.cc \
options/options.cc \
options/options_helper.cc \
options/options_parser.cc \
options/options_sanity_check.cc \
port/port_posix.cc \
port/stack_trace.cc \
table/adaptive_table_factory.cc \
@ -254,17 +254,14 @@ MAIN_SOURCES = \
db/file_indexer_test.cc \
db/filename_test.cc \
db/flush_job_test.cc \
db/inlineskiplist_test.cc \
db/listener_test.cc \
db/log_test.cc \
db/manual_compaction_test.cc \
db/memtablerep_bench.cc \
db/merge_test.cc \
db/options_file_test.cc \
db/perf_context_test.cc \
db/plain_table_db_test.cc \
db/prefix_test.cc \
db/skiplist_test.cc \
db/table_properties_collector_test.cc \
db/version_builder_test.cc \
db/version_edit_test.cc \
@ -273,13 +270,16 @@ MAIN_SOURCES = \
db/write_batch_test.cc \
db/write_callback_test.cc \
db/write_controller_test.cc \
env/env_basic_test.cc \
env/env_test.cc \
env/mock_env_test.cc \
monitoring/histogram_test.cc \
monitoring/iostats_context_test.cc \
monitoring/statistics_test.cc \
options/options_test.cc \
env/env_basic_test.cc \
env/env_test.cc \
env/mock_env_test.cc \
memtable/inlineskiplist_test.cc \
memtable/memtablerep_bench.cc \
memtable/skiplist_test.cc \
monitoring/histogram_test.cc \
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/cuckoo_table_builder_test.cc \

View File

@ -12,8 +12,8 @@
#include <vector>
#include "db/dbformat.h"
#include "db/memtable.h"
#include "db/write_batch_internal.h"
#include "db/memtable.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/iterator.h"

View File

@ -24,6 +24,7 @@
#include "rocksdb/env.h"
#include "util/filename.h"
#include "util/mutexlock.h"
#include "util/random.h"
namespace rocksdb {

View File

@ -26,7 +26,7 @@
#include "utilities/persistent_cache/block_cache_tier_metadata.h"
#include "utilities/persistent_cache/persistent_cache_util.h"
#include "db/skiplist.h"
#include "memtable/skiplist.h"
#include "monitoring/histogram.h"
#include "port/port.h"
#include "util/arena.h"

View File

@ -14,7 +14,7 @@
#include "db/db_impl.h"
#include "db/merge_context.h"
#include "db/merge_helper.h"
#include "db/skiplist.h"
#include "memtable/skiplist.h"
#include "options/db_options.h"
#include "rocksdb/comparator.h"
#include "rocksdb/iterator.h"

View File

@ -14,6 +14,7 @@
#include "db/column_family.h"
#include "port/stack_trace.h"
#include "rocksdb/utilities/write_batch_with_index.h"
#include "util/random.h"
#include "util/string_util.h"
#include "util/testharness.h"
#include "utilities/merge_operators.h"