Skip to content

Commit

Permalink
Remove unused includes (facebook#7604)
Browse files Browse the repository at this point in the history
Summary:
This is a PR generated **semi-automatically** by an internal tool to remove unused includes and `using` statements.

Pull Request resolved: facebook#7604

Test Plan: make check

Reviewed By: ajkr

Differential Revision: D24579392

Pulled By: riversand963

fbshipit-source-id: c4bfa6c6b08da1de186690d37eb73d8fff45aecd
  • Loading branch information
riversand963 authored and facebook-github-bot committed Oct 29, 2020
1 parent 99a0305 commit 394210f
Show file tree
Hide file tree
Showing 47 changed files with 0 additions and 72 deletions.
1 change: 0 additions & 1 deletion cache/lru_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>

#include "util/mutexlock.h"
Expand Down
4 changes: 0 additions & 4 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ using ROCKSDB_NAMESPACE::ColumnFamilyDescriptor;
using ROCKSDB_NAMESPACE::ColumnFamilyHandle;
using ROCKSDB_NAMESPACE::ColumnFamilyOptions;
using ROCKSDB_NAMESPACE::CompactionFilter;
using ROCKSDB_NAMESPACE::CompactionFilterContext;
using ROCKSDB_NAMESPACE::CompactionFilterFactory;
using ROCKSDB_NAMESPACE::CompactionOptionsFIFO;
using ROCKSDB_NAMESPACE::CompactRangeOptions;
Expand All @@ -82,7 +81,6 @@ using ROCKSDB_NAMESPACE::LiveFileMetaData;
using ROCKSDB_NAMESPACE::Logger;
using ROCKSDB_NAMESPACE::MemoryUtil;
using ROCKSDB_NAMESPACE::MergeOperator;
using ROCKSDB_NAMESPACE::MergeOperators;
using ROCKSDB_NAMESPACE::NewBloomFilterPolicy;
using ROCKSDB_NAMESPACE::NewGenericRateLimiter;
using ROCKSDB_NAMESPACE::NewLRUCache;
Expand Down Expand Up @@ -115,10 +113,8 @@ using ROCKSDB_NAMESPACE::WriteBatch;
using ROCKSDB_NAMESPACE::WriteBatchWithIndex;
using ROCKSDB_NAMESPACE::WriteOptions;

using std::shared_ptr;
using std::vector;
using std::unordered_set;
using std::map;

extern "C" {

Expand Down
1 change: 0 additions & 1 deletion db/compaction/compaction_job_stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "db/write_batch_internal.h"
#include "env/mock_env.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "memtable/hash_linklist_rep.h"
#include "monitoring/statistics.h"
#include "monitoring/thread_status_util.h"
Expand Down
1 change: 0 additions & 1 deletion db/compaction/compaction_picker_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "db/compaction/compaction_picker_level.h"
#include "db/compaction/compaction_picker_universal.h"

#include "logging/logging.h"
#include "test_util/testharness.h"
#include "test_util/testutil.h"
#include "util/string_util.h"
Expand Down
1 change: 0 additions & 1 deletion db/comparator_db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "util/string_util.h"
#include "utilities/merge_operators.h"

using std::unique_ptr;

namespace ROCKSDB_NAMESPACE {
namespace {
Expand Down
1 change: 0 additions & 1 deletion db/corruption_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#ifndef ROCKSDB_LITE

#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion db/dbformat_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "db/dbformat.h"
#include "logging/logging.h"
#include "test_util/testharness.h"

namespace ROCKSDB_NAMESPACE {
Expand Down
1 change: 0 additions & 1 deletion db/fault_injection_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "db/version_set.h"
#include "env/mock_env.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "rocksdb/cache.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
Expand Down
1 change: 0 additions & 1 deletion db/filename_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "file/filename.h"

#include "db/dbformat.h"
#include "logging/logging.h"
#include "port/port.h"
#include "test_util/testharness.h"

Expand Down
1 change: 0 additions & 1 deletion db/listener_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "memtable/hash_linklist_rep.h"
#include "monitoring/statistics.h"
#include "rocksdb/cache.h"
Expand Down
4 changes: 0 additions & 4 deletions db/obsolete_files_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
#include "test_util/testutil.h"
#include "util/string_util.h"

using std::cerr;
using std::cout;
using std::endl;
using std::flush;

namespace ROCKSDB_NAMESPACE {

Expand Down
1 change: 0 additions & 1 deletion db/periodic_work_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "db/periodic_work_scheduler.h"

#include "db/db_impl/db_impl.h"
#include "util/cast_util.h"

#ifndef ROCKSDB_LITE
namespace ROCKSDB_NAMESPACE {
Expand Down
2 changes: 0 additions & 2 deletions db/plain_table_db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h"
#include "rocksdb/db.h"
Expand All @@ -39,7 +38,6 @@
#include "util/string_util.h"
#include "utilities/merge_operators.h"

using std::unique_ptr;

namespace ROCKSDB_NAMESPACE {
class PlainTableKeyDecoderTest : public testing::Test {};
Expand Down
1 change: 0 additions & 1 deletion db/version_builder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "db/version_edit.h"
#include "db/version_set.h"
#include "logging/logging.h"
#include "test_util/testharness.h"
#include "test_util/testutil.h"
#include "util/string_util.h"
Expand Down
1 change: 0 additions & 1 deletion db/version_set_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "db/db_impl/db_impl.h"
#include "db/log_writer.h"
#include "logging/logging.h"
#include "table/block_based/block_based_table_factory.h"
#include "table/mock_table.h"
#include "test_util/testharness.h"
Expand Down
1 change: 0 additions & 1 deletion env/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "memory/arena.h"
#include "options/db_options.h"
#include "port/port.h"
#include "port/sys_time.h"
#include "rocksdb/options.h"
#include "rocksdb/utilities/object_registry.h"
#include "util/autovector.h"
Expand Down
7 changes: 0 additions & 7 deletions env/env_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#include <errno.h>
#include <fcntl.h>

#if defined(OS_LINUX)
#include <linux/fs.h>
#endif
#if defined(ROCKSDB_IOURING_PRESENT)
#include <liburing.h>
#endif
Expand All @@ -27,13 +24,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#if defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_ANDROID)
#include <sys/statfs.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#endif
#include <sys/statvfs.h>
#include <sys/time.h>
Expand All @@ -58,7 +52,6 @@

#include "env/composite_env_wrapper.h"
#include "env/io_posix.h"
#include "logging/logging.h"
#include "logging/posix_logger.h"
#include "monitoring/iostats_context_imp.h"
#include "monitoring/thread_status_updater.h"
Expand Down
5 changes: 0 additions & 5 deletions env/fs_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#include <errno.h>
#include <fcntl.h>

#if defined(OS_LINUX)
#include <linux/fs.h>
#endif
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
Expand All @@ -29,7 +26,6 @@
#include <sys/stat.h>
#if defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_ANDROID)
#include <sys/statfs.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#endif
#include <sys/statvfs.h>
Expand All @@ -52,7 +48,6 @@

#include "env/composite_env_wrapper.h"
#include "env/io_posix.h"
#include "logging/logging.h"
#include "logging/posix_logger.h"
#include "monitoring/iostats_context_imp.h"
#include "monitoring/thread_status_updater.h"
Expand Down
1 change: 0 additions & 1 deletion env/io_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <sys/types.h>
#ifdef OS_LINUX
#include <sys/statfs.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#endif
#include "monitoring/iostats_context_imp.h"
Expand Down
1 change: 0 additions & 1 deletion file/filename.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <stdio.h>
#include <vector>
#include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "rocksdb/env.h"
#include "test_util/sync_point.h"
#include "util/stop_watch.h"
Expand Down
1 change: 0 additions & 1 deletion logging/auto_roll_logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#ifndef ROCKSDB_LITE

#include "logging/auto_roll_logger.h"
#include <errno.h>
#include <sys/stat.h>
#include <algorithm>
#include <cmath>
Expand Down
1 change: 0 additions & 1 deletion logging/event_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <sstream>
#include <string>

#include "logging/logging.h"
#include "util/string_util.h"

namespace ROCKSDB_NAMESPACE {
Expand Down
1 change: 0 additions & 1 deletion monitoring/persistent_stats_history.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <string>
#include <utility>
#include "db/db_impl/db_impl.h"
#include "port/likely.h"
#include "util/string_util.h"

namespace ROCKSDB_NAMESPACE {
Expand Down
1 change: 0 additions & 1 deletion monitoring/statistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <algorithm>
#include <cinttypes>
#include <cstdio>
#include "port/likely.h"
#include "rocksdb/statistics.h"

namespace ROCKSDB_NAMESPACE {
Expand Down
2 changes: 0 additions & 2 deletions port/port_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
#include <stdio.h>
#include <string.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <unistd.h>
#include <cstdlib>
#include "logging/logging.h"

namespace ROCKSDB_NAMESPACE {

Expand Down
1 change: 0 additions & 1 deletion table/block_based/block.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <unordered_map>
#include <vector>

#include "logging/logging.h"
#include "monitoring/perf_context_imp.h"
#include "port/port.h"
#include "port/stack_trace.h"
Expand Down
2 changes: 0 additions & 2 deletions table/block_based/block_based_table_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "db/dbformat.h"
#include "index_builder.h"
#include "port/lang.h"

#include "rocksdb/cache.h"
#include "rocksdb/comparator.h"
Expand Down Expand Up @@ -56,7 +55,6 @@ namespace ROCKSDB_NAMESPACE {
extern const std::string kHashIndexPrefixesBlock;
extern const std::string kHashIndexPrefixesMetadataBlock;

typedef BlockBasedTableOptions::IndexType IndexType;

// Without anonymous namespace here, we fail the warning -Wmissing-prototypes
namespace {
Expand Down
2 changes: 0 additions & 2 deletions table/block_based/block_based_table_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@
#include "util/crc32c.h"
#include "util/stop_watch.h"
#include "util/string_util.h"
#include "util/xxhash.h"

namespace ROCKSDB_NAMESPACE {

extern const uint64_t kBlockBasedTableMagicNumber;
extern const std::string kHashIndexPrefixesBlock;
extern const std::string kHashIndexPrefixesMetadataBlock;

typedef BlockBasedTable::IndexReader IndexReader;

// Found that 256 KB readahead size provides the best performance, based on
// experiments, for auto readahead. Experiment data is in PR #3282.
Expand Down
1 change: 0 additions & 1 deletion table/block_based/partitioned_filter_block_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "table/block_based/filter_policy_internal.h"

#include "index_builder.h"
#include "logging/logging.h"
#include "test_util/testharness.h"
#include "test_util/testutil.h"
#include "util/coding.h"
Expand Down
1 change: 0 additions & 1 deletion table/cuckoo/cuckoo_table_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ int main() {
#include "util/string_util.h"

using GFLAGS_NAMESPACE::ParseCommandLineFlags;
using GFLAGS_NAMESPACE::SetUsageMessage;

DEFINE_string(file_dir, "", "Directory where the files will be created"
" for benchmark. Added for using tmpfs.");
Expand Down
1 change: 0 additions & 1 deletion table/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "block_fetcher.h"
#include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "memory/memory_allocator.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
Expand Down
1 change: 0 additions & 1 deletion test_util/sync_point.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "test_util/sync_point.h"

#include <fcntl.h>
#include <sys/stat.h>

#include "test_util/sync_point_impl.h"

Expand Down
1 change: 0 additions & 1 deletion tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#ifdef GFLAGS
#ifdef NUMA
#include <numa.h>
#include <numaif.h>
#endif
#ifndef OS_WIN
#include <unistd.h>
Expand Down
1 change: 0 additions & 1 deletion tools/ldb_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "db/write_batch_internal.h"
#include "env/composite_env_wrapper.h"
#include "file/filename.h"
#include "port/port_dirent.h"
#include "rocksdb/cache.h"
#include "rocksdb/file_checksum.h"
#include "rocksdb/table_properties.h"
Expand Down
3 changes: 0 additions & 3 deletions tools/trace_analyzer_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifdef GFLAGS
#ifdef NUMA
#include <numa.h>
#include <numaif.h>
#endif
#ifndef OS_WIN
#include <unistd.h>
Expand Down Expand Up @@ -50,8 +49,6 @@
#include "util/string_util.h"

using GFLAGS_NAMESPACE::ParseCommandLineFlags;
using GFLAGS_NAMESPACE::RegisterFlagValidator;
using GFLAGS_NAMESPACE::SetUsageMessage;

DEFINE_string(trace_path, "", "The trace file path.");
DEFINE_string(output_dir, "", "The directory to store the output files.");
Expand Down
1 change: 0 additions & 1 deletion util/bloom_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ int main() {
#include <cmath>
#include <vector>

#include "logging/logging.h"
#include "memory/arena.h"
#include "port/jemalloc_helper.h"
#include "rocksdb/filter_policy.h"
Expand Down
1 change: 0 additions & 1 deletion util/comparator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <stdint.h>
#include <algorithm>
#include <memory>
#include "logging/logging.h"
#include "port/port.h"
#include "rocksdb/slice.h"

Expand Down
Loading

0 comments on commit 394210f

Please sign in to comment.