kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [2/2] kudu git commit: [iwyu] update std::move
Date Wed, 20 Sep 2017 19:27:30 GMT
[iwyu] update std::move

Updated IWYU mappings to use <utility> for std::move() and std::swap()
instead of <algorithm>.  Unsorted micro-cleanups in some tests.

Also, updated the cpplint.py script from the google-styleguide
to reflect std::swap() migration from <algorithm> to <utility>. That
is to keep things consistent between 'iwyu' and 'lint/ilint' targets.
The latest version of the google-styleguide at [1] already contains the
corresponding update along with other C++11-related changes, but I would
like to bump the google-styleguide version in a separate changelist.

References:
  [1] https://github.com/google/styleguide

Change-Id: Ic5972f9a43f4c1db4a0dff5f983f7dba90c8db31
Reviewed-on: http://gerrit.cloudera.org:8080/8088
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Alexey Serbin <aserbin@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/3e6e12a9
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/3e6e12a9
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/3e6e12a9

Branch: refs/heads/master
Commit: 3e6e12a9f41abb0f354a81af46698b697c2dcb6f
Parents: 02ba0ec
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Fri Sep 15 20:25:44 2017 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Wed Sep 20 19:25:59 2017 +0000

----------------------------------------------------------------------
 build-support/iwyu/iwyu-filter.awk              | 12 ----
 build-support/iwyu/mappings/boost-extra.imp     |  1 +
 build-support/iwyu/mappings/libstdcpp.imp       |  6 +-
 src/kudu/benchmarks/tpch/tpch_real_world.cc     |  6 +-
 src/kudu/cfile/block_cache.h                    |  2 +-
 src/kudu/cfile/bloomfile-test.cc                |  2 +-
 src/kudu/cfile/bloomfile.cc                     |  2 +-
 src/kudu/cfile/cfile-test.cc                    |  2 +-
 src/kudu/cfile/cfile_reader.cc                  |  1 +
 src/kudu/cfile/cfile_writer.cc                  |  3 +-
 src/kudu/client/batcher.cc                      |  1 -
 src/kudu/client/client.cc                       |  1 -
 src/kudu/client/meta_cache.h                    |  2 +-
 src/kudu/client/partitioner-internal.h          |  2 +-
 src/kudu/client/replica-internal.cc             |  2 +-
 src/kudu/client/scan_configuration.cc           |  2 +-
 src/kudu/client/scan_token-test.cc              |  2 +-
 src/kudu/client/schema.cc                       |  2 +-
 src/kudu/client/session-internal.cc             |  2 +-
 src/kudu/client/table-internal.cc               |  2 +-
 src/kudu/client/table_alterer-internal.cc       |  2 +-
 src/kudu/client/tablet_server-internal.cc       |  2 +-
 src/kudu/codegen/jit_wrapper.cc                 |  2 +-
 src/kudu/codegen/module_builder.cc              |  2 +-
 src/kudu/common/partial_row.cc                  |  2 +-
 src/kudu/common/partition_pruner-test.cc        |  1 -
 src/kudu/common/schema.h                        |  4 +-
 src/kudu/consensus/consensus_meta-test.cc       | 13 ++--
 src/kudu/consensus/consensus_meta.cc            |  2 +-
 .../consensus_meta_manager-stress-test.cc       |  2 +-
 src/kudu/consensus/consensus_meta_manager.cc    |  2 +-
 src/kudu/consensus/consensus_peers-test.cc      |  2 +-
 src/kudu/consensus/leader_election-test.cc      |  4 +-
 src/kudu/consensus/log.cc                       |  2 +-
 src/kudu/consensus/log_util.cc                  |  1 +
 src/kudu/consensus/raft_consensus.h             |  2 +-
 .../consensus/raft_consensus_quorum-test.cc     | 76 ++++++--------------
 src/kudu/fs/block_manager-stress-test.cc        |  2 +-
 src/kudu/fs/block_manager-test.cc               |  1 +
 src/kudu/fs/block_manager.h                     |  6 +-
 src/kudu/fs/block_manager_util-test.cc          |  2 +-
 src/kudu/fs/block_manager_util.cc               |  2 +-
 src/kudu/fs/data_dirs.h                         |  2 +-
 src/kudu/fs/file_block_manager.cc               |  2 +-
 src/kudu/fs/fs-test-util.h                      |  1 +
 src/kudu/fs/fs_manager.cc                       |  2 +-
 src/kudu/gutil/atomicops-internals-x86.cc       |  3 +-
 src/kudu/gutil/cpu.cc                           |  2 +-
 src/kudu/gutil/hash/city.cc                     |  2 +-
 src/kudu/gutil/ref_counted_memory.cc            |  2 +-
 src/kudu/gutil/strings/split.cc                 |  1 +
 src/kudu/gutil/strings/split.h                  |  3 +-
 src/kudu/gutil/strings/strcat.h                 |  3 +-
 src/kudu/gutil/strings/stringpiece.cc           | 10 +--
 src/kudu/gutil/strings/strip.cc                 |  8 ---
 src/kudu/gutil/strings/util.cc                  | 11 +--
 .../exactly_once_writes-itest.cc                |  2 +-
 .../external_mini_cluster-itest-base.cc         |  2 +-
 .../external_mini_cluster-test.cc               |  2 +-
 .../integration-tests/internal_mini_cluster.cc  |  2 +-
 .../integration-tests/master-stress-test.cc     |  4 +-
 .../integration-tests/open-readonly-fs-itest.cc |  2 +-
 .../integration-tests/token_signer-itest.cc     | 15 ++--
 .../integration-tests/version_migration-test.cc |  4 +-
 src/kudu/master/mini_master.cc                  |  2 +-
 src/kudu/master/sys_catalog-test.cc             |  2 +-
 src/kudu/master/ts_descriptor.cc                |  2 +-
 src/kudu/rpc/client_negotiation.h               |  2 +-
 src/kudu/rpc/connection.h                       |  2 +-
 src/kudu/rpc/connection_id.cc                   |  2 +-
 src/kudu/rpc/exactly_once_rpc-test.cc           |  2 +-
 src/kudu/rpc/inbound_call.h                     |  2 +-
 src/kudu/rpc/messenger.cc                       |  2 +-
 src/kudu/rpc/mt-rpc-test.cc                     |  2 +-
 src/kudu/rpc/negotiation-test.cc                |  2 +-
 src/kudu/rpc/negotiation.cc                     |  2 +-
 src/kudu/rpc/outbound_call.cc                   |  2 +-
 src/kudu/rpc/protoc-gen-krpc.cc                 |  4 +-
 src/kudu/rpc/proxy.cc                           |  2 +-
 src/kudu/rpc/reactor.h                          |  2 +-
 src/kudu/rpc/remote_method.cc                   |  2 +-
 src/kudu/rpc/remote_user.h                      |  2 +-
 src/kudu/rpc/rpc-bench.cc                       |  2 +-
 src/kudu/rpc/rpc.h                              |  2 +-
 src/kudu/rpc/rpc_context.cc                     |  2 +-
 src/kudu/rpc/rpc_controller.cc                  |  2 +-
 src/kudu/rpc/rpc_sidecar.cc                     |  3 +-
 src/kudu/rpc/rpc_sidecar.h                      |  3 +-
 src/kudu/rpc/server_negotiation.cc              |  1 +
 src/kudu/rpc/server_negotiation.h               |  2 +-
 src/kudu/rpc/service_pool.cc                    |  2 +-
 src/kudu/rpc/user_credentials.cc                |  2 +-
 src/kudu/security/simple_acl.cc                 |  2 +-
 src/kudu/security/tls_handshake.h               |  2 +-
 src/kudu/security/tls_socket.cc                 |  2 +-
 src/kudu/server/rpc_server.cc                   |  2 +-
 src/kudu/server/server_base.cc                  |  2 +-
 src/kudu/server/webserver.h                     |  2 +-
 src/kudu/tablet/cfile_set.h                     |  2 +-
 src/kudu/tablet/compaction-test.cc              |  1 +
 src/kudu/tablet/compaction.cc                   |  1 +
 src/kudu/tablet/compaction.h                    |  2 +-
 src/kudu/tablet/delta_applier.cc                |  2 +-
 src/kudu/tablet/delta_tracker.cc                |  1 +
 src/kudu/tablet/deltafile.cc                    |  2 +-
 src/kudu/tablet/multi_column_writer.cc          |  2 +-
 src/kudu/tablet/row_op.cc                       |  2 +-
 src/kudu/tablet/rowset.cc                       |  2 +-
 src/kudu/tablet/tablet.cc                       |  2 -
 src/kudu/tablet/tablet_bootstrap.cc             |  1 -
 src/kudu/tablet/tablet_history_gc-test.cc       | 67 +++++++++--------
 src/kudu/tablet/tablet_metadata.h               |  2 +-
 src/kudu/tablet/tablet_mm_ops.cc                |  2 +-
 src/kudu/tablet/tablet_replica-test.cc          |  2 +-
 .../transactions/alter_schema_transaction.cc    |  2 +-
 .../tablet/transactions/transaction_driver.cc   |  2 +-
 .../transactions/transaction_tracker-test.cc    |  4 +-
 src/kudu/tools/ksck_remote.h                    |  2 +-
 src/kudu/tools/tool_action-test.cc              |  2 +-
 src/kudu/tools/tool_action_local_replica.cc     | 11 ++-
 src/kudu/tools/tool_action_pbc.cc               |  2 +-
 src/kudu/tools/tool_action_table.cc             |  2 +-
 src/kudu/tools/tool_action_tablet.cc            |  2 +-
 src/kudu/tools/tool_action_wal.cc               |  2 +-
 src/kudu/tserver/tablet_copy_client.cc          |  2 +-
 src/kudu/tserver/tablet_copy_service-test.cc    | 75 +++++++++----------
 .../tserver/tablet_copy_source_session-test.cc  |  2 +-
 src/kudu/tserver/tablet_copy_source_session.h   |  2 +-
 src/kudu/tserver/tablet_server.cc               |  2 +-
 src/kudu/twitter-demo/ingest_firehose.cc        |  2 +-
 src/kudu/twitter-demo/insert_consumer.cc        |  2 +-
 src/kudu/util/async_logger.h                    |  2 +-
 src/kudu/util/callback_bind-test.cc             |  2 +-
 src/kudu/util/env-test.cc                       |  1 +
 src/kudu/util/env.h                             |  4 +-
 src/kudu/util/env_util-test.cc                  |  1 -
 src/kudu/util/file_cache-stress-test.cc         | 37 +++++-----
 src/kudu/util/jsonreader.cc                     |  2 +-
 src/kudu/util/logging.cc                        |  3 +-
 src/kudu/util/maintenance_manager.h             |  3 +-
 src/kudu/util/mem_tracker.h                     |  2 +-
 src/kudu/util/metrics.cc                        |  1 -
 src/kudu/util/net/net_util.cc                   |  1 -
 src/kudu/util/pb_util-test.cc                   |  8 +--
 src/kudu/util/pb_util.cc                        |  4 +-
 src/kudu/util/process_memory.cc                 |  3 +-
 src/kudu/util/rolling_log.cc                    |  2 +-
 src/kudu/util/status-test.cc                    |  2 +-
 src/kudu/util/subprocess.cc                     |  1 -
 src/kudu/util/test_graph.h                      |  2 +-
 src/kudu/util/thread.h                          |  2 +-
 src/kudu/util/threadpool-test.cc                |  2 +-
 src/kudu/util/threadpool.cc                     |  2 +-
 thirdparty/download-thirdparty.sh               |  8 +++
 .../patches/google-styleguide-cpplint.patch     | 21 ++++++
 155 files changed, 325 insertions(+), 347 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/build-support/iwyu/iwyu-filter.awk
