kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [09/14] kudu git commit: [iwyu] first pass
Date Mon, 21 Aug 2017 21:03:56 GMT
http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/escaping.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/escaping.cc b/src/kudu/gutil/strings/escaping.cc
index 4128b92..b21f981 100644
--- a/src/kudu/gutil/strings/escaping.cc
+++ b/src/kudu/gutil/strings/escaping.cc
@@ -3,20 +3,21 @@
 
 #include "kudu/gutil/strings/escaping.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
+#include <cassert>
+#include <cstdio>
+#include <cstring>
 
 #include <limits>
+#include <ostream>
 #include <vector>
 
+#include "kudu/gutil/charmap.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/port.h"
-#include "kudu/gutil/gscoped_ptr.h"
-#include "kudu/gutil/strings/join.h"
-#include "kudu/gutil/utf/utf.h"  // for runetochar
-#include "kudu/gutil/charmap.h"
 #include "kudu/gutil/stl_util.h"
+#include "kudu/gutil/strings/strcat.h"
+#include "kudu/gutil/utf/utf.h"  // for runetochar
 
 using std::numeric_limits;
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/escaping.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/escaping.h b/src/kudu/gutil/strings/escaping.h
index 0d1f574..c39bf8a 100644
--- a/src/kudu/gutil/strings/escaping.h
+++ b/src/kudu/gutil/strings/escaping.h
@@ -27,7 +27,6 @@
 
 #include <glog/logging.h>
 
-#include "kudu/gutil/logging-inl.h"
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/charset.h"
 #include "kudu/gutil/strings/stringpiece.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/human_readable.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/human_readable.cc b/src/kudu/gutil/strings/human_readable.cc
index 2af0a35..4d9a8b7 100644
--- a/src/kudu/gutil/strings/human_readable.cc
+++ b/src/kudu/gutil/strings/human_readable.cc
@@ -2,12 +2,12 @@
 
 #include "kudu/gutil/strings/human_readable.h"
 
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cinttypes>
+#include <cstdlib>
+#include <cstring>
 
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
+
 #include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strings/strip.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/human_readable.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/human_readable.h b/src/kudu/gutil/strings/human_readable.h
index 53207f6..a19b9e7 100644
--- a/src/kudu/gutil/strings/human_readable.h
+++ b/src/kudu/gutil/strings/human_readable.h
@@ -9,7 +9,6 @@
 #include <functional>
 #include <string>
 
-#include "kudu/gutil/basictypes.h"
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/join.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/join.cc b/src/kudu/gutil/strings/join.cc
index 645e612..3d5515b 100644
--- a/src/kudu/gutil/strings/join.cc
+++ b/src/kudu/gutil/strings/join.cc
@@ -2,8 +2,11 @@
 
 #include "kudu/gutil/strings/join.h"
 
+#include <cstring>  // IWYU pragma: keep
+#include <ostream>
+
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
+
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/escaping.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/join.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/join.h b/src/kudu/gutil/strings/join.h
index cb5e11d..104ab90 100644
--- a/src/kudu/gutil/strings/join.h
+++ b/src/kudu/gutil/strings/join.h
@@ -7,23 +7,15 @@
 #ifndef STRINGS_JOIN_H_
 #define STRINGS_JOIN_H_
 
-#include <stdio.h>
-#include <string.h>
-
 #include <iterator>
 #include <map>
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "kudu/gutil/integral_types.h"
-#include "kudu/gutil/macros.h"
-#include "kudu/gutil/template_util.h"
-#include "kudu/gutil/strings/numbers.h"
 #include "kudu/gutil/strings/strcat.h"    // For backward compatibility.
 #include "kudu/gutil/strings/stringpiece.h"
-#include "kudu/gutil/hash/hash.h"
-
+//
 // ----------------------------------------------------------------------
 // JoinUsing()
 //    This concatenates a vector of strings "components" into a new char[]

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/memutil.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/memutil.h b/src/kudu/gutil/strings/memutil.h
index 9335735..1e9841a 100644
--- a/src/kudu/gutil/strings/memutil.h
+++ b/src/kudu/gutil/strings/memutil.h
@@ -53,10 +53,8 @@
 #ifndef STRINGS_MEMUTIL_H_
 #define STRINGS_MEMUTIL_H_
 
