From 5851cb7fdbb85a19dc0d3d9cc0a61adeb9a3ae02 Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Mon, 3 Jun 2019 13:21:02 -0700 Subject: [PATCH] Move util/trace_replay.* to trace_replay/ (#5376) Summary: util/ means for lower level libraries. trace_replay is highly integrated to DB and sometimes call DB. Move it out to a separate directory. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5376 Differential Revision: D15550938 Pulled By: siying fbshipit-source-id: f46dce5ceffdc05a73f26379c7bb1b79ebe6c207 --- CMakeLists.txt | 2 +- TARGETS | 2 +- db/db_impl/db_impl.h | 2 +- db/db_iter.cc | 2 +- src.mk | 2 +- tools/trace_analyzer_test.cc | 2 +- tools/trace_analyzer_tool.cc | 2 +- tools/trace_analyzer_tool.h | 2 +- {util => trace_replay}/trace_replay.cc | 2 +- {util => trace_replay}/trace_replay.h | 0 utilities/trace/file_trace_reader_writer.cc | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename {util => trace_replay}/trace_replay.cc (99%) rename {util => trace_replay}/trace_replay.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b5f03a0f3..7cb4cc7a86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -623,6 +623,7 @@ set(SOURCES tools/ldb_tool.cc tools/sst_dump_tool.cc tools/trace_analyzer_tool.cc + trace_replay/trace_replay.cc util/bloom.cc util/coding.cc util/compaction_job_stats_impl.cc @@ -642,7 +643,6 @@ set(SOURCES util/string_util.cc util/thread_local.cc util/threadpool_imp.cc - util/trace_replay.cc util/xxhash.cc utilities/backupable/backupable_db.cc utilities/blob_db/blob_compaction_filter.cc diff --git a/TARGETS b/TARGETS index da4f4d9a61..a635ed5ac7 100644 --- a/TARGETS +++ b/TARGETS @@ -221,6 +221,7 @@ cpp_library( "tools/ldb_cmd.cc", "tools/ldb_tool.cc", "tools/sst_dump_tool.cc", + "trace_replay/trace_replay.cc", "util/bloom.cc", "util/build_version.cc", "util/coding.cc", @@ -241,7 +242,6 @@ cpp_library( "util/string_util.cc", "util/thread_local.cc", "util/threadpool_imp.cc", - "util/trace_replay.cc", "util/xxhash.cc", "utilities/backupable/backupable_db.cc", "utilities/blob_db/blob_compaction_filter.cc", diff --git a/db/db_impl/db_impl.h b/db/db_impl/db_impl.h index 5461ef300a..f73e8665fb 100644 --- a/db/db_impl/db_impl.h +++ b/db/db_impl/db_impl.h @@ -53,12 +53,12 @@ #include "rocksdb/transaction_log.h" #include "rocksdb/write_buffer_manager.h" #include "table/scoped_arena_iterator.h" +#include "trace_replay/trace_replay.h" #include "util/autovector.h" #include "util/hash.h" #include "util/repeatable_thread.h" #include "util/stop_watch.h" #include "util/thread_local.h" -#include "util/trace_replay.h" namespace rocksdb { diff --git a/db/db_iter.cc b/db/db_iter.cc index bcfed2bb02..29a1a9eac1 100644 --- a/db/db_iter.cc +++ b/db/db_iter.cc @@ -26,9 +26,9 @@ #include "rocksdb/options.h" #include "table/internal_iterator.h" #include "table/iterator_wrapper.h" +#include "trace_replay/trace_replay.h" #include "util/mutexlock.h" #include "util/string_util.h" -#include "util/trace_replay.h" #include "util/user_comparator_wrapper.h" namespace rocksdb { diff --git a/src.mk b/src.mk index 38835f8c6d..c172d0b2c2 100644 --- a/src.mk +++ b/src.mk @@ -142,6 +142,7 @@ LIB_SOURCES = \ test_util/sync_point_impl.cc \ test_util/transaction_test_util.cc \ tools/dump/db_dump_tool.cc \ + trace_replay/trace_replay.cc \ util/bloom.cc \ util/build_version.cc \ util/coding.cc \ @@ -162,7 +163,6 @@ LIB_SOURCES = \ util/string_util.cc \ util/thread_local.cc \ util/threadpool_imp.cc \ - util/trace_replay.cc \ util/xxhash.cc \ utilities/backupable/backupable_db.cc \ utilities/blob_db/blob_compaction_filter.cc \ diff --git a/tools/trace_analyzer_test.cc b/tools/trace_analyzer_test.cc index 7c242f60f2..dcc954384f 100644 --- a/tools/trace_analyzer_test.cc +++ b/tools/trace_analyzer_test.cc @@ -30,7 +30,7 @@ int main() { #include "test_util/testharness.h" #include "test_util/testutil.h" #include "tools/trace_analyzer_tool.h" -#include "util/trace_replay.h" +#include "trace_replay/trace_replay.h" namespace rocksdb { diff --git a/tools/trace_analyzer_tool.cc b/tools/trace_analyzer_tool.cc index 93528c0060..6ab606f6a6 100644 --- a/tools/trace_analyzer_tool.cc +++ b/tools/trace_analyzer_tool.cc @@ -44,13 +44,13 @@ #include "table/plain/plain_table_factory.h" #include "table/table_reader.h" #include "tools/trace_analyzer_tool.h" +#include "trace_replay/trace_replay.h" #include "util/coding.h" #include "util/compression.h" #include "util/file_reader_writer.h" #include "util/gflags_compat.h" #include "util/random.h" #include "util/string_util.h" -#include "util/trace_replay.h" using GFLAGS_NAMESPACE::ParseCommandLineFlags; using GFLAGS_NAMESPACE::RegisterFlagValidator; diff --git a/tools/trace_analyzer_tool.h b/tools/trace_analyzer_tool.h index be96f5005d..4c3b973b79 100644 --- a/tools/trace_analyzer_tool.h +++ b/tools/trace_analyzer_tool.h @@ -16,7 +16,7 @@ #include "rocksdb/env.h" #include "rocksdb/trace_reader_writer.h" #include "rocksdb/write_batch.h" -#include "util/trace_replay.h" +#include "trace_replay/trace_replay.h" namespace rocksdb { diff --git a/util/trace_replay.cc b/trace_replay/trace_replay.cc similarity index 99% rename from util/trace_replay.cc rename to trace_replay/trace_replay.cc index 9e0e8c48cd..f9448069b8 100644 --- a/util/trace_replay.cc +++ b/trace_replay/trace_replay.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 "util/trace_replay.h" +#include "trace_replay/trace_replay.h" #include #include diff --git a/util/trace_replay.h b/trace_replay/trace_replay.h similarity index 100% rename from util/trace_replay.h rename to trace_replay/trace_replay.h diff --git a/utilities/trace/file_trace_reader_writer.cc b/utilities/trace/file_trace_reader_writer.cc index 4a81516a8b..d8e36c3127 100644 --- a/utilities/trace/file_trace_reader_writer.cc +++ b/utilities/trace/file_trace_reader_writer.cc @@ -5,9 +5,9 @@ #include "utilities/trace/file_trace_reader_writer.h" +#include "trace_replay/trace_replay.h" #include "util/coding.h" #include "util/file_reader_writer.h" -#include "util/trace_replay.h" namespace rocksdb {