----------------------------------------------------------------------
diff --git a/build-support/iwyu/iwyu-filter.awk b/build-support/iwyu/iwyu-filter.awk
index 90e461f..a749058 100644
--- a/build-support/iwyu/iwyu-filter.awk
+++ b/build-support/iwyu/iwyu-filter.awk
@@ -89,14 +89,9 @@ BEGIN {
   muted["kudu/client/client-test.cc"]
   muted["kudu/common/encoded_key-test.cc"]
   muted["kudu/common/schema.h"]
-  muted["kudu/consensus/consensus_meta-test.cc"]
-  muted["kudu/consensus/raft_consensus_quorum-test.cc"]
   muted["kudu/experiments/rwlock-perf.cc"]
-  muted["kudu/gutil/atomicops-internals-x86.cc"]
-  muted["kudu/integration-tests/token_signer-itest.cc"]
   muted["kudu/rpc/reactor.cc"]
   muted["kudu/rpc/reactor.h"]
-  muted["kudu/rpc/rpc_sidecar.h"]
   muted["kudu/security/ca/cert_management.cc"]
   muted["kudu/security/ca/cert_management.h"]
   muted["kudu/security/cert-test.cc"]
@@ -110,14 +105,7 @@ BEGIN {
   muted["kudu/security/x509_check_host.cc"]
   muted["kudu/server/default-path-handlers.cc"]
   muted["kudu/server/webserver.cc"]
-  muted["kudu/tablet/tablet.cc"]
-  muted["kudu/tablet/tablet_history_gc-test.cc"]
-  muted["kudu/tablet/transactions/transaction_tracker-test.cc"]
-  muted["kudu/tools/tool_action_local_replica.cc"]
-  muted["kudu/tserver/tablet_copy_service-test.cc"]
   muted["kudu/util/bit-util-test.cc"]
-  muted["kudu/util/env_util-test.cc"]
-  muted["kudu/util/file_cache-stress-test.cc"]
   muted["kudu/util/group_varint-test.cc"]
   muted["kudu/util/minidump.cc"]
   muted["kudu/util/mt-metrics-test.cc"]

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/build-support/iwyu/mappings/boost-extra.imp
----------------------------------------------------------------------
diff --git a/build-support/iwyu/mappings/boost-extra.imp b/build-support/iwyu/mappings/boost-extra.imp
index aba1e41..d8badff 100644
--- a/build-support/iwyu/mappings/boost-extra.imp
+++ b/build-support/iwyu/mappings/boost-extra.imp
@@ -17,6 +17,7 @@
 [
     { include: ["<boost/core/explicit_operator_bool.hpp>", private, "<boost/optional/optional.hpp>", public ] },
     { include: ["<boost/cstdint.hpp>", private, "<cstdint>", public ] },
+    { include: ["<boost/container/detail/std_fwd.hpp>", private, "<utility>", public ] },
     { include: ["<boost/none.hpp>", private, "<boost/optional/optional.hpp>", public ] },
     { include: ["<boost/optional/detail/optional_relops.hpp>", private, "<boost/optional/optional.hpp>", public ] },
     { include: ["<boost/optional/detail/optional_reference_spec.hpp>", private, "<boost/optional/optional.hpp>", public ] }

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/build-support/iwyu/mappings/libstdcpp.imp
----------------------------------------------------------------------
diff --git a/build-support/iwyu/mappings/libstdcpp.imp b/build-support/iwyu/mappings/libstdcpp.imp
index 4a6212a..fea8bae 100644
--- a/build-support/iwyu/mappings/libstdcpp.imp
+++ b/build-support/iwyu/mappings/libstdcpp.imp
@@ -25,5 +25,9 @@
     { include: ["<ext/alloc_traits.h>", private, "<string>", public ] },
     { include: ["<ext/alloc_traits.h>", private, "<unordered_map>", public ] },
     { include: ["<ext/alloc_traits.h>", private, "<unordered_set>", public ] },
-    { include: ["<ext/alloc_traits.h>", private, "<vector>", public ] }
+    { include: ["<ext/alloc_traits.h>", private, "<vector>", public ] },
+    { symbol: ["std::equal_to", private, "<functional>", public ] },
+    { symbol: ["std::move", private, "<utility>", public ] },
+    { symbol: ["std::move", private, "<algorithm>", public ] },
+    { symbol: ["std::swap", private, "<utility>", public ] }
 ]

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/benchmarks/tpch/tpch_real_world.cc
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/tpch_real_world.cc b/src/kudu/benchmarks/tpch/tpch_real_world.cc
index b3b160f..8bf806f 100644
--- a/src/kudu/benchmarks/tpch/tpch_real_world.cc
+++ b/src/kudu/benchmarks/tpch/tpch_real_world.cc
@@ -37,19 +37,19 @@
 //    stops at soon as it gets the signal that we ran out of time or that there are no more rows to
 //    insert, so the last timing shouldn't be used.
 //
-// TODO Make the inserts multi-threaded. See Kudu-629 for the technique.
+// TODO(KUDU-629) Make the inserts multi-threaded.
 
-#include <stdlib.h>
 #include <sys/stat.h>
 
-#include <algorithm>
 #include <cerrno>
 #include <cinttypes>
 #include <csignal>
 #include <cstdint>
+#include <cstdlib>
 #include <iostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <boost/bind.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/block_cache.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/block_cache.h b/src/kudu/cfile/block_cache.h
index 6a2e8b1..cdb5520 100644
--- a/src/kudu/cfile/block_cache.h
+++ b/src/kudu/cfile/block_cache.h
@@ -17,9 +17,9 @@
 #ifndef KUDU_CFILE_BLOCK_CACHE_H
 #define KUDU_CFILE_BLOCK_CACHE_H
 
-#include <algorithm>
 #include <cstddef>
 #include <cstdint>
+#include <utility>
 
 #include <gflags/gflags_declare.h>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/bloomfile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/bloomfile-test.cc b/src/kudu/cfile/bloomfile-test.cc
index afd8171..42f16c3 100644
--- a/src/kudu/cfile/bloomfile-test.cc
+++ b/src/kudu/cfile/bloomfile-test.cc
@@ -15,11 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <cstdlib>
 #include <memory>
 #include <ostream>
+#include <utility>
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/bloomfile.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/bloomfile.cc b/src/kudu/cfile/bloomfile.cc
index ec301a0..d4a6d90 100644
--- a/src/kudu/cfile/bloomfile.cc
+++ b/src/kudu/cfile/bloomfile.cc
@@ -15,11 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags_declare.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/cfile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile-test.cc b/src/kudu/cfile/cfile-test.cc
index b35d77b..82e71a2 100644
--- a/src/kudu/cfile/cfile-test.cc
+++ b/src/kudu/cfile/cfile-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <cstdlib>
 #include <cstring>
@@ -24,6 +23,7 @@
 #include <memory>
 #include <sstream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/cfile_reader.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile_reader.cc b/src/kudu/cfile/cfile_reader.cc
index cd05951..f69a377 100644
--- a/src/kudu/cfile/cfile_reader.cc
+++ b/src/kudu/cfile/cfile_reader.cc
@@ -21,6 +21,7 @@
 #include <cstring>
 #include <memory>
 #include <ostream>
+#include <utility>
 
 #include <gflags/gflags.h>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/cfile/cfile_writer.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile_writer.cc b/src/kudu/cfile/cfile_writer.cc
index e0a07e4..c438585 100644
--- a/src/kudu/cfile/cfile_writer.cc
+++ b/src/kudu/cfile/cfile_writer.cc
@@ -36,8 +36,9 @@
 #include "kudu/common/schema.h"
 #include "kudu/common/types.h"
 #include "kudu/gutil/port.h"
-#include "kudu/util/coding.h"
+#include "kudu/util/array_view.h" // IWYU pragma: keep
 #include "kudu/util/coding-inl.h"
+#include "kudu/util/coding.h"
 #include "kudu/util/compression/compression_codec.h"
 #include "kudu/util/crc.h"
 #include "kudu/util/debug/trace_event.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/batcher.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/batcher.cc b/src/kudu/client/batcher.cc
index 0acd43a..1b7e2b8 100644
--- a/src/kudu/client/batcher.cc
+++ b/src/kudu/client/batcher.cc
@@ -17,7 +17,6 @@
 
 #include "kudu/client/batcher.h"
 
-#include <algorithm>
 #include <cstddef>
 #include <memory>
 #include <mutex>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.cc b/src/kudu/client/client.cc
index 8f76581..aed362d 100644
--- a/src/kudu/client/client.cc
+++ b/src/kudu/client/client.cc
@@ -17,7 +17,6 @@
 
 #include "kudu/client/client.h"
 
-#include <algorithm>
 #include <cstdlib>
 #include <memory>
 #include <ostream>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/meta_cache.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/meta_cache.h b/src/kudu/client/meta_cache.h
index dd745ee..bd5e72e 100644
--- a/src/kudu/client/meta_cache.h
+++ b/src/kudu/client/meta_cache.h
@@ -19,12 +19,12 @@
 #ifndef KUDU_CLIENT_META_CACHE_H
 #define KUDU_CLIENT_META_CACHE_H
 
-#include <algorithm>
 #include <map>
 #include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/partitioner-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/partitioner-internal.h b/src/kudu/client/partitioner-internal.h
index 861a7b9..c09ede2 100644
--- a/src/kudu/client/partitioner-internal.h
+++ b/src/kudu/client/partitioner-internal.h
@@ -16,9 +16,9 @@
 // under the License.
 #pragma once
 
-#include <algorithm>
 #include <map>
 #include <string>
+#include <utility>
 
 #include "kudu/client/client.h"
 #include "kudu/client/shared_ptr.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/replica-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/replica-internal.cc b/src/kudu/client/replica-internal.cc
index 23079fd..156d8f4 100644
--- a/src/kudu/client/replica-internal.cc
+++ b/src/kudu/client/replica-internal.cc
@@ -17,8 +17,8 @@
 
 #include "kudu/client/replica-internal.h"
 
-#include <algorithm>
 #include <memory>
+#include <utility>
 
 #include "kudu/client/client.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/scan_configuration.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/scan_configuration.cc b/src/kudu/client/scan_configuration.cc
index f320ab2..11abb80 100644
--- a/src/kudu/client/scan_configuration.cc
+++ b/src/kudu/client/scan_configuration.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/client/scan_configuration.h"
 
-#include <algorithm>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "kudu/client/client.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/scan_token-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/scan_token-test.cc b/src/kudu/client/scan_token-test.cc
index 9c879e2..d315518 100644
--- a/src/kudu/client/scan_token-test.cc
+++ b/src/kudu/client/scan_token-test.cc
@@ -15,13 +15,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <atomic>
 #include <cstdint>
 #include <memory>
 #include <string>
 #include <thread>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/schema.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/schema.cc b/src/kudu/client/schema.cc
index a694c72..968160b 100644
--- a/src/kudu/client/schema.cc
+++ b/src/kudu/client/schema.cc
@@ -17,11 +17,11 @@
 
 #include "kudu/client/schema.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <ostream>
 #include <unordered_map>
+#include <utility>
 
 #include <boost/optional/optional.hpp>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/session-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/session-internal.cc b/src/kudu/client/session-internal.cc
index fe22655..a4a3092 100644
--- a/src/kudu/client/session-internal.cc
+++ b/src/kudu/client/session-internal.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/client/session-internal.h"
 
-#include <algorithm>
 #include <memory>
 #include <mutex>
+#include <utility>
 
 #include <boost/bind.hpp> // IWYU pragma: keep
 #include <boost/function.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/table-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/table-internal.cc b/src/kudu/client/table-internal.cc
index a4640bd..d7ab570 100644
--- a/src/kudu/client/table-internal.cc
+++ b/src/kudu/client/table-internal.cc
@@ -17,8 +17,8 @@
 
 #include "kudu/client/table-internal.h"
 
-#include <algorithm>
 #include <string>
+#include <utility>
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/table_alterer-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/table_alterer-internal.cc b/src/kudu/client/table_alterer-internal.cc
index 244c3b4..2baebdf 100644
--- a/src/kudu/client/table_alterer-internal.cc
+++ b/src/kudu/client/table_alterer-internal.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/client/table_alterer-internal.h"
 
-#include <algorithm>
 #include <ostream>
 #include <string>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/client/tablet_server-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/tablet_server-internal.cc b/src/kudu/client/tablet_server-internal.cc
index c46392b..bd3b30b 100644
--- a/src/kudu/client/tablet_server-internal.cc
+++ b/src/kudu/client/tablet_server-internal.cc
@@ -17,8 +17,8 @@
 
 #include "kudu/client/tablet_server-internal.h"
 
-#include <algorithm>
 #include <string>
+#include <utility>
 
 #include "kudu/util/net/net_util.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/codegen/jit_wrapper.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/jit_wrapper.cc b/src/kudu/codegen/jit_wrapper.cc
index 8923a33..8515679 100644
--- a/src/kudu/codegen/jit_wrapper.cc
+++ b/src/kudu/codegen/jit_wrapper.cc
@@ -17,7 +17,7 @@
 
 #include "kudu/codegen/jit_wrapper.h"
 
-#include <algorithm>
+#include <utility>
 
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/codegen/module_builder.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/module_builder.cc b/src/kudu/codegen/module_builder.cc
index 0b0834d..cc8492b 100644
--- a/src/kudu/codegen/module_builder.cc
+++ b/src/kudu/codegen/module_builder.cc
@@ -17,11 +17,11 @@
 
 #include "kudu/codegen/module_builder.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <sstream>
 #include <string>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/common/partial_row.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/partial_row.cc b/src/kudu/common/partial_row.cc
index f82df8e..c52da89 100644
--- a/src/kudu/common/partial_row.cc
+++ b/src/kudu/common/partial_row.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/common/partial_row.h"
 
-#include <algorithm>
 #include <cstring>
 #include <string>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/common/partition_pruner-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/partition_pruner-test.cc b/src/kudu/common/partition_pruner-test.cc
index 467b54c..0208529 100644
--- a/src/kudu/common/partition_pruner-test.cc
+++ b/src/kudu/common/partition_pruner-test.cc
@@ -20,7 +20,6 @@
 #include <algorithm>
 #include <cstddef>
 #include <cstdint>
-#include <deque>
 #include <memory>
 #include <string>
 #include <utility>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/common/schema.h
----------------------------------------------------------------------
diff --git a/src/kudu/common/schema.h b/src/kudu/common/schema.h
index 4d8148c..d9fe0ab 100644
--- a/src/kudu/common/schema.h
+++ b/src/kudu/common/schema.h
@@ -52,14 +52,14 @@
   do { \
     DCHECK((s1).Equals((s2))) << "Schema " << (s1).ToString() \
                               << " does not match " << (s2).ToString(); \
-  } while (0);
+  } while (0)
 
 #define DCHECK_KEY_PROJECTION_SCHEMA_EQ(s1, s2) \
   do { \
     DCHECK((s1).KeyEquals((s2))) << "Key-Projection Schema " \
                                  << (s1).ToString() << " does not match " \
                                  << (s2).ToString(); \
-  } while (0);
+  } while (0)
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/consensus_meta-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_meta-test.cc b/src/kudu/consensus/consensus_meta-test.cc
index 48fa035..a56b690 100644
--- a/src/kudu/consensus/consensus_meta-test.cc
+++ b/src/kudu/consensus/consensus_meta-test.cc
@@ -15,6 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstddef>
 #include <cstdint>
 #include <memory>
 #include <ostream>