-#include <stddef.h>
-#include <string.h>      // to get the POSIX mem*() routines
-
-#include "kudu/gutil/port.h"   // disable some warnings on Windows
+#include <cstddef>
+#include <cstring>      // to get the POSIX mem*() routines
 
 inline char *memcat(char *dest, size_t destlen,
                     const char *src, size_t srclen) {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/numbers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/numbers.cc b/src/kudu/gutil/strings/numbers.cc
index 7bdb57c..33b13ee 100644
--- a/src/kudu/gutil/strings/numbers.cc
+++ b/src/kudu/gutil/strings/numbers.cc
@@ -6,28 +6,32 @@
 
 #include "kudu/gutil/strings/numbers.h"
 
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <float.h>          // for DBL_DIG and FLT_DIG
-#include <math.h>           // for HUGE_VAL
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <sys/types.h>
+
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>          // for DBL_DIG and FLT_DIG
+#include <cmath>           // for HUGE_VAL
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <limits>
-using std::numeric_limits;
+#include <ostream>
 #include <string>
-using std::string;
+
+#include <glog/logging.h>
 
 #include "kudu/gutil/int128.h"
 #include "kudu/gutil/integral_types.h"
-#include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strtoint.h"
 #include "kudu/gutil/strings/ascii_ctype.h"
 
+using std::numeric_limits;
+using std::string;
+
 // Reads a <double> in *text, which may not be whitespace-initiated.
 // *len is the length, or -1 if text is '\0'-terminated, which is more
 // efficient.  Sets *text to the end of the double, and val to the

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/numbers.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/numbers.h b/src/kudu/gutil/strings/numbers.h
index b0ec224..0152def 100644
--- a/src/kudu/gutil/strings/numbers.h
+++ b/src/kudu/gutil/strings/numbers.h
@@ -6,10 +6,9 @@
 #ifndef STRINGS_NUMBERS_H_
 #define STRINGS_NUMBERS_H_
 
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+#include <cstddef>
+#include <cinttypes>
+#include <ctime>
 #include <functional>
 #include <limits>
 #include <string>
@@ -20,7 +19,6 @@
 #include "kudu/gutil/port.h"
 #include "kudu/gutil/stringprintf.h"
 
-
 // START DOXYGEN NumbersFunctions grouping
 /* @defgroup NumbersFunctions
  * @{ */

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/serialize.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/serialize.cc b/src/kudu/gutil/strings/serialize.cc
index d0d8130..676474d 100644
--- a/src/kudu/gutil/strings/serialize.cc
+++ b/src/kudu/gutil/strings/serialize.cc
@@ -2,9 +2,8 @@
 
 #include "kudu/gutil/strings/serialize.h"
 
-#include <stddef.h>
-#include <stdlib.h>
-
+#include <cinttypes>
+#include <cstdlib>
 #include <string>
 #include <utility>
 #include <unordered_map>
@@ -13,10 +12,9 @@
 #include "kudu/gutil/casts.h"
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/stringprintf.h"
-#include "kudu/gutil/strtoint.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/split.h"
-#include "kudu/gutil/hash/hash.h"
+#include "kudu/gutil/strtoint.h"
 
 using std::unordered_map;
 using std::make_pair;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/serialize.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/serialize.h b/src/kudu/gutil/strings/serialize.h
index a759059..f835964 100644
--- a/src/kudu/gutil/strings/serialize.h
+++ b/src/kudu/gutil/strings/serialize.h
@@ -7,8 +7,7 @@
 #ifndef STRINGS_SERIALIZE_H_
 #define STRINGS_SERIALIZE_H_
 
-#include <string.h>
-
+#include <cstring>
 #include <string>
 #include <unordered_map>
 #include <utility>
@@ -18,7 +17,6 @@
 
 #include "kudu/gutil/int128.h"
 #include "kudu/gutil/integral_types.h"
-#include "kudu/gutil/logging-inl.h"
 #include "kudu/gutil/type_traits.h"
 #include "kudu/gutil/strings/stringpiece.h"
 #include "kudu/gutil/endian.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/split.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.cc b/src/kudu/gutil/strings/split.cc
index 4920a6c..261211d 100644
--- a/src/kudu/gutil/strings/split.cc
+++ b/src/kudu/gutil/strings/split.cc
@@ -4,20 +4,22 @@
 
 #include "kudu/gutil/strings/split.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
 #include <iterator>
 #include <limits>
+#include <memory>
+#include <ostream>
 
-#include "kudu/gutil/integral_types.h"
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
+
+#include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
-#include "kudu/gutil/strtoint.h"
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/util.h"
-#include "kudu/gutil/hash/hash.h"
+#include "kudu/gutil/strtoint.h"
+#include "kudu/util/make_shared.h"
 
 using std::unordered_map;
 using std::unordered_set;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/split.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.h b/src/kudu/gutil/strings/split.h
index df36ede..d133efb 100644
--- a/src/kudu/gutil/strings/split.h
+++ b/src/kudu/gutil/strings/split.h
@@ -23,7 +23,6 @@
 #include <stddef.h>
 
 #include <algorithm>
-#include <iterator>
 #include <map>
 #include <set>
 #include <string>
@@ -35,9 +34,8 @@
 #include <glog/logging.h>
 
 #include "kudu/gutil/integral_types.h"
-#include "kudu/gutil/logging-inl.h"
 #include "kudu/gutil/strings/charset.h"
-#include "kudu/gutil/strings/split_internal.h"
+#include "kudu/gutil/strings/split_internal.h" // IWYU pragma: export
 #include "kudu/gutil/strings/stringpiece.h"
 #include "kudu/gutil/strings/strip.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/strcat.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.cc b/src/kudu/gutil/strings/strcat.cc
index 9abb662..f4b5232 100644
--- a/src/kudu/gutil/strings/strcat.cc
+++ b/src/kudu/gutil/strings/strcat.cc
@@ -2,16 +2,12 @@
 
 #include "kudu/gutil/strings/strcat.h"
 
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
+#include <cstdarg>
+#include <cstdint>
+#include <cstring>
 
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
-#include "kudu/gutil/gscoped_ptr.h"
-#include "kudu/gutil/strings/ascii_ctype.h"
-#include "kudu/gutil/strings/escaping.h"
+
 #include "kudu/gutil/stl_util.h"
 
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/strcat.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.h b/src/kudu/gutil/strings/strcat.h
index 7216c66..f51ba37 100644
--- a/src/kudu/gutil/strings/strcat.h
+++ b/src/kudu/gutil/strings/strcat.h
@@ -7,6 +7,9 @@
 #ifndef STRINGS_STRCAT_H_
 #define STRINGS_STRCAT_H_
 
+#include <cstring>
+
+#include <algorithm>
 #include <string>
 
 #include "kudu/gutil/integral_types.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/string_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/string_util-test.cc b/src/kudu/gutil/strings/string_util-test.cc
index 8849ca2..6f9f6bd 100644
--- a/src/kudu/gutil/strings/string_util-test.cc
+++ b/src/kudu/gutil/strings/string_util-test.cc
@@ -16,6 +16,7 @@
 // under the License.
 //
 // Some portions Copyright 2013 The Chromium Authors. All rights reserved.
+
 #include "kudu/gutil/strings/util.h"
 
 #include <gtest/gtest.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/stringpiece.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/stringpiece.cc b/src/kudu/gutil/strings/stringpiece.cc
index d6f23ee..3532c15 100644
--- a/src/kudu/gutil/strings/stringpiece.cc
+++ b/src/kudu/gutil/strings/stringpiece.cc
@@ -4,14 +4,18 @@
 
 #include "kudu/gutil/strings/stringpiece.h"
 
-#include <algorithm>
 #include <climits>
-#include <glog/logging.h>
-#include <string.h>
+#include <cstring>
+
+#include <algorithm>
+#include <deque>
+#include <memory>
+#include <ostream>
 #include <string>
 
-#include "kudu/gutil/hash/hash.h"
-#include "kudu/gutil/logging-inl.h"
+#include <glog/logging.h>
+
+#include "kudu/gutil/hash/legacy_hash.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/memutil.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/stringpiece.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/stringpiece.h b/src/kudu/gutil/strings/stringpiece.h
index 5812dd6..23d1483 100644
--- a/src/kudu/gutil/strings/stringpiece.h
+++ b/src/kudu/gutil/strings/stringpiece.h
@@ -113,19 +113,19 @@
 #define STRINGS_STRINGPIECE_H_
 
 
-#include <assert.h>
+#include <cassert>
+#include <cstddef>
+#include <cstring>
+
 #include <functional>
 #include <iosfwd>
+#include <iterator>
 #include <limits>
-#include <stddef.h>
-#include <string.h>
 #include <string>
 
-#include "kudu/gutil/integral_types.h"
-#include "kudu/gutil/port.h"
-#include "kudu/gutil/type_traits.h"
+#include "kudu/gutil/hash/string_hash.h"
 #include "kudu/gutil/strings/fastmem.h"
-#include "kudu/gutil/hash/hash.h"
+#include "kudu/gutil/type_traits.h"
 
 class StringPiece {
  private:
@@ -335,7 +335,6 @@ inline bool operator<=(StringPiece x, StringPiece y) {
 inline bool operator>=(StringPiece x, StringPiece y) {
   return !(x < y);
 }
-class StringPiece;
 template <class X> struct GoodFastHash;
 
 // ------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/strip.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strip.cc b/src/kudu/gutil/strings/strip.cc
index 1a6a547..c4ea720 100644
--- a/src/kudu/gutil/strings/strip.cc
+++ b/src/kudu/gutil/strings/strip.cc
@@ -6,20 +6,24 @@
 
 #include "kudu/gutil/strings/strip.h"
 
-#include <assert.h>
-#include <string.h>
+#include <cassert>
+#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::swap;
-#include <string>
 using std::string;
-
-#include "kudu/gutil/strings/ascii_ctype.h"
-#include "kudu/gutil/strings/stringpiece.h"
+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/0f6dcf83/src/kudu/gutil/strings/strip.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strip.h b/src/kudu/gutil/strings/strip.h
index f834397..02ff16a 100644
--- a/src/kudu/gutil/strings/strip.h
+++ b/src/kudu/gutil/strings/strip.h
@@ -7,7 +7,8 @@
 #ifndef STRINGS_STRIP_H_
 #define STRINGS_STRIP_H_
 
-#include <stddef.h>
+#include <cstddef>
+
 #include <string>
 
 #include "kudu/gutil/strings/ascii_ctype.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/substitute.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/substitute.cc b/src/kudu/gutil/strings/substitute.cc
index c0d5e81..5020395 100644
--- a/src/kudu/gutil/strings/substitute.cc
+++ b/src/kudu/gutil/strings/substitute.cc
@@ -2,12 +2,15 @@
 
 #include "kudu/gutil/strings/substitute.h"
 
+#include <cstdint>
+#include <ostream>
+
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
+
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/escaping.h"
-#include "kudu/gutil/stl_util.h"
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/substitute.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/substitute.h b/src/kudu/gutil/strings/substitute.h
index 3040156..9def694 100644
--- a/src/kudu/gutil/strings/substitute.h
+++ b/src/kudu/gutil/strings/substitute.h
@@ -1,13 +1,11 @@
 // Copyright 2008 Google Inc.  All rights reserved.
 
-#include <string.h>
+#include <cstring>
 #include <string>
 
-#include "kudu/gutil/basictypes.h"
 #include "kudu/gutil/strings/numbers.h"
 #include "kudu/gutil/strings/stringpiece.h"
 
-
 #ifndef STRINGS_SUBSTITUTE_H_
 #define STRINGS_SUBSTITUTE_H_
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/util.cc b/src/kudu/gutil/strings/util.cc
index c16d9b2..5fcf405 100644
--- a/src/kudu/gutil/strings/util.cc
+++ b/src/kudu/gutil/strings/util.cc
@@ -7,31 +7,35 @@
 
 #include "kudu/gutil/strings/util.h"
 
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>           // for FastTimeToBuffer()
+#include <cassert>
+#include <cstdarg>
+#include <cstdio>
+#include <cstring>
+#include <ctime>           // for FastTimeToBuffer()
+
 #include <algorithm>
-using std::copy;
-using std::max;
-using std::min;
-using std::reverse;
-using std::sort;
-using std::swap;
+#include <deque>
+#include <ostream>
 #include <string>
-using std::string;
 #include <vector>
-using std::vector;
 
 #include <glog/logging.h>
-#include "kudu/gutil/logging-inl.h"
+
 #include "kudu/gutil/strings/ascii_ctype.h"
 #include "kudu/gutil/strings/numbers.h"
 #include "kudu/gutil/strings/stringpiece.h"
 #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;
+
 #ifdef OS_WINDOWS
 #ifdef min  // windows.h defines this to something silly
 #undef min

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strings/util.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/util.h b/src/kudu/gutil/strings/util.h
index fcd6b6d..a465773 100644
--- a/src/kudu/gutil/strings/util.h
+++ b/src/kudu/gutil/strings/util.h
@@ -26,13 +26,9 @@
 #ifndef STRINGS_UTIL_H_
 #define STRINGS_UTIL_H_
 
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifndef _MSC_VER
-#include <strings.h>  // for strcasecmp, but msvc does not have this header
-#endif
+#include <cstddef>
+#include <cstdio>
+#include <cstring>
 
 #include <functional>
 #include <string>

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strtoint.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strtoint.cc b/src/kudu/gutil/strtoint.cc
index bb96a57..9cc6e1a 100644
--- a/src/kudu/gutil/strtoint.cc
+++ b/src/kudu/gutil/strtoint.cc
@@ -4,8 +4,9 @@
 // See strtoint.h for details on how to use this component.
 //
 
-#include <errno.h>
-#include "kudu/gutil/port.h"
+#include <cerrno>
+#include <climits>
+
 #include "kudu/gutil/strtoint.h"
 
 // Replacement strto[u]l functions that have identical overflow and underflow

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/strtoint.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strtoint.h b/src/kudu/gutil/strtoint.h
index 96d4856..ae0d794 100644
--- a/src/kudu/gutil/strtoint.h
+++ b/src/kudu/gutil/strtoint.h
@@ -30,11 +30,11 @@
 #ifndef BASE_STRTOINT_H_
 #define BASE_STRTOINT_H_
 
-#include <stdlib.h> // For strtol* functions.
+#include <cstdlib> // For strtol* functions.
 #include <string>
+
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
-#include "kudu/gutil/port.h"
 
 // Adapter functions for handling overflow and errno.
 int32 strto32_adapter(const char *nptr, char **endptr, int base);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/sysinfo.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/sysinfo.cc b/src/kudu/gutil/sysinfo.cc
index 6006b6d..407a8c8 100644
--- a/src/kudu/gutil/sysinfo.cc
+++ b/src/kudu/gutil/sysinfo.cc
@@ -32,15 +32,10 @@
 # define PLATFORM_WINDOWS 1
 #endif
 
-#include <ctype.h>    // for isspace()
-#include <stdlib.h>   // for getenv()
-#include <stdio.h>    // for snprintf(), sscanf()
-#include <string.h>   // for memmove(), memchr(), etc.
+
 #include <fcntl.h>    // for open()
-#include <errno.h>    // for errno
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>   // for read()
-#endif
+
 #if defined __MACH__          // Mac OS X, almost certainly
 #include <sys/types.h>
 #include <sys/sysctl.h>       // how we figure out numcpu's on OS X
@@ -53,11 +48,21 @@
 #include <shlwapi.h>          // for SHGetValueA()
 #include <tlhelp32.h>         // for Module32First()
 #endif
+
+#include <cerrno>    // for errno
+#include <cstdio>    // for snprintf(), sscanf()
+#include <cstdlib>   // for getenv()
+#include <cstring>   // for memmove(), memchr(), etc.
+#include <ctime>
+#include <ostream>
+
+#include <glog/logging.h>
+
 #include "kudu/gutil/dynamic_annotations.h"   // for RunningOnValgrind
+#include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/sysinfo.h"
 #include "kudu/gutil/walltime.h"
-#include <glog/logging.h>
 
 // This isn't in the 'base' namespace in tcmallc. But, tcmalloc
 // exports these functions, so we need to namespace them to avoid

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/sysinfo.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/sysinfo.h b/src/kudu/gutil/sysinfo.h
index ec3abe7..56f913c 100644
--- a/src/kudu/gutil/sysinfo.h
+++ b/src/kudu/gutil/sysinfo.h
@@ -31,6 +31,8 @@
 #ifndef _SYSINFO_H_
 #define _SYSINFO_H_
 
+#include <cstdint>
+
 namespace base {
 
 // Return the number of online CPUs. This is computed and cached the first time this or

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/threading/thread_collision_warner.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/threading/thread_collision_warner.cc b/src/kudu/gutil/threading/thread_collision_warner.cc
index 89270d8..6e0429f 100644
--- a/src/kudu/gutil/threading/thread_collision_warner.cc
+++ b/src/kudu/gutil/threading/thread_collision_warner.cc
@@ -4,9 +4,18 @@
 
 #include "kudu/gutil/threading/thread_collision_warner.h"
 
-#include <glog/logging.h>
+#ifdef __linux__
+#include <syscall.h>
+#else
+#include <sys/syscall.h>
+#endif
 
-#include "kudu/gutil/linux_syscall_support.h"
+#include <unistd.h>
+
+#include <cstdint>
+#include <ostream>
+
+#include <glog/logging.h>
 
 namespace base {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/threading/thread_collision_warner.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/threading/thread_collision_warner.h b/src/kudu/gutil/threading/thread_collision_warner.h
index d59ea67..75c771b 100644
--- a/src/kudu/gutil/threading/thread_collision_warner.h
+++ b/src/kudu/gutil/threading/thread_collision_warner.h
@@ -5,11 +5,9 @@
 #ifndef BASE_THREADING_THREAD_COLLISION_WARNER_H_
 #define BASE_THREADING_THREAD_COLLISION_WARNER_H_
 
-#include <memory>
-
 #include "kudu/gutil/atomicops.h"
-#include "kudu/gutil/port.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
  
 #ifndef BASE_EXPORT
 #define BASE_EXPORT

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/gutil/walltime.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/walltime.h b/src/kudu/gutil/walltime.h
index 9f5a4d7..40af48e 100644
--- a/src/kudu/gutil/walltime.h
+++ b/src/kudu/gutil/walltime.h
@@ -21,7 +21,7 @@
 
 #include <sys/time.h>
 
-#include <glog/logging.h>
+#include <ctime>
 #include <string>
 
 #if defined(__APPLE__)
@@ -29,8 +29,10 @@
 #include <mach/mach.h>
 #include <mach/mach_time.h>
 
+#include <glog/logging.h>
+
 #include "kudu/gutil/once.h"
-#endif  // defined(__APPLE__)
+#endif  // #if defined(__APPLE__)
 
 #include "kudu/gutil/integral_types.h"
 
@@ -174,5 +176,6 @@ class CycleClock {
   CycleClock();
 };
 
-#include "kudu/gutil/cycleclock-inl.h"  // inline method bodies
+// inline method bodies
+#include "kudu/gutil/cycleclock-inl.h"  // IWYU pragma: export
 #endif  // GUTIL_WALLTIME_H_

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/all_types-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/all_types-itest.cc b/src/kudu/integration-tests/all_types-itest.cc
index 2b973cf..8b5d534 100644
--- a/src/kudu/integration-tests/all_types-itest.cc
+++ b/src/kudu/integration-tests/all_types-itest.cc
@@ -15,16 +15,40 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
+#include <functional>
+#include <cstdint>
+#include <ostream>
+#include <string>
 #include <vector>
 
 #include <gflags/gflags.h>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/gutil/strings/substitute.h"
+#include "kudu/client/client.h"
 #include "kudu/client/row_result.h"
-#include "kudu/common/wire_protocol-test-util.h"
+#include "kudu/client/scan_batch.h"
+#include "kudu/client/schema-internal.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/types.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/mathlimits.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/stringprintf.h"
+#include "kudu/gutil/strings/substitute.h"
+#include "kudu/gutil/type_traits.h"
 #include "kudu/integration-tests/cluster_verifier.h"
-#include "kudu/integration-tests/ts_itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/util/bitmap.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DEFINE_int32(num_rows_per_tablet, 100, "The number of rows to be inserted into each tablet");
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/alter_table-randomized-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/alter_table-randomized-test.cc b/src/kudu/integration-tests/alter_table-randomized-test.cc
index 4852141..86f7767 100644
--- a/src/kudu/integration-tests/alter_table-randomized-test.cc
+++ b/src/kudu/integration-tests/alter_table-randomized-test.cc
@@ -16,21 +16,37 @@
 // under the License.
 
 #include <algorithm>
+#include <cstdint>
+#include <cstdlib>
+#include <iterator>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <string>
+#include <type_traits>
+#include <utility>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/gutil/map-util.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/cluster_verifier.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
-#include "kudu/util/net/sockaddr.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/random.h"
-#include "kudu/util/random_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/alter_table-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/alter_table-test.cc b/src/kudu/integration-tests/alter_table-test.cc
index 3b79744..95d71b7 100644
--- a/src/kudu/integration-tests/alter_table-test.cc
+++ b/src/kudu/integration-tests/alter_table-test.cc
@@ -15,39 +15,59 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
 #include <atomic>
+#include <cstddef>
+#include <cstdint>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <utility>
+#include <vector>
 
 #include <boost/bind.hpp>
-#include <boost/optional.hpp>
-#include <gflags/gflags.h>
+#include <boost/optional/optional.hpp>
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
 #include "kudu/client/client-test-util.h"
 #include "kudu/client/client.h"
 #include "kudu/client/row_result.h"
-#include "kudu/client/scan_batch.h"
 #include "kudu/client/schema.h"
-#include "kudu/clock/hybrid_clock.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/wire_protocol.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
-#include "kudu/master/master-test-util.h"
+#include "kudu/master/catalog_manager.h"
 #include "kudu/master/master.h"
 #include "kudu/master/master.pb.h"
 #include "kudu/master/mini_master.h"
+#include "kudu/tablet/rowset.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet_metadata.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/tserver/ts_tablet_manager.h"
-#include "kudu/util/faststring.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/random.h"
-#include "kudu/util/stopwatch.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
+#include "kudu/util/thread.h"
 
 DECLARE_bool(enable_maintenance_manager);
 DECLARE_int32(heartbeat_interval_ms);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/authn_token_expire-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/authn_token_expire-itest.cc b/src/kudu/integration-tests/authn_token_expire-itest.cc
index ced3b1f..f48df14 100644
--- a/src/kudu/integration-tests/authn_token_expire-itest.cc
+++ b/src/kudu/integration-tests/authn_token_expire-itest.cc
@@ -15,8 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
 #include <memory>
+#include <ostream>
 #include <string>
+#include <vector>
 
 #include <gflags/gflags_declare.h>
 #include <glog/logging.h>
@@ -24,26 +27,18 @@
 
 #include "kudu/client/client-test-util.h"
 #include "kudu/client/client.h"
+#include "kudu/client/schema.h"
 #include "kudu/client/shared_ptr.h"
-#include "kudu/clock/hybrid_clock.h"
+#include "kudu/client/write_op.h"
 #include "kudu/common/partial_row.h"
-#include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/cluster_verifier.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/test_workload.h"
-#include "kudu/master/catalog_manager.h"
-#include "kudu/master/master.h"
-#include "kudu/master/master.pb.h"
-#include "kudu/master/mini_master.h"
 #include "kudu/tablet/key_value_test_schema.h"
-#include "kudu/tablet/tablet.h"
-#include "kudu/tablet/tablet_replica.h"
-#include "kudu/tserver/mini_tablet_server.h"
-#include "kudu/tserver/tablet_server.h"
-#include "kudu/tserver/ts_tablet_manager.h"
 #include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 DECLARE_bool(rpc_reopen_outbound_connections);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/catalog_manager_tsk-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/catalog_manager_tsk-itest.cc b/src/kudu/integration-tests/catalog_manager_tsk-itest.cc
index 2b201c2..acdeba9 100644
--- a/src/kudu/integration-tests/catalog_manager_tsk-itest.cc
+++ b/src/kudu/integration-tests/catalog_manager_tsk-itest.cc
@@ -16,16 +16,26 @@
 // under the License.
 
 #include <algorithm>
+#include <cstdint>
 #include <iterator>
 #include <memory>
 #include <string>
 #include <vector>
 
-#include "kudu/client/client.h"
+#include <gtest/gtest.h>
+
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/tablet/key_value_test_schema.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using kudu::client::KuduClient;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/client-negotiation-failover-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-negotiation-failover-itest.cc b/src/kudu/integration-tests/client-negotiation-failover-itest.cc
index 18c285a..69327d2 100644
--- a/src/kudu/integration-tests/client-negotiation-failover-itest.cc
+++ b/src/kudu/integration-tests/client-negotiation-failover-itest.cc
@@ -15,7 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdlib>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <thread>
 #include <vector>
@@ -25,17 +27,20 @@
 #include <gflags/gflags_declare.h>
 #include <gtest/gtest.h>
 
-#include "kudu/client/client.h"
 #include "kudu/client/client-test-util.h"
-#include "kudu/common/wire_protocol.h"
-#include "kudu/gutil/map-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/integration-tests/cluster_itest_util.h"
-#include "kudu/integration-tests/external_mini_cluster-itest-base.h"
-#include "kudu/integration-tests/test_workload.h"
-#include "kudu/integration-tests/ts_itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/tablet/key_value_test_schema.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/scoped_cleanup.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 using kudu::client::KuduClient;
 using kudu::client::KuduClientBuilder;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/client-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-stress-test.cc b/src/kudu/integration-tests/client-stress-test.cc
index 7cc9ba4..569171e 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -15,21 +15,40 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <unistd.h>
 
-#include <memory>
+#include <cstdint>
+#include <ostream>
+#include <set>
+#include <string>
+#include <utility>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/client/client-internal.h"
 #include "kudu/client/client-test-util.h"
-#include "kudu/gutil/mathlimits.h"
+#include "kudu/client/client.h"
+#include "kudu/client/scan_predicate.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/value.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/test_workload.h"
+#include "kudu/util/countdown_latch.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/pstack_watcher.h"
 #include "kudu/util/random.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
+#include "kudu/util/thread.h"
 
 METRIC_DECLARE_entity(tablet);
 METRIC_DECLARE_counter(leader_memory_pressure_rejections);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/client_failover-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client_failover-itest.cc b/src/kudu/integration-tests/client_failover-itest.cc
index bd6d0b8..b2f89d8 100644
--- a/src/kudu/integration-tests/client_failover-itest.cc
+++ b/src/kudu/integration-tests/client_failover-itest.cc
@@ -15,24 +15,39 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
 #include <memory>
+#include <ostream>
 #include <set>
 #include <string>
 #include <unordered_map>
 #include <vector>
 
+#include <boost/optional/optional.hpp>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/client/client.h"
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/consensus/metadata.pb.h"
 #include "kudu/gutil/map-util.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
 #include "kudu/integration-tests/test_workload.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/tserver/tserver.pb.h"
-#include "kudu/util/scoped_cleanup.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/net/net_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 using kudu::client::CountTableRows;
 using kudu::client::KuduInsert;
@@ -44,8 +59,8 @@ using kudu::itest::TServerDetails;
 using kudu::tablet::TABLET_DATA_TOMBSTONED;
 using std::set;
 using std::string;
-using std::vector;
 using std::unordered_map;
+using std::vector;
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/cluster_itest_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_itest_util.cc b/src/kudu/integration-tests/cluster_itest_util.cc
index ca88aa7..051c8b5 100644
--- a/src/kudu/integration-tests/cluster_itest_util.cc
+++ b/src/kudu/integration-tests/cluster_itest_util.cc
@@ -17,29 +17,40 @@
 #include "kudu/integration-tests/cluster_itest_util.h"
 
 #include <algorithm>
-#include <boost/optional.hpp>
+#include <ostream>
+
+#include <boost/optional/optional.hpp>
+#include <glog/logging.h>
 #include <glog/stl_logging.h>
-#include <limits>
+#include <gtest/gtest.h>
 
-#include "kudu/client/client.h"
+#include "kudu/client/schema.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/wire_protocol-test-util.h"
 #include "kudu/common/wire_protocol.h"
 #include "kudu/common/wire_protocol.pb.h"
-#include "kudu/common/wire_protocol-test-util.h"
 #include "kudu/consensus/consensus.proxy.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
 #include "kudu/consensus/quorum_util.h"
+#include "kudu/gutil/basictypes.h"
 #include "kudu/gutil/map-util.h"
-#include "kudu/gutil/strings/join.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/strings/substitute.h"
+#include "kudu/master/master.pb.h"
 #include "kudu/master/master.proxy.h"
 #include "kudu/rpc/rpc_controller.h"
-#include "kudu/server/server_base.proxy.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/tserver/tablet_server_test_util.h"
+#include "kudu/tserver/tserver_admin.pb.h"
 #include "kudu/tserver/tserver_admin.proxy.h"
-#include "kudu/tserver/tserver_service.pb.h"
 #include "kudu/tserver/tserver_service.proxy.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/net/net_util.h"
+#include "kudu/util/net/sockaddr.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/status.h"
 #include "kudu/util/test_macros.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/cluster_itest_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_itest_util.h b/src/kudu/integration-tests/cluster_itest_util.h
index 4cda935..e8e49b5 100644
--- a/src/kudu/integration-tests/cluster_itest_util.h
+++ b/src/kudu/integration-tests/cluster_itest_util.h
@@ -27,49 +27,52 @@
 #ifndef KUDU_INTEGRATION_TESTS_CLUSTER_ITEST_UTIL_H_
 #define KUDU_INTEGRATION_TESTS_CLUSTER_ITEST_UTIL_H_
 
-#include <boost/optional/optional_fwd.hpp>
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <unordered_map>
 #include <vector>
 
-#include "kudu/gutil/gscoped_ptr.h"
-#include "kudu/gutil/ref_counted.h"
+#include "kudu/common/wire_protocol.pb.h"
 #include "kudu/consensus/consensus.pb.h"
 #include "kudu/consensus/consensus.proxy.h"
-#include "kudu/master/master.pb.h"
-#include "kudu/master/master.proxy.h"
-#include "kudu/server/server_base.pb.h"
+#include "kudu/consensus/metadata.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/server/server_base.proxy.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tserver/tserver.pb.h"
 #include "kudu/tserver/tserver_admin.proxy.h"
 #include "kudu/tserver/tserver_service.proxy.h"
 
+namespace boost {
+template <class T>
+class optional;
+}
+
 namespace kudu {
 class HostPort;
 class MonoDelta;
-class Schema;
-class Sockaddr;
 class Status;
 
 namespace client {
-class KuduClient;
 class KuduSchema;
-class KuduTable;
 }
 
 namespace consensus {
 class OpId;
 }
 
+namespace master {
+class GetTableLocationsResponsePB;
+class ListTabletServersResponsePB_Entry;
+class MasterServiceProxy;
+class TabletLocationsPB;
+} // namespace master
+
 namespace rpc {
 class Messenger;
 }
 
-namespace tserver {
-class ListTabletsResponsePB_StatusAndSchemaPB;
-class TabletServerErrorPB;
-}
-
 namespace itest {
 
 struct TServerDetails {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/cluster_verifier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_verifier.cc b/src/kudu/integration-tests/cluster_verifier.cc
index a5f0312..97f3941 100644
--- a/src/kudu/integration-tests/cluster_verifier.cc
+++ b/src/kudu/integration-tests/cluster_verifier.cc
@@ -16,12 +16,15 @@
 // under the License.
 
 #include <memory>
+#include <ostream>
 #include <string>
 #include <vector>
 
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
 #include "kudu/client/client.h"
+#include "kudu/client/shared_ptr.h"
 #include "kudu/client/row_result.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/cluster_verifier.h"
@@ -29,6 +32,8 @@
 #include "kudu/integration-tests/log_verifier.h"
 #include "kudu/tools/ksck_remote.h"
 #include "kudu/util/monotime.h"
+#include "kudu/util/net/net_util.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/cluster_verifier.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_verifier.h b/src/kudu/integration-tests/cluster_verifier.h
index 11d2656..e2e601f 100644
--- a/src/kudu/integration-tests/cluster_verifier.h
+++ b/src/kudu/integration-tests/cluster_verifier.h
@@ -21,13 +21,12 @@
 
 #include "kudu/gutil/macros.h"
 #include "kudu/tools/ksck.h"
-#include "kudu/util/monotime.h"
 #include "kudu/util/status.h"
+#include "kudu/util/monotime.h"
 
 namespace kudu {
 
 class ExternalMiniCluster;
-class MonoDelta;
 
 // Utility class for integration tests to verify that the cluster is in a good state.
 class ClusterVerifier {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/consistency-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/consistency-itest.cc b/src/kudu/integration-tests/consistency-itest.cc
index 7d8dec1..3c37258 100644
--- a/src/kudu/integration-tests/consistency-itest.cc
+++ b/src/kudu/integration-tests/consistency-itest.cc
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstddef>
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <vector>
@@ -25,29 +27,38 @@
 
 #include "kudu/client/client-test-util.h"
 #include "kudu/client/client.h"
+#include "kudu/client/scan_batch.h"
 #include "kudu/client/scan_configuration.h"
+#include "kudu/client/scan_predicate.h"
 #include "kudu/client/scanner-internal.h"
+#include "kudu/client/schema.h"
 #include "kudu/client/shared_ptr.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
+#include "kudu/clock/clock.h"
 #include "kudu/clock/hybrid_clock.h"
 #include "kudu/clock/mock_ntp.h"
+#include "kudu/clock/time_service.h"
 #include "kudu/common/partial_row.h"
+#include "kudu/gutil/casts.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/internal_mini_cluster-itest-base.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
 #include "kudu/master/catalog_manager.h"
 #include "kudu/master/master.h"
 #include "kudu/master/master.pb.h"
 #include "kudu/master/mini_master.h"
-#include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/tserver/ts_tablet_manager.h"
 #include "kudu/util/monotime.h"
-#include "kudu/util/scoped_cleanup.h"
-#include "kudu/util/test_util.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 DECLARE_int32(heartbeat_interval_ms);
 DECLARE_int32(max_clock_sync_error_usec);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/create-table-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/create-table-itest.cc b/src/kudu/integration-tests/create-table-itest.cc
index 5854476..3c0d097 100644
--- a/src/kudu/integration-tests/create-table-itest.cc
+++ b/src/kudu/integration-tests/create-table-itest.cc
@@ -15,22 +15,46 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <set>
 #include <string>
+#include <type_traits>
+#include <utility>
+#include <vector>
 
-#include <gflags/gflags.h>
+#include <glog/logging.h>
 #include <glog/stl_logging.h>
 #include <gtest/gtest.h>
 
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/schema.h"
 #include "kudu/common/wire_protocol-test-util.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/mathlimits.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
+#include "kudu/integration-tests/mini_cluster.h"
 #include "kudu/master/master.pb.h"
 #include "kudu/master/master.proxy.h"
 #include "kudu/rpc/rpc_controller.h"
+#include "kudu/util/atomic.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
+#include "kudu/util/thread.h"
 
 using std::multimap;
 using std::set;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/create-table-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/create-table-stress-test.cc b/src/kudu/integration-tests/create-table-stress-test.cc
index 67acf0e..149d8f6 100644
--- a/src/kudu/integration-tests/create-table-stress-test.cc
+++ b/src/kudu/integration-tests/create-table-stress-test.cc
@@ -15,26 +15,46 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/stl_logging.h>
-#include <gtest/gtest.h>
+#include <cstdlib>
+#include <iostream>
 #include <memory>
+#include <string>
 #include <thread>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
+#include <gflags/gflags.h>
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
+#include <glog/stl_logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/client/client.h"
-#include "kudu/common/schema.h"
-#include "kudu/common/wire_protocol.h"
-#include "kudu/fs/fs_manager.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
+#include "kudu/master/catalog_manager.h"
 #include "kudu/master/master-test-util.h"
+#include "kudu/master/master.h"
+#include "kudu/master/master.pb.h"
 #include "kudu/master/master.proxy.h"
 #include "kudu/master/mini_master.h"
 #include "kudu/rpc/messenger.h"
-#include "kudu/tserver/mini_tablet_server.h"
-#include "kudu/tserver/tablet_server.h"
+#include "kudu/util/atomic.h"
+#include "kudu/util/cow_object.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using kudu::client::KuduClient;
@@ -48,7 +68,6 @@ using kudu::itest::TabletServerMap;
 using kudu::master::MasterServiceProxy;
 using kudu::rpc::Messenger;
 using kudu::rpc::MessengerBuilder;
-using kudu::rpc::RpcController;
 
 DECLARE_int32(heartbeat_interval_ms);
 DECLARE_bool(log_preallocate_segments);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/delete_table-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/delete_table-itest.cc b/src/kudu/integration-tests/delete_table-itest.cc
index 1d2da0d..5fdcc9d 100644
--- a/src/kudu/integration-tests/delete_table-itest.cc
+++ b/src/kudu/integration-tests/delete_table-itest.cc
@@ -15,34 +15,64 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <sys/types.h>
+
+#include <cstddef>
+#include <cstdint>
+#include <limits>
 #include <memory>
+#include <ostream>
 #include <string>
-#include <tuple>
+#include <tuple>  // IWYU pragma: keep
+#include <unordered_map>
+#include <utility>
+#include <vector>
 
-#include <boost/optional.hpp>
-#include <glog/stl_logging.h>
+#include <boost/optional/optional.hpp>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 #include <rapidjson/document.h>
 
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/scan_batch.h"
+#include "kudu/client/schema.h"
 #include "kudu/client/shared_ptr.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/schema.h"
 #include "kudu/common/wire_protocol-test-util.h"
-#include "kudu/gutil/stl_util.h"
+#include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/consensus/metadata.pb.h"
+#include "kudu/gutil/basictypes.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/strings/split.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/cluster_verifier.h"
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
 #include "kudu/integration-tests/test_workload.h"
+#include "kudu/master/master.pb.h"
+#include "kudu/master/master.proxy.h"
 #include "kudu/rpc/rpc_controller.h"
+#include "kudu/tablet/metadata.pb.h"
 #include "kudu/tablet/tablet.pb.h"
 #include "kudu/tserver/tserver.pb.h"
 #include "kudu/tserver/tserver_admin.pb.h"
+#include "kudu/tserver/tserver_admin.proxy.h"
 #include "kudu/util/curl_util.h"
+#include "kudu/util/faststring.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/net/net_util.h"
 #include "kudu/util/pb_util.h"
 #include "kudu/util/pstack_watcher.h"
+#include "kudu/util/status.h"
 #include "kudu/util/subprocess.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 using kudu::client::KuduClient;
 using kudu::client::KuduScanner;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/delete_tablet-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/delete_tablet-itest.cc b/src/kudu/integration-tests/delete_tablet-itest.cc
index c0ea6c3..447a4cf 100644
--- a/src/kudu/integration-tests/delete_tablet-itest.cc
+++ b/src/kudu/integration-tests/delete_tablet-itest.cc
@@ -15,18 +15,31 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
+#include <memory>
+#include <unordered_map>
 #include <vector>
 
-#include "kudu/gutil/stl_util.h"
-#include "kudu/gutil/strings/substitute.h"
+#include <boost/optional/optional.hpp>
+#include <gflags/gflags_declare.h>
+#include <gtest/gtest.h>
+
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/internal_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/internal_mini_cluster.h"
 #include "kudu/integration-tests/test_workload.h"
 #include "kudu/master/mini_master.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/tserver/ts_tablet_manager.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DECLARE_int64(fs_wal_dir_reserved_bytes);
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/dense_node-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/dense_node-itest.cc b/src/kudu/integration-tests/dense_node-itest.cc
index 591bcb1..997e732 100644
--- a/src/kudu/integration-tests/dense_node-itest.cc
+++ b/src/kudu/integration-tests/dense_node-itest.cc
@@ -17,7 +17,10 @@
 
 #include <unistd.h>
 
+#include <algorithm>
+#include <cstdint>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <utility>
 #include <vector>
@@ -29,10 +32,12 @@
 #include "kudu/client/schema.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/test_workload.h"
 #include "kudu/util/env.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/test_macros.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/disk_reservation-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/disk_reservation-itest.cc b/src/kudu/integration-tests/disk_reservation-itest.cc
index 23a8ea2..b80604e 100644
--- a/src/kudu/integration-tests/disk_reservation-itest.cc
+++ b/src/kudu/integration-tests/disk_reservation-itest.cc
@@ -15,13 +15,23 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
+#include <memory>
+#include <ostream>
+#include <string>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/integration-tests/cluster_verifier.h"
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/test_workload.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 using std::string;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 b45eb83..3f120a0 100644
--- a/src/kudu/integration-tests/exactly_once_writes-itest.cc
+++ b/src/kudu/integration-tests/exactly_once_writes-itest.cc
@@ -15,11 +15,44 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
+#include <cstdint>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/common/schema.h"
+#include "kudu/common/wire_protocol-test-util.h"
+#include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/map-util.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/strings/substitute.h"
+#include "kudu/integration-tests/cluster_itest_util.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/log_verifier.h"
 #include "kudu/integration-tests/ts_itest-base.h"
+#include "kudu/rpc/messenger.h"
+#include "kudu/rpc/rpc_controller.h"
+#include "kudu/rpc/rpc_header.pb.h"
+#include "kudu/tserver/tserver.pb.h"
+#include "kudu/tserver/tserver_service.proxy.h"
 #include "kudu/util/barrier.h"
 #include "kudu/util/logging.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/net/sockaddr.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/random.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
+#include "kudu/util/thread.h"
 
 using std::string;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 6b5eefb..71d7573 100644
--- a/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
+++ b/src/kudu/integration-tests/external_mini_cluster-itest-base.cc
@@ -17,18 +17,21 @@
 
 #include "kudu/integration-tests/external_mini_cluster-itest-base.h"
 
+#include <algorithm>
+#include <ostream>
 #include <string>
 #include <vector>
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/client/client.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
+#include "kudu/util/status.h"
 #include "kudu/util/pstack_watcher.h"
+#include "kudu/util/test_macros.h"
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/external_mini_cluster-itest-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster-itest-base.h b/src/kudu/integration-tests/external_mini_cluster-itest-base.h
index 9032c1a..20123f7 100644
--- a/src/kudu/integration-tests/external_mini_cluster-itest-base.h
+++ b/src/kudu/integration-tests/external_mini_cluster-itest-base.h
@@ -22,9 +22,16 @@
 #include <unordered_map>
 #include <vector>
 
+#include <gtest/gtest.h>
+
+#include "kudu/client/client.h"
 #include "kudu/client/shared_ptr.h"
+#include "kudu/gutil/stl_util.h"
+#include "kudu/integration-tests/cluster_itest_util.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
+#include "kudu/util/pstack_watcher.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 cd0c44a..b5c11a6 100644
--- a/src/kudu/integration-tests/external_mini_cluster-test.cc
+++ b/src/kudu/integration-tests/external_mini_cluster-test.cc
@@ -15,21 +15,24 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <sys/types.h>
-#include <unistd.h>
-
+#include <algorithm>
+#include <cstdint>
 #include <string>
+#include <vector>
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/integration-tests/external_mini_cluster.h"
-#include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/strings/util.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/integration-tests/mini_cluster.h"
 #include "kudu/security/test/mini_kdc.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/net/net_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 METRIC_DECLARE_entity(server);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/external_mini_cluster.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.cc b/src/kudu/integration-tests/external_mini_cluster.cc
index 1693f4b..6091ffd 100644
--- a/src/kudu/integration-tests/external_mini_cluster.cc
+++ b/src/kudu/integration-tests/external_mini_cluster.cc
@@ -18,32 +18,45 @@
 #include "kudu/integration-tests/external_mini_cluster.h"
 
 #include <algorithm>
+#include <csignal>
+#include <cstdint>
+#include <cstdlib>
 #include <functional>
 #include <memory>
 #include <string>
 #include <unordered_set>
 
+#include <gflags/gflags.h>
 #include <gtest/gtest.h>
 #include <rapidjson/document.h>
 
 #include "kudu/client/client.h"
 #include "kudu/client/master_rpc.h"
 #include "kudu/common/wire_protocol.h"
-#include "kudu/gutil/mathlimits.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/gutil/basictypes.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/strings/util.h"
+#include "kudu/master/master.pb.h"
 #include "kudu/master/master.proxy.h"
 #include "kudu/rpc/messenger.h"
+#include "kudu/rpc/rpc_controller.h"
+#include "kudu/security/test/mini_kdc.h"
 #include "kudu/server/server_base.pb.h"
 #include "kudu/server/server_base.proxy.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/tserver/tserver.pb.h"
 #include "kudu/tserver/tserver_service.proxy.h"
 #include "kudu/util/async_util.h"
 #include "kudu/util/curl_util.h"
 #include "kudu/util/env.h"
 #include "kudu/util/env_util.h"
+#include "kudu/util/faststring.h"
 #include "kudu/util/fault_injection.h"
 #include "kudu/util/jsonreader.h"
+#include "kudu/util/make_shared.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/monotime.h"
 #include "kudu/util/net/sockaddr.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/external_mini_cluster.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.h b/src/kudu/integration-tests/external_mini_cluster.h
index c8cbdbf..0a23d9f 100644
--- a/src/kudu/integration-tests/external_mini_cluster.h
+++ b/src/kudu/integration-tests/external_mini_cluster.h
@@ -19,16 +19,21 @@
 
 #include <sys/types.h>
 
+#include <cstdint>
 #include <functional>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <vector>
 
-#include <boost/optional.hpp>
+#include <boost/optional/optional.hpp>
+#include <glog/logging.h>
+#include <gtest/gtest_prod.h>
 
-#include "kudu/client/client.h"
+#include "kudu/client/shared_ptr.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/integration-tests/mini_cluster.h"
 #include "kudu/security/test/mini_kdc.h"
@@ -41,14 +46,25 @@ namespace kudu {
 class ExternalDaemon;
 class ExternalMaster;
 class ExternalTabletServer;
-class HostPort;
-class MetricPrototype;
 class MetricEntityPrototype;
+class MetricPrototype;
 class NodeInstancePB;
-class ScopedSubprocess;
 class Sockaddr;
 class Subprocess;
 
+namespace client {
+class KuduClient;
+class KuduClientBuilder;
+} // namespace client
+
+namespace master {
+class MasterServiceProxy;
+} // namespace master
+
+namespace rpc {
+class Messenger;
+} // namespace rpc
+
 namespace server {
 class ServerStatusPB;
 } // namespace server

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
index c93182b..618a3dd 100644
--- a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
+++ b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
@@ -18,12 +18,14 @@
 #include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
 
 #include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 #include <algorithm>
+#include <ctime>
+#include <ostream>
 #include <set>
 
+#include <glog/logging.h>
+
 #include "kudu/consensus/metadata.pb.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.h b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
index 25af8f0..3341bfe 100644
--- a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
+++ b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
@@ -18,6 +18,7 @@
 #ifndef KUDU_INTEGRATION_TESTS_CLUSTER_EXTERNAL_MINI_CLUSTER_FS_INSPECTOR_H_
 #define KUDU_INTEGRATION_TESTS_CLUSTER_EXTERNAL_MINI_CLUSTER_FS_INSPECTOR_H_
 
+#include <cstdint>
 #include <string>
 #include <vector>
 
@@ -35,10 +36,6 @@ namespace consensus {
 class ConsensusMetadataPB;
 }
 
-namespace tablet {
-class TabletSuperBlockPB;
-}
-
 namespace itest {
 
 // Utility class that digs around in a tablet server's data directory and

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/flex_partitioning-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/flex_partitioning-itest.cc b/src/kudu/integration-tests/flex_partitioning-itest.cc
index a2888f4..c965bb1 100644
--- a/src/kudu/integration-tests/flex_partitioning-itest.cc
+++ b/src/kudu/integration-tests/flex_partitioning-itest.cc
@@ -19,23 +19,42 @@
 // of PK subsets, etc).
 
 #include <algorithm>
-#include <glog/stl_logging.h>
-#include <map>
+#include <cstdint>
 #include <memory>
+#include <ostream>
+#include <string>
+#include <unordered_map>
+#include <utility>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/scan_predicate.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/partial_row.h"
-#include "kudu/integration-tests/external_mini_cluster.h"
-#include "kudu/integration-tests/cluster_itest_util.h"
-#include "kudu/gutil/map-util.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/substitute.h"
+#include "kudu/integration-tests/cluster_itest_util.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/master/master.pb.h"
+#include "kudu/master/master.proxy.h"
+#include "kudu/rpc/rpc_controller.h"
 #include "kudu/tools/data_gen_util.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/random.h"
 #include "kudu/util/random_util.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
-#include "kudu/gutil/strings/escaping.h"
 
 using kudu::client::KuduClient;
 using kudu::client::KuduClientBuilder;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/full_stack-insert-scan-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/full_stack-insert-scan-test.cc b/src/kudu/integration-tests/full_stack-insert-scan-test.cc
index fdb935f..abad0c8 100644
--- a/src/kudu/integration-tests/full_stack-insert-scan-test.cc
+++ b/src/kudu/integration-tests/full_stack-insert-scan-test.cc
@@ -15,24 +15,31 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <signal.h>
+#include <unistd.h>
 
-#include <cmath>
-#include <cstdlib>
+#include <csignal>
+#include <cstdint>
 #include <memory>
+#include <ostream>
 #include <string>
 #include <vector>
 
 #include <gflags/gflags.h>
+#include <gflags/gflags_declare.h>
 #include <glog/logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/client/callbacks.h"
-#include "kudu/client/client.h"
 #include "kudu/client/client-test-util.h"
+#include "kudu/client/client.h"
 #include "kudu/client/row_result.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
 #include "kudu/client/write_op.h"
 #include "kudu/codegen/compilation_manager.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/split.h"
 #include "kudu/gutil/strings/strcat.h"
@@ -40,23 +47,23 @@
 #include "kudu/integration-tests/internal_mini_cluster.h"
 #include "kudu/master/mini_master.h"
 #include "kudu/tablet/tablet.h"
-#include "kudu/tablet/tablet_metrics.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/tserver/ts_tablet_manager.h"
 #include "kudu/util/async_util.h"
 #include "kudu/util/countdown_latch.h"
-#include "kudu/util/errno.h"
+#include "kudu/util/make_shared.h"
 #include "kudu/util/maintenance_manager.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/random.h"
+#include "kudu/util/random_util.h"
+#include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"
+#include "kudu/util/subprocess.h"
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
-#include "kudu/util/status.h"
-#include "kudu/util/subprocess.h"
 #include "kudu/util/thread.h"
-#include "kudu/util/random.h"
-#include "kudu/util/random_util.h"
 
 DEFINE_bool(skip_scans, false, "Whether to skip the scan part of the test.");
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/fuzz-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/fuzz-itest.cc b/src/kudu/integration-tests/fuzz-itest.cc
index 15f37d7..17bee5c 100644
--- a/src/kudu/integration-tests/fuzz-itest.cc
+++ b/src/kudu/integration-tests/fuzz-itest.cc
@@ -15,33 +15,56 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/optional.hpp>
-#include <boost/optional/optional_io.hpp>
-#include <gflags/gflags.h>
-#include <glog/logging.h>
-#include <glog/stl_logging.h>
-#include <gtest/gtest.h>
+#include <cstdint>
+#include <cstdlib>
+#include <functional>
 #include <list>
+#include <map>
+#include <memory>
+#include <ostream>
 #include <string>
+#include <utility>
 #include <vector>
 
+#include <boost/optional/optional.hpp> // IWYU pragma: keep
+#include <boost/optional/optional_io.hpp> // IWYU pragma: keep
+#include <gflags/gflags.h>
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/client/client-test-util.h"
 #include "kudu/client/client.h"
-#include "kudu/client/row_result.h"
+#include "kudu/client/scan_batch.h"
+#include "kudu/client/scan_predicate.h"
 #include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
+#include "kudu/clock/clock.h"
 #include "kudu/clock/logical_clock.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/schema.h"
 #include "kudu/gutil/casts.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
 #include "kudu/master/mini_master.h"
 #include "kudu/tablet/key_value_test_schema.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/tserver/ts_tablet_manager.h"
-#include "kudu/util/stopwatch.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 DEFINE_int32(keyspace_size, 2,  "number of distinct primary keys to test with");

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/internal_mini_cluster-itest-base.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/internal_mini_cluster-itest-base.cc b/src/kudu/integration-tests/internal_mini_cluster-itest-base.cc
index c8775b4..80f171e 100644
--- a/src/kudu/integration-tests/internal_mini_cluster-itest-base.cc
+++ b/src/kudu/integration-tests/internal_mini_cluster-itest-base.cc
@@ -21,6 +21,8 @@
 
 #include "kudu/gutil/stl_util.h"
 #include "kudu/integration-tests/cluster_itest_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/internal_mini_cluster-itest-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/internal_mini_cluster-itest-base.h b/src/kudu/integration-tests/internal_mini_cluster-itest-base.h
index 0a69fb1..7085369 100644
--- a/src/kudu/integration-tests/internal_mini_cluster-itest-base.h
+++ b/src/kudu/integration-tests/internal_mini_cluster-itest-base.h
@@ -25,6 +25,7 @@
 
 #include "kudu/client/client.h"
 #include "kudu/integration-tests/internal_mini_cluster.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 6497668..41ae76e 100644
--- a/src/kudu/integration-tests/internal_mini_cluster.cc
+++ b/src/kudu/integration-tests/internal_mini_cluster.cc
@@ -17,8 +17,14 @@
 
 #include "kudu/integration-tests/internal_mini_cluster.h"
 
+#include <algorithm>
+#include <cstdint>
+#include <ostream>
+#include <unordered_set>
+
 #include "kudu/client/client.h"
-#include "kudu/gutil/strings/join.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/master/catalog_manager.h"
 #include "kudu/master/master.h"
@@ -29,6 +35,11 @@
 #include "kudu/rpc/messenger.h"
 #include "kudu/tserver/mini_tablet_server.h"
 #include "kudu/tserver/tablet_server.h"
+#include "kudu/tserver/tablet_server_options.h"
+#include "kudu/util/env.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/net/net_util.h"
 #include "kudu/util/path_util.h"
 #include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/internal_mini_cluster.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/internal_mini_cluster.h b/src/kudu/integration-tests/internal_mini_cluster.h
index 29d655c..28d137b 100644
--- a/src/kudu/integration-tests/internal_mini_cluster.h
+++ b/src/kudu/integration-tests/internal_mini_cluster.h
@@ -21,22 +21,29 @@
 #include <string>
 #include <vector>
 
+#include <glog/logging.h>
+
 #include "kudu/client/shared_ptr.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/integration-tests/mini_cluster.h"
-#include "kudu/util/env.h"
 
 namespace kudu {
 
+class Env;
+class HostPort;
 namespace client {
 class KuduClient;
 class KuduClientBuilder;
 }
 
 namespace master {
+class MasterServiceProxy;
 class MiniMaster;
 class TSDescriptor;
-class TabletLocationsPB;
+}
+
+namespace rpc {
+class Messenger;
 }
 
 namespace tserver {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/linked_list-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test-util.h b/src/kudu/integration-tests/linked_list-test-util.h
index a73b65a..ccc00d7 100644
--- a/src/kudu/integration-tests/linked_list-test-util.h
+++ b/src/kudu/integration-tests/linked_list-test-util.h
@@ -25,10 +25,12 @@
 
 #include <glog/logging.h>
 
+#include "kudu/clock/hybrid_clock.h"
 #include "kudu/client/client-test-util.h"
 #include "kudu/client/client.h"
 #include "kudu/client/row_result.h"
-#include "kudu/clock/hybrid_clock.h"
+#include "kudu/client/value.h"
+#include "kudu/client/write_op.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/split.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/linked_list-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test.cc b/src/kudu/integration-tests/linked_list-test.cc
index f9fbe9b..dd8a52f 100644
--- a/src/kudu/integration-tests/linked_list-test.cc
+++ b/src/kudu/integration-tests/linked_list-test.cc
@@ -30,28 +30,34 @@
 // To verify, the table is scanned, and we ensure that every key is linked to
 // either zero or one times, and no link_to refers to a missing key.
 
+#include <cstdint>
+#include <ostream>
+#include <string>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
+#include <boost/bind.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
-#include <glog/stl_logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/client/client.h"
-#include "kudu/client/row_result.h"
-#include "kudu/gutil/map-util.h"
-#include "kudu/gutil/stl_util.h"
-#include "kudu/gutil/strings/substitute.h"
-#include "kudu/gutil/strings/split.h"
-#include "kudu/gutil/walltime.h"
+#include "kudu/client/shared_ptr.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
+#include "kudu/integration-tests/cluster_itest_util.h"
+#include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/linked_list-test-util.h"
+#include "kudu/integration-tests/mini_cluster.h"
 #include "kudu/integration-tests/ts_itest-base.h"
-#include "kudu/util/random.h"
-#include "kudu/util/stopwatch.h"
+#include "kudu/tserver/tablet_server-test-base.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
-#include "kudu/util/hdr_histogram.h"
 
 using kudu::client::KuduClient;
-using kudu::client::KuduClientBuilder;
-using kudu::client::KuduSchema;
 using kudu::client::sp::shared_ptr;
 using kudu::itest::TServerDetails;
 using std::string;
@@ -71,6 +77,10 @@ DEFINE_bool(stress_wal_gc, false,
 
 namespace kudu {
 
+namespace client {
+class KuduClient;
+}
+
 class LinkedListTest : public tserver::TabletServerIntegrationTestBase {
  public:
   LinkedListTest() {}

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/log-rolling-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/log-rolling-itest.cc b/src/kudu/integration-tests/log-rolling-itest.cc
index 59c774a..7eb3a45 100644
--- a/src/kudu/integration-tests/log-rolling-itest.cc
+++ b/src/kudu/integration-tests/log-rolling-itest.cc
@@ -18,14 +18,17 @@
 // Tests that log rolling and excess logfile cleanup logic works correctly.
 
 #include <algorithm>
+#include <cstdint>
 #include <string>
 #include <vector>
 
+#include <glog/logging.h>
 #include <gtest/gtest.h>
 
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/util/env.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/0f6dcf83/src/kudu/integration-tests/log_verifier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/log_verifier.cc b/src/kudu/integration-tests/log_verifier.cc
index 05fefd1..47e9c51 100644
--- a/src/kudu/integration-tests/log_verifier.cc
+++ b/src/kudu/integration-tests/log_verifier.cc
@@ -17,23 +17,32 @@
 
 #include "kudu/integration-tests/log_verifier.h"
 
-#include <boost/optional.hpp>
+#include <cstdint>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <set>
 #include <string>
+#include <utility>
 #include <vector>
 
-#include <glog/stl_logging.h>
+#include <boost/optional.hpp>
+#include <glog/logging.h>
 
 #include "kudu/consensus/consensus.pb.h"
+#include "kudu/consensus/log.pb.h"
 #include "kudu/consensus/log_index.h"
 #include "kudu/consensus/log_reader.h"
 #include "kudu/consensus/log_util.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/map-util.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/integration-tests/external_mini_cluster_fs_inspector.h"
+#include "kudu/util/env.h"
+#include "kudu/util/make_shared.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/status.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/integration-tests/log_verifier.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/log_verifier.h b/src/kudu/integration-tests/log_verifier.h
index d029863..4f95235 100644
--- a/src/kudu/integration-tests/log_verifier.h
+++ b/src/kudu/integration-tests/log_verifier.h
@@ -16,6 +16,7 @@
 // under the License.
 #pragma once
 
+#include <cstdint>
 #include <map>
 #include <memory>
 #include <string>

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 5715ba0..788a376 100644
--- a/src/kudu/integration-tests/master-stress-test.cc
+++ b/src/kudu/integration-tests/master-stress-test.cc
@@ -15,27 +15,41 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/logging.h>
-#include <gtest/gtest.h>
+#include <algorithm>
+#include <cstdint>
 #include <memory>
+#include <mutex>
+#include <ostream>
 #include <string>
 #include <thread>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gflags/gflags.h>
+#include <gtest/gtest.h>
+
 #include "kudu/client/client.h"
+#include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
 #include "kudu/common/wire_protocol.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/strings/util.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
+#include "kudu/master/master.pb.h"
 #include "kudu/master/master.proxy.h"
 #include "kudu/rpc/messenger.h"
 #include "kudu/rpc/rpc_controller.h"
 #include "kudu/util/atomic.h"
 #include "kudu/util/condition_variable.h"
 #include "kudu/util/countdown_latch.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/mutex.h"
+#include "kudu/util/net/sockaddr.h"
 #include "kudu/util/oid_generator.h"
 #include "kudu/util/random.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 DEFINE_int32(num_create_table_threads, 4,


Mime
View raw message