@@ -31,15 +32,13 @@
 #include "kudu/consensus/quorum_util.h"
 #include "kudu/fs/fs_manager.h"
 #include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/util/net/net_util.h"
 #include "kudu/util/pb_util.h"
 #include "kudu/util/status.h"
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
-#define ASSERT_VALUES_EQUAL(cmeta, opid_index, uuid, term) \
-  ASSERT_NO_FATAL_FAILURE(AssertValuesEqual(cmeta, opid_index, uuid, term))
-
 namespace kudu {
 namespace consensus {
 
@@ -101,7 +100,7 @@ TEST_F(ConsensusMetadataTest, TestCreateLoad) {
   // Load the file.
   scoped_refptr<ConsensusMetadata> cmeta;
   ASSERT_OK(ConsensusMetadata::Load(&fs_manager_, kTabletId, fs_manager_.uuid(), &cmeta));
-  ASSERT_VALUES_EQUAL(cmeta, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm);
+  NO_FATALS(AssertValuesEqual(cmeta, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm));
   ASSERT_GT(cmeta->on_disk_size(), 0);
 }
 
@@ -122,7 +121,7 @@ TEST_F(ConsensusMetadataTest, TestDeferredCreateLoad) {
   // Flush; now the file will be there.
   ASSERT_OK(writer->Flush());
   ASSERT_OK(ConsensusMetadata::Load(&fs_manager_, kTabletId, fs_manager_.uuid(), &reader));
-  ASSERT_VALUES_EQUAL(reader, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm);
+  NO_FATALS(AssertValuesEqual(reader, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm));
 }
 
 // Ensure that Create() will not overwrite an existing file.
@@ -160,7 +159,7 @@ TEST_F(ConsensusMetadataTest, TestFlush) {
   {
     scoped_refptr<ConsensusMetadata> cmeta_read;
     ASSERT_OK(ConsensusMetadata::Load(&fs_manager_, kTabletId, fs_manager_.uuid(), &cmeta_read));
-    ASSERT_VALUES_EQUAL(cmeta_read, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm);
+    NO_FATALS(AssertValuesEqual(cmeta_read, kInvalidOpIdIndex, fs_manager_.uuid(), kInitialTerm));
     ASSERT_GT(cmeta->on_disk_size(), 0);
   }
 
@@ -170,7 +169,7 @@ TEST_F(ConsensusMetadataTest, TestFlush) {
   {
     scoped_refptr<ConsensusMetadata> cmeta_read;
     ASSERT_OK(ConsensusMetadata::Load(&fs_manager_, kTabletId, fs_manager_.uuid(), &cmeta_read));
-    ASSERT_VALUES_EQUAL(cmeta_read, kInvalidOpIdIndex, fs_manager_.uuid(), kNewTerm);
+    NO_FATALS(AssertValuesEqual(cmeta_read, kInvalidOpIdIndex, fs_manager_.uuid(), kNewTerm));
     ASSERT_EQ(cmeta_size, cmeta_read->on_disk_size());
   }
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/consensus_meta.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_meta.cc b/src/kudu/consensus/consensus_meta.cc
index bf5418f..d4702c7 100644
--- a/src/kudu/consensus/consensus_meta.cc
+++ b/src/kudu/consensus/consensus_meta.cc
@@ -16,9 +16,9 @@
 // under the License.
 #include "kudu/consensus/consensus_meta.h"
 
-#include <algorithm>
 #include <mutex>
 #include <ostream>
+#include <utility>
 
 #include <gflags/gflags.h>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/consensus_meta_manager-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_meta_manager-stress-test.cc b/src/kudu/consensus/consensus_meta_manager-stress-test.cc
index 9e524aa..5176ba4 100644
--- a/src/kudu/consensus/consensus_meta_manager-stress-test.cc
+++ b/src/kudu/consensus/consensus_meta_manager-stress-test.cc
@@ -17,7 +17,6 @@
 
 #include <unistd.h>
 
-#include <algorithm>
 #include <atomic>
 #include <cstdint>
 #include <memory>
@@ -26,6 +25,7 @@
 #include <string>
 #include <thread>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/consensus_meta_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_meta_manager.cc b/src/kudu/consensus/consensus_meta_manager.cc
index 1aaf6c4..64fe6ac 100644
--- a/src/kudu/consensus/consensus_meta_manager.cc
+++ b/src/kudu/consensus/consensus_meta_manager.cc
@@ -16,8 +16,8 @@
 // under the License.
 #include "kudu/consensus/consensus_meta_manager.h"
 
-#include <algorithm>
 #include <mutex>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/consensus_peers-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_peers-test.cc b/src/kudu/consensus/consensus_peers-test.cc
index 8641e75..e69dc56 100644
--- a/src/kudu/consensus/consensus_peers-test.cc
+++ b/src/kudu/consensus/consensus_peers-test.cc
@@ -16,10 +16,10 @@
 // under the License.
 
 #include <cstddef>
-#include <algorithm>
 #include <memory>
 #include <string>
 #include <type_traits>
+#include <utility>
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/leader_election-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/leader_election-test.cc b/src/kudu/consensus/leader_election-test.cc
index c78fec7..cec04c3 100644
--- a/src/kudu/consensus/leader_election-test.cc
+++ b/src/kudu/consensus/leader_election-test.cc
@@ -17,17 +17,17 @@
 
 #include "kudu/consensus/leader_election.h"
 
-#include <algorithm>
 #include <functional>
 #include <memory>
 #include <ostream>
 #include <string>
 #include <type_traits>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
-#include <gtest/gtest.h>
 #include <glog/logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/common/wire_protocol.h"
 #include "kudu/consensus/consensus-test-util.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/log.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/log.cc b/src/kudu/consensus/log.cc
index b2ef6f4..fe642a6 100644
--- a/src/kudu/consensus/log.cc
+++ b/src/kudu/consensus/log.cc
@@ -17,12 +17,12 @@
 
 #include "kudu/consensus/log.h"
 
-#include <algorithm>
 #include <cerrno>
 #include <cstdint>
 #include <memory>
 #include <mutex>
 #include <ostream>
+#include <utility>
 
 #include <boost/range/adaptor/reversed.hpp>
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/log_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/log_util.cc b/src/kudu/consensus/log_util.cc
index ad779e1..07fba47 100644
--- a/src/kudu/consensus/log_util.cc
+++ b/src/kudu/consensus/log_util.cc
@@ -32,6 +32,7 @@
 #include "kudu/gutil/strings/split.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/strings/util.h"
+#include "kudu/util/array_view.h" // IWYU pragma: keep
 #include "kudu/util/coding-inl.h"
 #include "kudu/util/coding.h"
 #include "kudu/util/compression/compression.pb.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/raft_consensus.h
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/raft_consensus.h b/src/kudu/consensus/raft_consensus.h
index 50d4790..72e7590 100644
--- a/src/kudu/consensus/raft_consensus.h
+++ b/src/kudu/consensus/raft_consensus.h
@@ -17,12 +17,12 @@
 
 #pragma once
 
-#include <algorithm>
 #include <cstdint>
 #include <iosfwd>
 #include <memory>
 #include <mutex>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/consensus/raft_consensus_quorum-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/raft_consensus_quorum-test.cc b/src/kudu/consensus/raft_consensus_quorum-test.cc
index 1c7684d..b6efb6b 100644
--- a/src/kudu/consensus/raft_consensus_quorum-test.cc
+++ b/src/kudu/consensus/raft_consensus_quorum-test.cc
@@ -25,6 +25,7 @@
 #include <unordered_set>
 #include <vector>
 
+#include <boost/optional/optional.hpp>
 #include <gflags/gflags_declare.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
@@ -64,7 +65,6 @@
 #include "kudu/gutil/strings/strcat.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/async_util.h"
-#include "kudu/util/make_shared.h"
 #include "kudu/util/mem_tracker.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/monotime.h"
@@ -80,9 +80,6 @@ DECLARE_bool(enable_leader_failure_detection);
 
 METRIC_DECLARE_entity(tablet);
 
-#define REPLICATE_SEQUENCE_OF_MESSAGES(a, b, c, d, e, f, g) \
-  ASSERT_NO_FATAL_FAILURE(ReplicateSequenceOfMessages(a, b, c, d, e, f, g))
-
 using kudu::pb_util::SecureShortDebugString;
 using kudu::log::Log;
 using kudu::log::LogEntryPB;
@@ -90,7 +87,6 @@ using kudu::log::LogOptions;
 using kudu::log::LogReader;
 using std::shared_ptr;
 using std::string;
-using std::unique_ptr;
 using std::vector;
 using strings::Substitute;
 using strings::SubstituteAndAppend;
@@ -609,13 +605,9 @@ TEST_F(RaftConsensusQuorumTest, TestFollowersReplicateAndCommitMessage) {
   OpId last_op_id;
   vector<scoped_refptr<ConsensusRound>> rounds;
   shared_ptr<Synchronizer> commit_sync;
-  REPLICATE_SEQUENCE_OF_MESSAGES(1,
-                                 kLeaderIdx,
-                                 WAIT_FOR_ALL_REPLICAS,
-                                 DONT_COMMIT,
-                                 &last_op_id,
-                                 &rounds,
-                                 &commit_sync);
+  NO_FATALS(ReplicateSequenceOfMessages(
+      1, kLeaderIdx, WAIT_FOR_ALL_REPLICAS, DONT_COMMIT,
+      &last_op_id, &rounds, &commit_sync));
 
   // Commit the operation
   ASSERT_OK(CommitDummyMessage(kLeaderIdx, rounds[0].get(), &commit_sync));
@@ -652,13 +644,9 @@ TEST_F(RaftConsensusQuorumTest, TestFollowersReplicateAndCommitSequence) {
   vector<scoped_refptr<ConsensusRound>> rounds;
   shared_ptr<Synchronizer> commit_sync;
 
-  REPLICATE_SEQUENCE_OF_MESSAGES(seq_size,
-                                 kLeaderIdx,
-                                 WAIT_FOR_ALL_REPLICAS,
-                                 DONT_COMMIT,
-                                 &last_op_id,
-                                 &rounds,
-                                 &commit_sync);
+  NO_FATALS(ReplicateSequenceOfMessages(
+      seq_size, kLeaderIdx, WAIT_FOR_ALL_REPLICAS, DONT_COMMIT,
+      &last_op_id, &rounds, &commit_sync));
 
   // Commit the operations, but wait for the replicates to finish first
   for (const scoped_refptr<ConsensusRound>& round : rounds) {
@@ -694,13 +682,9 @@ TEST_F(RaftConsensusQuorumTest, TestConsensusContinuesIfAMinorityFallsBehind) {
 
     // If the locked replica would stop consensus we would hang here
     // as we wait for operations to be replicated to a majority.
-    ASSERT_NO_FATAL_FAILURE(ReplicateSequenceOfMessages(
-                              10,
-                              kLeaderIdx,
-                              WAIT_FOR_MAJORITY,
-                              COMMIT_ONE_BY_ONE,
-                              &last_replicate,
-                              &rounds));
+    NO_FATALS(ReplicateSequenceOfMessages(
+        10, kLeaderIdx, WAIT_FOR_MAJORITY, COMMIT_ONE_BY_ONE,
+        &last_replicate, &rounds));
 
     // Follower 1 should be fine (Were we to wait for follower0's replicate
     // this would hang here). We know he must have replicated but make sure
@@ -894,13 +878,9 @@ TEST_F(RaftConsensusQuorumTest, TestLeaderElectionWithQuiescedQuorum) {
   for (int current_config_size = kInitialNumPeers;
        current_config_size >= kInitialNumPeers - 1;
        current_config_size--) {
-    REPLICATE_SEQUENCE_OF_MESSAGES(10,
-                                   current_config_size - 1, // The index of the leader.
-                                   WAIT_FOR_ALL_REPLICAS,
-                                   COMMIT_ONE_BY_ONE,
-                                   &last_op_id,
-                                   &rounds,
-                                   &last_commit_sync);
+    NO_FATALS(ReplicateSequenceOfMessages(
+        10, current_config_size - 1, WAIT_FOR_ALL_REPLICAS, COMMIT_ONE_BY_ONE,
+        &last_op_id, &rounds, &last_commit_sync));
 
     // Make sure the last operation is committed everywhere
     ASSERT_OK(last_commit_sync->Wait());
@@ -934,13 +914,9 @@ TEST_F(RaftConsensusQuorumTest, TestLeaderElectionWithQuiescedQuorum) {
         << "Expected only one consensus metadata flush for a leader election";
 
     // ... replicating a set of messages to the new leader should now be possible.
-    REPLICATE_SEQUENCE_OF_MESSAGES(10,
-                                   current_config_size - 2, // The index of the new leader.
-                                   WAIT_FOR_MAJORITY,
-                                   COMMIT_ONE_BY_ONE,
-                                   &last_op_id,
-                                   &rounds,
-                                   &last_commit_sync);
+    NO_FATALS(ReplicateSequenceOfMessages(
+        10, current_config_size - 2, WAIT_FOR_MAJORITY, COMMIT_ONE_BY_ONE,
+        &last_op_id, &rounds, &last_commit_sync));
 
     // Make sure the last operation is committed everywhere
     ASSERT_OK(last_commit_sync->Wait());
@@ -959,13 +935,9 @@ TEST_F(RaftConsensusQuorumTest, TestReplicasEnforceTheLogMatchingProperty) {
   OpId last_op_id;
   shared_ptr<Synchronizer> last_commit_sync;
   vector<scoped_refptr<ConsensusRound>> rounds;
-  REPLICATE_SEQUENCE_OF_MESSAGES(10,
-                                 2, // The index of the initial leader.
-                                 WAIT_FOR_ALL_REPLICAS,
-                                 COMMIT_ONE_BY_ONE,
-                                 &last_op_id,
-                                 &rounds,
-                                 &last_commit_sync);
+  NO_FATALS(ReplicateSequenceOfMessages(
+      10, 2, WAIT_FOR_ALL_REPLICAS, COMMIT_ONE_BY_ONE,
+      &last_op_id, &rounds, &last_commit_sync));
 
   // Make sure the last operation is committed everywhere
   ASSERT_OK(last_commit_sync->Wait());
@@ -1027,13 +999,9 @@ TEST_F(RaftConsensusQuorumTest, TestRequestVote) {
   OpId last_op_id;
   shared_ptr<Synchronizer> last_commit_sync;
   vector<scoped_refptr<ConsensusRound>> rounds;
-  REPLICATE_SEQUENCE_OF_MESSAGES(10,
-                                 2, // The index of the initial leader.
-                                 WAIT_FOR_ALL_REPLICAS,
-                                 COMMIT_ONE_BY_ONE,
-                                 &last_op_id,
-                                 &rounds,
-                                 &last_commit_sync);
+  NO_FATALS(ReplicateSequenceOfMessages(
+      10, 2, WAIT_FOR_ALL_REPLICAS, COMMIT_ONE_BY_ONE,
+      &last_op_id, &rounds, &last_commit_sync));
 
   // Make sure the last operation is committed everywhere
   ASSERT_OK(last_commit_sync->Wait());

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/block_manager-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager-stress-test.cc b/src/kudu/fs/block_manager-stress-test.cc
index ba85bef..80d4f2f 100644
--- a/src/kudu/fs/block_manager-stress-test.cc
+++ b/src/kudu/fs/block_manager-stress-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cmath>
 #include <cstdint>
 #include <cstring>
@@ -25,6 +24,7 @@
 #include <ostream>
 #include <string>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/block_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager-test.cc b/src/kudu/fs/block_manager-test.cc
index c681ca5..bb363db 100644
--- a/src/kudu/fs/block_manager-test.cc
+++ b/src/kudu/fs/block_manager-test.cc
@@ -46,6 +46,7 @@
 #include "kudu/gutil/map-util.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/substitute.h"
+#include "kudu/util/array_view.h" // IWYU pragma: keep
 #include "kudu/util/env.h"
 #include "kudu/util/mem_tracker.h"
 #include "kudu/util/metrics.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/block_manager.h
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager.h b/src/kudu/fs/block_manager.h
index 2bd7737..e6da595 100644
--- a/src/kudu/fs/block_manager.h
+++ b/src/kudu/fs/block_manager.h
@@ -17,15 +17,14 @@
 
 #pragma once
 
-#include <algorithm>
 #include <cstddef>
 #include <cstdint>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "kudu/gutil/ref_counted.h"
-#include "kudu/util/array_view.h"
 #include "kudu/util/status.h"
 
 namespace kudu {
@@ -36,6 +35,9 @@ class MemTracker;
 class MetricEntity;
 class Slice;
 
+template <typename T>
+class ArrayView;
+
 namespace fs {
 
 class BlockManager;

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/block_manager_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager_util-test.cc b/src/kudu/fs/block_manager_util-test.cc
index 75609fd..800aac1 100644
--- a/src/kudu/fs/block_manager_util-test.cc
+++ b/src/kudu/fs/block_manager_util-test.cc
@@ -15,10 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/block_manager_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager_util.cc b/src/kudu/fs/block_manager_util.cc
index 6ba5278..baa064f 100644
--- a/src/kudu/fs/block_manager_util.cc
+++ b/src/kudu/fs/block_manager_util.cc
@@ -16,11 +16,11 @@
 // under the License.
 #include "kudu/fs/block_manager_util.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <ostream>
 #include <set>
 #include <unordered_map>
+#include <utility>
 
 #include <gflags/gflags_declare.h>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/data_dirs.h
----------------------------------------------------------------------
diff --git a/src/kudu/fs/data_dirs.h b/src/kudu/fs/data_dirs.h
index 96a7cfa..b1de012 100644
--- a/src/kudu/fs/data_dirs.h
+++ b/src/kudu/fs/data_dirs.h
@@ -17,13 +17,13 @@
 
 #pragma once
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <mutex>
 #include <set>
 #include <string>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/file_block_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/file_block_manager.cc b/src/kudu/fs/file_block_manager.cc
index dc7d1cd..fdb9cb0 100644
--- a/src/kudu/fs/file_block_manager.cc
+++ b/src/kudu/fs/file_block_manager.cc
@@ -17,7 +17,6 @@
 
 #include "kudu/fs/file_block_manager.h"
 
-#include <algorithm>
 #include <cstddef>
 #include <memory>
 #include <mutex>
@@ -25,6 +24,7 @@
 #include <ostream>
 #include <set>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags_declare.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/fs-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/fs/fs-test-util.h b/src/kudu/fs/fs-test-util.h
index be42f47..7fa8ee2 100644
--- a/src/kudu/fs/fs-test-util.h
+++ b/src/kudu/fs/fs-test-util.h
@@ -23,6 +23,7 @@
 #include <vector>
 
 #include "kudu/fs/block_manager.h"
+#include "kudu/util/array_view.h"
 #include "kudu/util/malloc.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/fs/fs_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/fs_manager.cc b/src/kudu/fs/fs_manager.cc
index 39a386a..d85f3f7 100644
--- a/src/kudu/fs/fs_manager.cc
+++ b/src/kudu/fs/fs_manager.cc
@@ -17,7 +17,6 @@
 
 #include "kudu/fs/fs_manager.h"
 
-#include <algorithm>
 #include <cinttypes>
 #include <ctime>
 #include <deque>
@@ -25,6 +24,7 @@
 #include <map>
 #include <set>
 #include <unordered_set>
+#include <utility>
 
 #include <boost/optional/optional.hpp>
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/atomicops-internals-x86.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/atomicops-internals-x86.cc b/src/kudu/gutil/atomicops-internals-x86.cc
index 92e1e58..24b733e 100644
--- a/src/kudu/gutil/atomicops-internals-x86.cc
+++ b/src/kudu/gutil/atomicops-internals-x86.cc
@@ -25,11 +25,12 @@
 
 #include "kudu/gutil/atomicops-internals-x86.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <glog/logging.h>
 
 #include "kudu/gutil/integral_types.h"
+// IWYU pragma: no_include "kudu/gutil/atomicops.h"
 
 // This file only makes sense with atomicops-internals-x86.h -- it
 // depends on structs that are defined in that file.  If atomicops.h

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/cpu.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/cpu.cc b/src/kudu/gutil/cpu.cc
index cd2b16c..17063a0 100644
--- a/src/kudu/gutil/cpu.cc
+++ b/src/kudu/gutil/cpu.cc
@@ -5,7 +5,7 @@
 #include "kudu/gutil/cpu.h"
 
 #include <cstring>
-#include <algorithm>
+#include <utility>
 
 #include "kudu/gutil/integral_types.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/hash/city.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/hash/city.cc b/src/kudu/gutil/hash/city.cc
index e3ff7fc..ffcc460 100644
--- a/src/kudu/gutil/hash/city.cc
+++ b/src/kudu/gutil/hash/city.cc
@@ -17,10 +17,10 @@
 #include "kudu/gutil/hash/city.h"
 
 #include <sys/types.h>
+
 #include <algorithm>
 #include <iterator>
 #include <utility>
-#include <vector>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/ref_counted_memory.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/ref_counted_memory.cc b/src/kudu/gutil/ref_counted_memory.cc
index babd0ff..67bbc1a 100644
--- a/src/kudu/gutil/ref_counted_memory.cc
+++ b/src/kudu/gutil/ref_counted_memory.cc
@@ -4,9 +4,9 @@
 
 #include "kudu/gutil/ref_counted_memory.h"
 
-#include <algorithm>
 #include <cstdlib>
 #include <cstring>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/split.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.cc b/src/kudu/gutil/strings/split.cc
index 0ef09d0..67ddefb 100644
--- a/src/kudu/gutil/strings/split.cc
+++ b/src/kudu/gutil/strings/split.cc
@@ -4,6 +4,7 @@
 
 #include "kudu/gutil/strings/split.h"
 
+#include <algorithm>
 #include <cassert>
 #include <cstdlib>
 #include <cstring>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/split.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.h b/src/kudu/gutil/strings/split.h
index d133efb..d2fd9cb 100644
--- a/src/kudu/gutil/strings/split.h
+++ b/src/kudu/gutil/strings/split.h
@@ -20,9 +20,8 @@
 #ifndef STRINGS_SPLIT_H_
 #define STRINGS_SPLIT_H_
 
-#include <stddef.h>
 
-#include <algorithm>
+#include <cstddef>
 #include <map>
 #include <set>
 #include <string>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/strcat.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.h b/src/kudu/gutil/strings/strcat.h
index f51ba37..cb8ded6 100644
--- a/src/kudu/gutil/strings/strcat.h
+++ b/src/kudu/gutil/strings/strcat.h
@@ -8,9 +8,8 @@
 #define STRINGS_STRCAT_H_
 
 #include <cstring>
-
-#include <algorithm>
 #include <string>
+#include <utility>
 
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/strings/numbers.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/stringpiece.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/stringpiece.cc b/src/kudu/gutil/strings/stringpiece.cc
index 3532c15..0da3ea5 100644
--- a/src/kudu/gutil/strings/stringpiece.cc
+++ b/src/kudu/gutil/strings/stringpiece.cc
@@ -4,12 +4,9 @@
 
 #include "kudu/gutil/strings/stringpiece.h"
 
+#include <algorithm>
 #include <climits>
 #include <cstring>
-
-#include <algorithm>
-#include <deque>
-#include <memory>
 #include <ostream>
 #include <string>
 
@@ -19,12 +16,7 @@
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/memutil.h"
 
-using std::copy;
-using std::max;
 using std::min;
-using std::reverse;
-using std::sort;
-using std::swap;
 using std::string;
 
 namespace std {

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/strip.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strip.cc b/src/kudu/gutil/strings/strip.cc
index c4ea720..1cad249 100644
--- a/src/kudu/gutil/strings/strip.cc
+++ b/src/kudu/gutil/strings/strip.cc
@@ -10,20 +10,12 @@
 #include <cstring>
 
 #include <algorithm>
-#include <iterator>
 #include <string>
-#include <vector>
 
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/stringpiece.h"
 
-using std::copy;
-using std::max;
-using std::min;
-using std::reverse;
-using std::sort;
 using std::string;
-using std::swap;
 
 string StripPrefixString(StringPiece str, const StringPiece& prefix) {
   if (str.starts_with(prefix))

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/gutil/strings/util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/util.cc b/src/kudu/gutil/strings/util.cc
index 5fcf405..f5b033b 100644
--- a/src/kudu/gutil/strings/util.cc
+++ b/src/kudu/gutil/strings/util.cc
@@ -7,16 +7,15 @@
 
 #include "kudu/gutil/strings/util.h"
 
+#include <algorithm>
 #include <cassert>
 #include <cstdarg>
 #include <cstdio>
 #include <cstring>
-#include <ctime>           // for FastTimeToBuffer()
-
-#include <algorithm>
-#include <deque>
+#include <ctime>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>
@@ -27,11 +26,7 @@
 #include "kudu/gutil/stl_util.h"  // for string_as_array, STLAppendToString
 #include "kudu/gutil/utf/utf.h"
 
-using std::copy;
-using std::max;
 using std::min;
-using std::reverse;
-using std::sort;
 using std::string;
 using std::swap;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/exactly_once_writes-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/exactly_once_writes-itest.cc b/src/kudu/integration-tests/exactly_once_writes-itest.cc
index 6220e6d..400e5e7 100644
--- a/src/kudu/integration-tests/exactly_once_writes-itest.cc
+++ b/src/kudu/integration-tests/exactly_once_writes-itest.cc
@@ -15,11 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster-itest-base.cc b/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
index 94c313e..0a22c9e 100644
--- a/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
+++ b/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
 
-#include <algorithm>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/external_mini_cluster-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster-test.cc b/src/kudu/integration-tests/external_mini_cluster-test.cc
index 96b2e5d..9a399fa 100644
--- a/src/kudu/integration-tests/external_mini_cluster-test.cc
+++ b/src/kudu/integration-tests/external_mini_cluster-test.cc
@@ -15,9 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/internal_mini_cluster.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/internal_mini_cluster.cc b/src/kudu/integration-tests/internal_mini_cluster.cc
index 889b04e..17153a0 100644
--- a/src/kudu/integration-tests/internal_mini_cluster.cc
+++ b/src/kudu/integration-tests/internal_mini_cluster.cc
@@ -17,10 +17,10 @@
 
 #include "kudu/integration-tests/internal_mini_cluster.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <ostream>
 #include <unordered_set>
+#include <utility>
 
 #include "kudu/client/client.h"
 #include "kudu/common/wire_protocol.pb.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/master-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/master-stress-test.cc b/src/kudu/integration-tests/master-stress-test.cc
index 131085d..7efd5d7 100644
--- a/src/kudu/integration-tests/master-stress-test.cc
+++ b/src/kudu/integration-tests/master-stress-test.cc
@@ -15,17 +15,17 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <mutex>
 #include <ostream>
 #include <string>
 #include <thread>
+#include <utility>
 #include <vector>
 
-#include <glog/logging.h>
 #include <gflags/gflags.h>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
 #include "kudu/client/client.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/open-readonly-fs-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/open-readonly-fs-itest.cc b/src/kudu/integration-tests/open-readonly-fs-itest.cc
index e1b11ce..c4b9b92 100644
--- a/src/kudu/integration-tests/open-readonly-fs-itest.cc
+++ b/src/kudu/integration-tests/open-readonly-fs-itest.cc
@@ -15,12 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <ostream>
 #include <string>
 #include <thread>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/token_signer-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/token_signer-itest.cc b/src/kudu/integration-tests/token_signer-itest.cc
index 6f46502..5c95914 100644
--- a/src/kudu/integration-tests/token_signer-itest.cc
+++ b/src/kudu/integration-tests/token_signer-itest.cc
@@ -16,32 +16,29 @@
 // under the License.
 
 #include <algorithm>
+#include <cstdint>
 #include <functional>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <vector>
 
 #include <gflags/gflags_declare.h>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/gutil/strings/substitute.h"
+#include "kudu/gutil/walltime.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
-#include "kudu/master/catalog_manager.h"
 #include "kudu/master/master.h"
-#include "kudu/master/master.proxy.h"
-#include "kudu/master/master_cert_authority.h"
 #include "kudu/master/mini_master.h"
 #include "kudu/rpc/messenger.h"
-#include "kudu/rpc/rpc_controller.h"
-#include "kudu/security/crypto.h"
 #include "kudu/security/token.pb.h"
 #include "kudu/security/token_signer.h"
 #include "kudu/security/token_verifier.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
-#include "kudu/util/make_shared.h"
-#include "kudu/util/pb_util.h"
-#include "kudu/util/slice.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/integration-tests/version_migration-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/version_migration-test.cc b/src/kudu/integration-tests/version_migration-test.cc
index 54dca92..6c87165 100644
--- a/src/kudu/integration-tests/version_migration-test.cc
+++ b/src/kudu/integration-tests/version_migration-test.cc
@@ -15,11 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
-#include <ostream>
 #include <memory>
+#include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/master/mini_master.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/mini_master.cc b/src/kudu/master/mini_master.cc
index f3229ff..1cfceb6 100644
--- a/src/kudu/master/mini_master.cc
+++ b/src/kudu/master/mini_master.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/master/mini_master.h"
 
-#include <algorithm>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags_declare.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/master/sys_catalog-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog-test.cc b/src/kudu/master/sys_catalog-test.cc
index 3bc959b..4e67d06 100644
--- a/src/kudu/master/sys_catalog-test.cc
+++ b/src/kudu/master/sys_catalog-test.cc
@@ -15,9 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gtest/gtest.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/master/ts_descriptor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/ts_descriptor.cc b/src/kudu/master/ts_descriptor.cc
index 01193d3..4072b33 100644
--- a/src/kudu/master/ts_descriptor.cc
+++ b/src/kudu/master/ts_descriptor.cc
@@ -17,11 +17,11 @@
 
 #include "kudu/master/ts_descriptor.h"
 
-#include <algorithm>
 #include <cmath>
 #include <mutex>
 #include <ostream>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/client_negotiation.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/client_negotiation.h b/src/kudu/rpc/client_negotiation.h
index 079108b..37d1136 100644
--- a/src/kudu/rpc/client_negotiation.h
+++ b/src/kudu/rpc/client_negotiation.h
@@ -17,11 +17,11 @@
 
 #pragma once
 
-#include <algorithm>
 #include <cstdlib>
 #include <memory>
 #include <set>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/connection.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/connection.h b/src/kudu/rpc/connection.h
index d85b52d..d64e557 100644
--- a/src/kudu/rpc/connection.h
+++ b/src/kudu/rpc/connection.h
@@ -18,13 +18,13 @@
 #ifndef KUDU_RPC_CONNECTION_H
 #define KUDU_RPC_CONNECTION_H
 
-#include <algorithm>
 #include <cstdint>
 #include <limits>
 #include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
+#include <utility>
 
 #include <boost/intrusive/list.hpp>
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/connection_id.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/connection_id.cc b/src/kudu/rpc/connection_id.cc
index 04c3990..7a3223e 100644
--- a/src/kudu/rpc/connection_id.cc
+++ b/src/kudu/rpc/connection_id.cc
@@ -17,8 +17,8 @@
 
 #include "kudu/rpc/connection_id.h"
 
-#include <algorithm>
 #include <cstddef>
+#include <utility>
 
 #include <boost/functional/hash/hash.hpp>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/exactly_once_rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/exactly_once_rpc-test.cc b/src/kudu/rpc/exactly_once_rpc-test.cc
index a368483..79336f3 100644
--- a/src/kudu/rpc/exactly_once_rpc-test.cc
+++ b/src/kudu/rpc/exactly_once_rpc-test.cc
@@ -17,13 +17,13 @@
 
 #include <unistd.h>
 
-#include <algorithm>
 #include <atomic>
 #include <cstdint>
 #include <cstdlib>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags_declare.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/inbound_call.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/inbound_call.h b/src/kudu/rpc/inbound_call.h
index ac903c6..f2c9f98 100644
--- a/src/kudu/rpc/inbound_call.h
+++ b/src/kudu/rpc/inbound_call.h
@@ -17,12 +17,12 @@
 #ifndef KUDU_RPC_INBOUND_CALL_H
 #define KUDU_RPC_INBOUND_CALL_H
 
-#include <algorithm>
 #include <cstddef>
 #include <cstdint>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/messenger.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/messenger.cc b/src/kudu/rpc/messenger.cc
index bfe38cc..ed463cf 100644
--- a/src/kudu/rpc/messenger.cc
+++ b/src/kudu/rpc/messenger.cc
@@ -17,13 +17,13 @@
 
 #include "kudu/rpc/messenger.h"
 
-#include <algorithm>
 #include <cstdlib>
 #include <functional>
 #include <mutex>
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 
 #include <boost/algorithm/string/predicate.hpp>
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/mt-rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/mt-rpc-test.cc b/src/kudu/rpc/mt-rpc-test.cc
index 8f67038..996aa7f 100644
--- a/src/kudu/rpc/mt-rpc-test.cc
+++ b/src/kudu/rpc/mt-rpc-test.cc
@@ -17,12 +17,12 @@
 
 #include "kudu/rpc/rpc-test-base.h"
 
-#include <algorithm>
 #include <cstddef>
 #include <memory>
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/negotiation-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/negotiation-test.cc b/src/kudu/rpc/negotiation-test.cc
index 2ea2596..fb4f240 100644
--- a/src/kudu/rpc/negotiation-test.cc
+++ b/src/kudu/rpc/negotiation-test.cc
@@ -20,7 +20,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#include <algorithm>
 #include <cstdio>
 #include <cstdlib>
 #include <functional>
@@ -28,6 +27,7 @@
 #include <ostream>
 #include <string>
 #include <thread>
+#include <utility>
 #include <vector>
 
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/negotiation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/negotiation.cc b/src/kudu/rpc/negotiation.cc
index f99fe2c..9013d8b 100644
--- a/src/kudu/rpc/negotiation.cc
+++ b/src/kudu/rpc/negotiation.cc
@@ -20,12 +20,12 @@
 #include <poll.h>
 #include <sys/socket.h>
 
-#include <algorithm>
 #include <cerrno>
 #include <ctime>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 
 #include <boost/optional/optional.hpp>
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/outbound_call.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/outbound_call.cc b/src/kudu/rpc/outbound_call.cc
index e300fe4..d4ca78b 100644
--- a/src/kudu/rpc/outbound_call.cc
+++ b/src/kudu/rpc/outbound_call.cc
@@ -15,13 +15,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <mutex>
 #include <string>
 #include <type_traits>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 
 #include <boost/function.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/protoc-gen-krpc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/protoc-gen-krpc.cc b/src/kudu/rpc/protoc-gen-krpc.cc
index ff0287f..18ab7ab 100644
--- a/src/kudu/rpc/protoc-gen-krpc.cc
+++ b/src/kudu/rpc/protoc-gen-krpc.cc
@@ -438,10 +438,10 @@ class CodeGenerator : public ::google::protobuf::compiler::CodeGenerator {
     Print(printer, *subs,
       "// THIS FILE IS AUTOGENERATED FROM $path$\n"
       "\n"
-      "#include <algorithm>\n"
       "#include <functional>\n"
       "#include <memory>\n"
       "#include <unordered_map>\n"
+      "#include <utility>\n"
       "\n"
       "#include <google/protobuf/message.h>\n"
       "\n"
@@ -559,6 +559,7 @@ class CodeGenerator : public ::google::protobuf::compiler::CodeGenerator {
       "#define KUDU_RPC_$upper_case$_PROXY_DOT_H\n"
       "\n"
       "#include <memory>\n"
+      "#include <string>\n"
       "\n"
       "#include \"kudu/rpc/proxy.h\"\n"
       "#include \"kudu/rpc/response_callback.h\"\n"
@@ -626,6 +627,7 @@ class CodeGenerator : public ::google::protobuf::compiler::CodeGenerator {
       "// THIS FILE IS AUTOGENERATED FROM $path$\n"
       "\n"
       "#include <string>\n"
+      "#include <utility>\n"
       "\n"
       "#include \"$path_no_extension$.pb.h\"\n"
       "#include \"$path_no_extension$.proxy.h\"\n"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/proxy.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/proxy.cc b/src/kudu/rpc/proxy.cc
index 87a1e48..54b8085 100644
--- a/src/kudu/rpc/proxy.cc
+++ b/src/kudu/rpc/proxy.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/rpc/proxy.h"
 
-#include <algorithm>
 #include <iostream>
 #include <memory>
+#include <utility>
 
 #include <boost/bind.hpp> // IWYU pragma: keep
 #include <boost/core/ref.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/reactor.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.h b/src/kudu/rpc/reactor.h
index 1237027..288e38e 100644
--- a/src/kudu/rpc/reactor.h
+++ b/src/kudu/rpc/reactor.h
@@ -36,13 +36,13 @@
 #include "kudu/rpc/messenger.h"
 #include "kudu/rpc/rpc_header.pb.h"
 #include "kudu/util/locks.h"
+#include "kudu/util/metrics.h"
 #include "kudu/util/monotime.h"
 #include "kudu/util/status.h"
 #include "kudu/util/thread.h"
 
 namespace kudu {
 
-class Histogram;
 class Sockaddr;
 class Socket;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/remote_method.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/remote_method.cc b/src/kudu/rpc/remote_method.cc
index 71995f2..24ca050 100644
--- a/src/kudu/rpc/remote_method.cc
+++ b/src/kudu/rpc/remote_method.cc
@@ -15,8 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <ostream>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/remote_user.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/remote_user.h b/src/kudu/rpc/remote_user.h
index c93a261..77ef294 100644
--- a/src/kudu/rpc/remote_user.h
+++ b/src/kudu/rpc/remote_user.h
@@ -16,8 +16,8 @@
 // under the License.
 #pragma once
 
-#include <algorithm>
 #include <string>
+#include <utility>
 
 #include <boost/optional/optional.hpp>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc-bench.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc-bench.cc b/src/kudu/rpc/rpc-bench.cc
index 5b25181..203498f 100644
--- a/src/kudu/rpc/rpc-bench.cc
+++ b/src/kudu/rpc/rpc-bench.cc
@@ -15,13 +15,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <cstdint>
 #include <functional>
 #include <memory>
 #include <ostream>
 #include <string>
 #include <thread>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc.h b/src/kudu/rpc/rpc.h
index 3cd57c0..bd195dc 100644
--- a/src/kudu/rpc/rpc.h
+++ b/src/kudu/rpc/rpc.h
@@ -17,9 +17,9 @@
 #ifndef KUDU_RPC_RPC_H
 #define KUDU_RPC_RPC_H
 
-#include <algorithm>
 #include <memory>
 #include <string>
+#include <utility>
 
 #include "kudu/gutil/callback.h"
 #include "kudu/gutil/macros.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc_context.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_context.cc b/src/kudu/rpc/rpc_context.cc
index d4faffb..9c3d154 100644
--- a/src/kudu/rpc/rpc_context.cc
+++ b/src/kudu/rpc/rpc_context.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/rpc/rpc_context.h"
 
-#include <algorithm>
 #include <memory>
 #include <ostream>
+#include <utility>
 
 #include <glog/logging.h>
 #include <google/protobuf/message.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc_controller.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_controller.cc b/src/kudu/rpc/rpc_controller.cc
index 5a07006..550e353 100644
--- a/src/kudu/rpc/rpc_controller.cc
+++ b/src/kudu/rpc/rpc_controller.cc
@@ -17,10 +17,10 @@
 
 #include "kudu/rpc/rpc_controller.h"
 
-#include <algorithm>
 #include <memory>
 #include <mutex>
 #include <ostream>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc_sidecar.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_sidecar.cc b/src/kudu/rpc/rpc_sidecar.cc
index 509f57d..f4d7730 100644
--- a/src/kudu/rpc/rpc_sidecar.cc
+++ b/src/kudu/rpc/rpc_sidecar.cc
@@ -17,8 +17,9 @@
 
 #include "kudu/rpc/rpc_sidecar.h"
 
-#include <algorithm>
 #include <cstdint>
+#include <memory>
+#include <utility>
 
 #include <google/protobuf/repeated_field.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/rpc_sidecar.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_sidecar.h b/src/kudu/rpc/rpc_sidecar.h
index 859f35f..bfbfcea 100644
--- a/src/kudu/rpc/rpc_sidecar.h
+++ b/src/kudu/rpc/rpc_sidecar.h
@@ -17,12 +17,11 @@
 #ifndef KUDU_RPC_RPC_SIDECAR_H
 #define KUDU_RPC_RPC_SIDECAR_H
 
-#include <cstdint>
 #include <memory>
 
 #include <google/protobuf/repeated_field.h> // IWYU pragma: keep
+#include <google/protobuf/stubs/port.h>
 
-#include "kudu/gutil/integral_types.h"
 #include "kudu/util/slice.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/server_negotiation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/server_negotiation.cc b/src/kudu/rpc/server_negotiation.cc
index 7ac21e0..7ddcae0 100644
--- a/src/kudu/rpc/server_negotiation.cc
+++ b/src/kudu/rpc/server_negotiation.cc
@@ -17,6 +17,7 @@
 
 #include "kudu/rpc/server_negotiation.h"
 
+#include <algorithm>
 #include <cstdint>
 #include <cstdlib>
 #include <memory>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/server_negotiation.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/server_negotiation.h b/src/kudu/rpc/server_negotiation.h
index 852a6ad..18d4e2a 100644
--- a/src/kudu/rpc/server_negotiation.h
+++ b/src/kudu/rpc/server_negotiation.h
@@ -17,10 +17,10 @@
 
 #pragma once
 
-#include <algorithm>
 #include <memory>
 #include <set>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/service_pool.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/service_pool.cc b/src/kudu/rpc/service_pool.cc
index b10e6c1..87a7064 100644
--- a/src/kudu/rpc/service_pool.cc
+++ b/src/kudu/rpc/service_pool.cc
@@ -17,12 +17,12 @@
 
 #include "kudu/rpc/service_pool.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <memory>
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <boost/optional/optional.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/rpc/user_credentials.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/user_credentials.cc b/src/kudu/rpc/user_credentials.cc
index 059b87a..1ce8777 100644
--- a/src/kudu/rpc/user_credentials.cc
+++ b/src/kudu/rpc/user_credentials.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/rpc/user_credentials.h"
 
-#include <algorithm>
 #include <cstddef>
 #include <string>
+#include <utility>
 
 #include <boost/functional/hash/hash.hpp>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/security/simple_acl.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/simple_acl.cc b/src/kudu/security/simple_acl.cc
index 3b6aa37..09cc6ab 100644
--- a/src/kudu/security/simple_acl.cc
+++ b/src/kudu/security/simple_acl.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/security/simple_acl.h"
 
-#include <algorithm>
 #include <cctype>
 #include <cstring>
+#include <utility>
 #include <vector>
 
 #include "kudu/gutil/map-util.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/security/tls_handshake.h
----------------------------------------------------------------------
diff --git a/src/kudu/security/tls_handshake.h b/src/kudu/security/tls_handshake.h
index f71771a..56020c4 100644
--- a/src/kudu/security/tls_handshake.h
+++ b/src/kudu/security/tls_handshake.h
@@ -17,9 +17,9 @@
 
 #pragma once
 
-#include <algorithm>
 #include <memory>
 #include <string>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/security/tls_socket.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/tls_socket.cc b/src/kudu/security/tls_socket.cc
index 58addfc..e756d5b 100644
--- a/src/kudu/security/tls_socket.cc
+++ b/src/kudu/security/tls_socket.cc
@@ -19,8 +19,8 @@
 
 #include <sys/uio.h>
 
-#include <algorithm>
 #include <cerrno>
+#include <utility>
 
 #include <glog/logging.h>
 #include <openssl/err.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/server/rpc_server.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/rpc_server.cc b/src/kudu/server/rpc_server.cc
index 8836958..6915cd4 100644
--- a/src/kudu/server/rpc_server.cc
+++ b/src/kudu/server/rpc_server.cc
@@ -15,10 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <algorithm>
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/server/server_base.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/server_base.cc b/src/kudu/server/server_base.cc
index 7cd7612..556cdca 100644
--- a/src/kudu/server/server_base.cc
+++ b/src/kudu/server/server_base.cc
@@ -17,11 +17,11 @@
 
 #include "kudu/server/server_base.h"
 
-#include <algorithm>
 #include <cstdint>
 #include <sstream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <boost/algorithm/string/predicate.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/server/webserver.h
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver.h b/src/kudu/server/webserver.h
index 6b7092f..f3f8ebc 100644
--- a/src/kudu/server/webserver.h
+++ b/src/kudu/server/webserver.h
@@ -17,10 +17,10 @@
 #ifndef KUDU_UTIL_WEBSERVER_H
 #define KUDU_UTIL_WEBSERVER_H
 
-#include <algorithm>
 #include <iosfwd>
 #include <map>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "kudu/gutil/port.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/cfile_set.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.h b/src/kudu/tablet/cfile_set.h
index 63decea..0a5f409 100644
--- a/src/kudu/tablet/cfile_set.h
+++ b/src/kudu/tablet/cfile_set.h
@@ -17,11 +17,11 @@
 #ifndef KUDU_TABLET_LAYER_BASEDATA_H
 #define KUDU_TABLET_LAYER_BASEDATA_H
 
-#include <algorithm>
 #include <cstddef>
 #include <cstdint>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <boost/container/flat_map.hpp>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction-test.cc b/src/kudu/tablet/compaction-test.cc
index a4d828a..0304102 100644
--- a/src/kudu/tablet/compaction-test.cc
+++ b/src/kudu/tablet/compaction-test.cc
@@ -23,6 +23,7 @@
 #include <numeric>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index 3c4e95c..076ae99 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -17,6 +17,7 @@
 
 #include "kudu/tablet/compaction.h"
 
+#include <algorithm>
 #include <cstdint>
 #include <deque>
 #include <memory>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/compaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.h b/src/kudu/tablet/compaction.h
index 38b82f0..ae4e7d3 100644
--- a/src/kudu/tablet/compaction.h
+++ b/src/kudu/tablet/compaction.h
@@ -17,11 +17,11 @@
 #ifndef KUDU_TABLET_COMPACTION_H
 #define KUDU_TABLET_COMPACTION_H
 
-#include <algorithm>
 #include <cstddef>
 #include <memory>
 #include <mutex>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/delta_applier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_applier.cc b/src/kudu/tablet/delta_applier.cc
index 64cf57a..73bc407 100644
--- a/src/kudu/tablet/delta_applier.cc
+++ b/src/kudu/tablet/delta_applier.cc
@@ -17,9 +17,9 @@
 
 #include "kudu/tablet/delta_applier.h"
 
-#include <algorithm>
 #include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/delta_tracker.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_tracker.cc b/src/kudu/tablet/delta_tracker.cc
index d291451..a7734bf 100644
--- a/src/kudu/tablet/delta_tracker.cc
+++ b/src/kudu/tablet/delta_tracker.cc
@@ -22,6 +22,7 @@
 #include <ostream>
 #include <set>
 #include <string>
+#include <utility>
 
 #include <boost/range/adaptor/reversed.hpp>
 #include <glog/logging.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/deltafile.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile.cc b/src/kudu/tablet/deltafile.cc
index e742793..32004d2 100644
--- a/src/kudu/tablet/deltafile.cc
+++ b/src/kudu/tablet/deltafile.cc
@@ -17,10 +17,10 @@
 
 #include "kudu/tablet/deltafile.h"
 
-#include <algorithm>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 
 #include <gflags/gflags.h>
 #include <gflags/gflags_declare.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/multi_column_writer.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/multi_column_writer.cc b/src/kudu/tablet/multi_column_writer.cc
index 60713b1..1ec669b 100644
--- a/src/kudu/tablet/multi_column_writer.cc
+++ b/src/kudu/tablet/multi_column_writer.cc
@@ -17,10 +17,10 @@
 
 #include "kudu/tablet/multi_column_writer.h"
 
-#include <algorithm>
 #include <memory>
 #include <ostream>
 #include <string>
+#include <utility>
 
 #include "kudu/cfile/cfile_util.h"
 #include "kudu/cfile/cfile_writer.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/row_op.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/row_op.cc b/src/kudu/tablet/row_op.cc
index c176707..e6e1330 100644
--- a/src/kudu/tablet/row_op.cc
+++ b/src/kudu/tablet/row_op.cc
@@ -17,8 +17,8 @@
 
 #include "kudu/tablet/row_op.h"
 
-#include <algorithm>
 #include <type_traits>
+#include <utility>
 
 #include <glog/logging.h>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/rowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset.cc b/src/kudu/tablet/rowset.cc
index be037b0..4cc31a1 100644
--- a/src/kudu/tablet/rowset.cc
+++ b/src/kudu/tablet/rowset.cc
@@ -17,10 +17,10 @@
 
 #include "kudu/tablet/rowset.h"
 
-#include <algorithm>
 #include <limits>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "kudu/common/generic_iterators.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/3e6e12a9/src/kudu/tablet/tablet.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.cc b/src/kudu/tablet/tablet.cc
index e38751f..76fb887 100644
--- a/src/kudu/tablet/tablet.cc
+++ b/src/kudu/tablet/tablet.cc
@@ -84,12 +84,10 @@
 #include "kudu/util/locks.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/maintenance_manager.h"
-#include "kudu/util/make_shared.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/monotime.h"
 #include "kudu/util/slice.h"
 #include "kudu/util/status_callback.h"
-#include "kudu/util/stopwatch.h"  // IWYU pragma: keep
 #include "kudu/util/throttler.h"
 #include "kudu/util/trace.h"
 #include "kudu/util/url-coding.h"


Mime
View raw message