kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [05/14] kudu git commit: [iwyu] first pass
Date Mon, 21 Aug 2017 21:03:52 GMT
http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/memrowset-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/memrowset-test.cc b/src/kudu/tablet/memrowset-test.cc
index 8df2889..881a300 100644
--- a/src/kudu/tablet/memrowset-test.cc
+++ b/src/kudu/tablet/memrowset-test.cc
@@ -15,19 +15,44 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
+#include <cstdio>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
+#include "kudu/clock/clock.h"
 #include "kudu/clock/logical_clock.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/row.h"
-#include "kudu/common/scan_spec.h"
+#include "kudu/common/row_changelist.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/consensus/log_anchor_registry.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/stringprintf.h"
 #include "kudu/tablet/memrowset.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/util/faststring.h"
+#include "kudu/util/mem_tracker.h"
+#include "kudu/util/memory/arena.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DEFINE_int32(roundtrip_num_rows, 10000,
              "Number of rows to use for the round-trip test");

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/memrowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/memrowset.cc b/src/kudu/tablet/memrowset.cc
index f113eff..61130e7 100644
--- a/src/kudu/tablet/memrowset.cc
+++ b/src/kudu/tablet/memrowset.cc
@@ -19,6 +19,8 @@
 
 #include <memory>
 #include <string>
+#include <type_traits>
+#include <utility>
 #include <vector>
 
 #include <gflags/gflags.h>
@@ -26,22 +28,29 @@
 
 #include "kudu/codegen/compilation_manager.h"
 #include "kudu/codegen/row_projector.h"
+#include "kudu/common/columnblock.h"
 #include "kudu/common/common.pb.h"
-#include "kudu/common/generic_iterators.h"
+#include "kudu/common/encoded_key.h"
 #include "kudu/common/row.h"
-#include "kudu/consensus/consensus.pb.h"
+#include "kudu/common/row_changelist.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/scan_spec.h"
 #include "kudu/consensus/log_anchor_registry.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/gutil/dynamic_annotations.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/compaction.h"
+#include "kudu/tablet/mutation.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/mem_tracker.h"
-#include "kudu/util/memory/overwrite.h"
+#include "kudu/util/memory/memory.h"
 
 DEFINE_bool(mrs_use_codegen, true, "whether the memrowset should use code "
             "generation for iteration");
 TAG_FLAG(mrs_use_codegen, hidden);
 
-using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/memrowset.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/memrowset.h b/src/kudu/tablet/memrowset.h
index fd827a3..5c15851 100644
--- a/src/kudu/tablet/memrowset.h
+++ b/src/kudu/tablet/memrowset.h
@@ -17,33 +17,52 @@
 #ifndef KUDU_TABLET_MEMROWSET_H
 #define KUDU_TABLET_MEMROWSET_H
 
+#include <cstdint>
+#include <cstring>
 #include <memory>
 #include <mutex>
+#include <ostream>
 #include <string>
 #include <vector>
 
-#include <boost/optional/optional_fwd.hpp>
+#include <boost/optional/optional.hpp>
+#include <glog/logging.h>
 
-#include "kudu/common/rowblock.h"
-#include "kudu/common/scan_spec.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/row.h"
+#include "kudu/common/rowid.h"
 #include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/consensus/log_anchor_registry.h"
+#include "kudu/gutil/atomicops.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/tablet/concurrent_btree.h"
-#include "kudu/tablet/mutation.h"
+#include "kudu/tablet/mvcc.h"
 #include "kudu/tablet/rowset.h"
 #include "kudu/tablet/rowset_metadata.h"
-#include "kudu/tablet/tablet.pb.h"
-#include "kudu/util/mem_tracker.h"
+#include "kudu/util/faststring.h"
 #include "kudu/util/memory/arena.h"
-#include "kudu/util/memory/memory.h"
+#include "kudu/util/slice.h"
 #include "kudu/util/status.h"
 
 namespace kudu {
 
 class MemTracker;
+class MemoryTrackingBufferAllocator;
+class RowBlock;
+class RowBlockRow;
+class RowChangeList;
+class ScanSpec;
+struct IteratorStats;
+
+namespace consensus {
+class OpId;
+}
 
 namespace tablet {
-
 //
 // Implementation notes:
 // --------------------------
@@ -59,7 +78,10 @@ namespace tablet {
 // NOTE: all allocations done by the MemRowSet are done inside its associated
 // thread-safe arena, and then freed in bulk when the MemRowSet is destructed.
 
+class CompactionInput;
 class MemRowSet;
+class Mutation;
+class OperationResultPB;
 
 // The value stored in the CBTree for a single row.
 class MRSRow {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/metadata-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/metadata-test.cc b/src/kudu/tablet/metadata-test.cc
index 6ec3901..cf419ec 100644
--- a/src/kudu/tablet/metadata-test.cc
+++ b/src/kudu/tablet/metadata-test.cc
@@ -15,16 +15,20 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <gtest/gtest.h>
 #include <string>
 #include <vector>
 
-#include "kudu/common/schema.h"
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/fs/block_id.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/rowset_metadata.h"
 #include "kudu/tablet/tablet_metadata.h"
-#include "kudu/gutil/strings/join.h"
-#include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mock-rowsets.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mock-rowsets.h b/src/kudu/tablet/mock-rowsets.h
index 07736e0..62deb55 100644
--- a/src/kudu/tablet/mock-rowsets.h
+++ b/src/kudu/tablet/mock-rowsets.h
@@ -22,6 +22,7 @@
 #include <string>
 #include <vector>
 
+#include "kudu/common/timestamp.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/rowset.h"
 #include "kudu/tablet/rowset_metadata.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mt-diskrowset-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mt-diskrowset-test.cc b/src/kudu/tablet/mt-diskrowset-test.cc
index 348f004..12906dd 100644
--- a/src/kudu/tablet/mt-diskrowset-test.cc
+++ b/src/kudu/tablet/mt-diskrowset-test.cc
@@ -15,10 +15,21 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
 #include <memory>
 #include <thread>
+#include <unordered_set>
+#include <vector>
+
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/tablet/diskrowset-test-base.h"
+#include "kudu/tablet/diskrowset.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DEFINE_int32(num_threads, 2, "Number of threads to test");
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mt-rowset_delta_compaction-test.cc b/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
index 21d2d80..7e13585 100644
--- a/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
+++ b/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
@@ -15,14 +15,34 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstddef>
+#include <cstdint>
 #include <memory>
+#include <vector>
 
+#include <gflags/gflags.h>
+#include <gtest/gtest.h>
+
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/schema.h"
 #include "kudu/gutil/atomicops.h"
-#include "kudu/gutil/stringprintf.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/gutil/walltime.h"
-#include "kudu/util/thread.h"
 #include "kudu/tablet/diskrowset-test-base.h"
+#include "kudu/tablet/diskrowset.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/util/locks.h"
+#include "kudu/util/logging.h"
+#include "kudu/util/memory/arena.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"
 
 enum {
   kDefaultNumSecondsPerThread = 1,

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mt-tablet-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mt-tablet-test.cc b/src/kudu/tablet/mt-tablet-test.cc
index bb6af9a..66194c4 100644
--- a/src/kudu/tablet/mt-tablet-test.cc
+++ b/src/kudu/tablet/mt-tablet-test.cc
@@ -15,17 +15,40 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
+#include <cstdlib>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
 #include <gflags/gflags.h>
+#include <glog/logging.h>
 #include <gtest/gtest.h>
-#include <memory>
 
 #include "kudu/codegen/compilation_manager.h"
-#include "kudu/gutil/macros.h"
+#include "kudu/common/columnblock.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/rowid.h"
+#include "kudu/common/schema.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/tablet/tablet-test-base.h"
+#include "kudu/tablet/tablet.h"
 #include "kudu/util/countdown_latch.h"
+#include "kudu/util/faststring.h"
+#include "kudu/util/memory/arena.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/stopwatch.h"
 #include "kudu/util/test_graph.h"
+#include "kudu/util/test_util.h"
 #include "kudu/util/thread.h"
 
 DECLARE_int32(tablet_history_max_age_sec);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/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 8b01048..56bfed1 100644
--- a/src/kudu/tablet/multi_column_writer.cc
+++ b/src/kudu/tablet/multi_column_writer.cc
@@ -17,12 +17,20 @@
 
 #include "kudu/tablet/multi_column_writer.h"
 
-#include <utility>
+#include <algorithm>
+#include <memory>
+#include <ostream>
+#include <string>
 
+#include "kudu/cfile/cfile_util.h"
 #include "kudu/cfile/cfile_writer.h"
+#include "kudu/common/columnblock.h"
 #include "kudu/common/rowblock.h"
 #include "kudu/common/schema.h"
 #include "kudu/fs/block_id.h"
+#include "kudu/fs/block_manager.h"
+#include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/stl_util.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/multi_column_writer.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/multi_column_writer.h b/src/kudu/tablet/multi_column_writer.h
index 77e6a12..61fe007 100644
--- a/src/kudu/tablet/multi_column_writer.h
+++ b/src/kudu/tablet/multi_column_writer.h
@@ -17,20 +17,23 @@
 #ifndef KUDU_TABLET_MULTI_COLUMN_WRITER_H
 #define KUDU_TABLET_MULTI_COLUMN_WRITER_H
 
+#include <cstddef>
 #include <map>
 #include <string>
 #include <vector>
 
 #include <glog/logging.h>
 
-#include "kudu/common/schema.h"
-#include "kudu/fs/fs_manager.h"
+#include "kudu/fs/block_id.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 
+class FsManager;
 class RowBlock;
 class Schema;
+struct ColumnId;
 
 namespace cfile {
 class CFileWriter;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mutation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mutation.cc b/src/kudu/tablet/mutation.cc
index 6e24fec..7e02f17 100644
--- a/src/kudu/tablet/mutation.cc
+++ b/src/kudu/tablet/mutation.cc
@@ -15,12 +15,17 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "kudu/gutil/atomicops.h"
-#include "kudu/gutil/strings/strcat.h"
 #include "kudu/tablet/mutation.h"
+
 #include <string>
 
+#include "kudu/gutil/atomicops.h"
+#include "kudu/gutil/strings/strcat.h"
+
 namespace kudu {
+
+class Schema;
+
 namespace tablet {
 
 std::string Mutation::StringifyMutationList(const Schema &schema, const Mutation *head) {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mutation.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mutation.h b/src/kudu/tablet/mutation.h
index 0b90d76..fd9d92c 100644
--- a/src/kudu/tablet/mutation.h
+++ b/src/kudu/tablet/mutation.h
@@ -18,17 +18,25 @@
 #ifndef KUDU_TABLET_MUTATION_H
 #define KUDU_TABLET_MUTATION_H
 
+#include <cstdint>
+#include <cstring>
+#include <new>
+#include <ostream>
 #include <string>
 
+#include <glog/logging.h>
+
 #include "kudu/common/row_changelist.h"
-#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/gutil/atomicops.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/port.h"
-#include "kudu/util/memory/arena.h"
 #include "kudu/util/slice.h"
-#include "kudu/tablet/mvcc.h"
 
 namespace kudu {
+
+class Schema;
+
 namespace tablet {
 
 // A single mutation associated with a row.

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mvcc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mvcc-test.cc b/src/kudu/tablet/mvcc-test.cc
index 705a336..6a086eb 100644
--- a/src/kudu/tablet/mvcc-test.cc
+++ b/src/kudu/tablet/mvcc-test.cc
@@ -15,15 +15,26 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/logging.h>
-#include <gtest/gtest.h>
 #include <mutex>
+#include <ostream>
+#include <string>
 #include <thread>
+#include <vector>
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
 
+#include "kudu/clock/clock.h"
 #include "kudu/clock/hybrid_clock.h"
 #include "kudu/clock/logical_clock.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/tablet/mvcc.h"
+#include "kudu/util/locks.h"
 #include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using std::thread;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mvcc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mvcc.cc b/src/kudu/tablet/mvcc.cc
index d8f25f0..5408bd9 100644
--- a/src/kudu/tablet/mvcc.cc
+++ b/src/kudu/tablet/mvcc.cc
@@ -18,19 +18,19 @@
 #include "kudu/tablet/mvcc.h"
 
 #include <algorithm>
-#include <glog/logging.h>
 #include <mutex>
+#include <ostream>
+#include <utility>
+
+#include <glog/logging.h>
 
-#include "kudu/clock/logical_clock.h"
 #include "kudu/gutil/map-util.h"
-#include "kudu/gutil/mathlimits.h"
 #include "kudu/gutil/port.h"
-#include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strings/strcat.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/countdown_latch.h"
 #include "kudu/util/debug/trace_event.h"
-#include "kudu/util/stopwatch.h"
+#include "kudu/util/monotime.h"
 
 namespace kudu {
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/mvcc.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mvcc.h b/src/kudu/tablet/mvcc.h
index 7b5cdf8..6c9c103 100644
--- a/src/kudu/tablet/mvcc.h
+++ b/src/kudu/tablet/mvcc.h
@@ -17,18 +17,23 @@
 #ifndef KUDU_TABLET_MVCC_H
 #define KUDU_TABLET_MVCC_H
 
-#include <gtest/gtest_prod.h>
 #include <mutex>
 #include <string>
 #include <unordered_map>
 #include <vector>
 
-#include "kudu/clock/clock.h"
-#include "kudu/gutil/gscoped_ptr.h"
+#include <gtest/gtest_prod.h>
+
+#include "kudu/common/timestamp.h"
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/util/locks.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 class CountDownLatch;
+class MonoTime;
+
 namespace tablet {
 class MvccManager;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/row_op.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/row_op.cc b/src/kudu/tablet/row_op.cc
index 058f40f..c176707 100644
--- a/src/kudu/tablet/row_op.cc
+++ b/src/kudu/tablet/row_op.cc
@@ -15,14 +15,25 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "kudu/common/wire_protocol.h"
 #include "kudu/tablet/row_op.h"
+
+#include <algorithm>
+#include <type_traits>
+
+#include <glog/logging.h>
+
+#include "kudu/common/wire_protocol.h"
+#include "kudu/gutil/move.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/tablet/tablet.pb.h"
 #include "kudu/util/pb_util.h"
 
 using kudu::pb_util::SecureDebugString;
 
 namespace kudu {
+
+class Status;
+
 namespace tablet {
 
 RowOp::RowOp(DecodedRowOperation decoded_op)

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/row_op.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/row_op.h b/src/kudu/tablet/row_op.h
index f10bc9b..c156546 100644
--- a/src/kudu/tablet/row_op.h
+++ b/src/kudu/tablet/row_op.h
@@ -19,17 +19,21 @@
 
 #include <string>
 
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/common/row_operations.h"
-#include "kudu/tablet/rowset.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/tablet/lock_manager.h"
 
 namespace kudu {
 
 class Schema;
+class Status;
 
 namespace tablet {
 
+class OperationResultPB;
+class RowSet;
+class RowSetKeyProbe;
+
 // Structure tracking the progress of a single row operation within a WriteTransaction.
 struct RowOp {
  public:
@@ -98,11 +102,9 @@ struct RowOp {
 
   // The result of the operation, after Apply.
   gscoped_ptr<OperationResultPB> result;
-
 };
 
 
 } // namespace tablet
 } // namespace kudu
 #endif /* KUDU_TABLET_ROW_OP_H */
-

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset.cc b/src/kudu/tablet/rowset.cc
index b81bb91..7023c56 100644
--- a/src/kudu/tablet/rowset.cc
+++ b/src/kudu/tablet/rowset.cc
@@ -17,16 +17,19 @@
 
 #include "kudu/tablet/rowset.h"
 
+#include <algorithm>
 #include <limits>
 #include <memory>
 #include <string>
 #include <vector>
 
 #include "kudu/common/generic_iterators.h"
-#include "kudu/gutil/stl_util.h"
-#include "kudu/gutil/stringprintf.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/rowset_metadata.h"
+#include "kudu/util/make_shared.h"
 
 using std::shared_ptr;
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset.h b/src/kudu/tablet/rowset.h
index 43bc74d..a6fed1b 100644
--- a/src/kudu/tablet/rowset.h
+++ b/src/kudu/tablet/rowset.h
@@ -17,25 +17,36 @@
 #ifndef KUDU_TABLET_ROWSET_H
 #define KUDU_TABLET_ROWSET_H
 
+#include <cstddef>
+#include <cstdint>
 #include <memory>
 #include <mutex>
+#include <ostream>
 #include <string>
 #include <vector>
 
-#include "kudu/cfile/cfile_util.h"
-#include "kudu/common/iterator.h"
+#include <glog/logging.h>
+
+#include "kudu/common/common.pb.h"
+#include "kudu/common/encoded_key.h"
+#include "kudu/common/row.h"
 #include "kudu/common/rowid.h"
-#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
-#include "kudu/tablet/mvcc.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
 #include "kudu/util/bloom_filter.h"
-#include "kudu/util/faststring.h"
-#include "kudu/util/slice.h"
 #include "kudu/util/status.h"
+// IWYU pragma: no_include "kudu/util/monotime.h"
 
 namespace kudu {
 
+class MonoTime; // IWYU pragma: keep
 class RowChangeList;
+class RowwiseIterator;
+class Schema;
+class Slice;
 
 namespace consensus {
 class OpId;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_info.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_info.cc b/src/kudu/tablet/rowset_info.cc
index f65ca0d..bbfbeb8 100644
--- a/src/kudu/tablet/rowset_info.cc
+++ b/src/kudu/tablet/rowset_info.cc
@@ -18,22 +18,25 @@
 #include "kudu/tablet/rowset_info.h"
 
 #include <algorithm>
+#include <cstdint>
+#include <cstring>
 #include <memory>
-#include <unordered_map>
+#include <ostream>
 #include <string>
+#include <type_traits>
+#include <unordered_map>
 #include <utility>
 
 #include <glog/logging.h>
-#include <inttypes.h>
 
 #include "kudu/gutil/casts.h"
 #include "kudu/gutil/endian.h"
-#include "kudu/gutil/map-util.h"
-#include "kudu/gutil/strings/util.h"
+#include "kudu/gutil/stringprintf.h"
 #include "kudu/tablet/rowset.h"
 #include "kudu/tablet/rowset_tree.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/slice.h"
+#include "kudu/util/status.h"
 
 using std::shared_ptr;
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_metadata.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_metadata.cc b/src/kudu/tablet/rowset_metadata.cc
index 99b7d68..7f26988 100644
--- a/src/kudu/tablet/rowset_metadata.cc
+++ b/src/kudu/tablet/rowset_metadata.cc
@@ -17,17 +17,18 @@
 
 #include "kudu/tablet/rowset_metadata.h"
 
+#include <algorithm>
 #include <mutex>
+#include <ostream>
 #include <string>
 #include <unordered_set>
-#include <utility>
 #include <vector>
 
 #include <glog/stl_logging.h>
 
-#include "kudu/common/wire_protocol.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/map-util.h"
+#include "kudu/tablet/metadata.pb.h"
 
 using std::vector;
 using strings::Substitute;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_metadata.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_metadata.h b/src/kudu/tablet/rowset_metadata.h
index edd91aa..9f1e62e 100644
--- a/src/kudu/tablet/rowset_metadata.h
+++ b/src/kudu/tablet/rowset_metadata.h
@@ -17,29 +17,32 @@
 #ifndef KUDU_TABLET_ROWSET_METADATA_H
 #define KUDU_TABLET_ROWSET_METADATA_H
 
+#include <cstdint>
 #include <map>
 #include <mutex>
 #include <string>
 #include <vector>
 
 #include <boost/container/flat_map.hpp>
+#include <boost/container/vector.hpp>
+#include <glog/logging.h>
 
 #include "kudu/common/schema.h"
 #include "kudu/fs/block_id.h"
 #include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/map-util.h"
 #include "kudu/tablet/tablet_metadata.h"
-#include "kudu/util/debug-util.h"
-#include "kudu/util/env.h"
 #include "kudu/util/locks.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 
 namespace tablet {
 
+class RowSetDataPB;
 class RowSetMetadataUpdate;
-class TabletMetadata;
 
 // Keeps track of the RowSet data blocks.
 //

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_tree-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_tree-test.cc b/src/kudu/tablet/rowset_tree-test.cc
index 9b9cb8b..74b99a1 100644
--- a/src/kudu/tablet/rowset_tree-test.cc
+++ b/src/kudu/tablet/rowset_tree-test.cc
@@ -15,17 +15,25 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/logging.h>
-#include <gtest/gtest.h>
+#include <algorithm>
+#include <cstdlib>
 #include <memory>
-#include <stdio.h>
 #include <unordered_set>
+#include <string>
+#include <vector>
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/gutil/map-util.h"
+#include "kudu/gutil/stringprintf.h"
 #include "kudu/tablet/mock-rowsets.h"
 #include "kudu/tablet/rowset.h"
 #include "kudu/tablet/rowset_tree.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/slice.h"
 #include "kudu/util/stopwatch.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using std::shared_ptr;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_tree.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_tree.cc b/src/kudu/tablet/rowset_tree.cc
index afffa40..2ffa2a9 100644
--- a/src/kudu/tablet/rowset_tree.cc
+++ b/src/kudu/tablet/rowset_tree.cc
@@ -23,12 +23,16 @@
 #include <memory>
 #include <string>
 #include <vector>
+#include <ostream>
+
+#include <glog/logging.h>
 
 #include "kudu/gutil/stl_util.h"
 #include "kudu/tablet/rowset.h"
 #include "kudu/tablet/rowset_metadata.h"
-#include "kudu/util/interval_tree.h"
 #include "kudu/util/interval_tree-inl.h"
+#include "kudu/util/interval_tree.h"
+#include "kudu/util/make_shared.h"
 #include "kudu/util/slice.h"
 
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/rowset_tree.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_tree.h b/src/kudu/tablet/rowset_tree.h
index eb98138..cc4adc5 100644
--- a/src/kudu/tablet/rowset_tree.h
+++ b/src/kudu/tablet/rowset_tree.h
@@ -17,14 +17,16 @@
 #ifndef KUDU_TABLET_ROWSET_MANAGER_H
 #define KUDU_TABLET_ROWSET_MANAGER_H
 
+#include <cstdint>
+#include <functional>
 #include <unordered_map>
 #include <vector>
-#include <utility>
 
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/map-util.h"
-#include "kudu/util/status.h"
 #include "kudu/tablet/rowset.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/svg_dump.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/svg_dump.cc b/src/kudu/tablet/svg_dump.cc
index f0e8a74..50f46be 100644
--- a/src/kudu/tablet/svg_dump.cc
+++ b/src/kudu/tablet/svg_dump.cc
@@ -17,18 +17,19 @@
 
 #include "kudu/tablet/svg_dump.h"
 
-#include <glog/logging.h>
-#include <time.h>
-
+#include <ctime>
 #include <fstream>
-#include <iostream>
 #include <string>
 #include <unordered_set>
 #include <vector>
 
-#include "kudu/common/encoded_key.h"
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
 #include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
 #include "kudu/gutil/map-util.h"
+#include "kudu/gutil/move.h"
 #include "kudu/gutil/stringprintf.h"
 #include "kudu/gutil/strings/util.h"
 #include "kudu/tablet/rowset_info.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/svg_dump.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/svg_dump.h b/src/kudu/tablet/svg_dump.h
index caba777..59c1397 100644
--- a/src/kudu/tablet/svg_dump.h
+++ b/src/kudu/tablet/svg_dump.h
@@ -17,6 +17,7 @@
 #ifndef KUDU_TABLET_COMPACTION_SVG_DUMP_H_
 #define KUDU_TABLET_COMPACTION_SVG_DUMP_H_
 
+#include <cstddef>
 #include <ostream>
 #include <unordered_set>
 #include <vector>

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet-decoder-eval-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-decoder-eval-test.cc b/src/kudu/tablet/tablet-decoder-eval-test.cc
index 991d3c4..3522629 100644
--- a/src/kudu/tablet/tablet-decoder-eval-test.cc
+++ b/src/kudu/tablet/tablet-decoder-eval-test.cc
@@ -15,14 +15,41 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
+#include <cinttypes>
+#include <cstdint>
+#include <cstring>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <unordered_map>
+
+#include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include "kudu/gutil/strings/substitute.h"
-#include <kudu/util/flags.h>
-
+#include "kudu/common/column_predicate.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/row.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/scan_spec.h"
 #include "kudu/common/schema.h"
-#include "kudu/tablet/tablet-test-base.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/stringprintf.h"
+#include "kudu/gutil/strings/substitute.h"
+#include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/util/auto_release_pool.h"
+#include "kudu/util/compression/compression.pb.h"
+#include "kudu/util/memory/arena.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
+#include "kudu/util/stopwatch.h"
+#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DEFINE_int32(decoder_eval_test_nrepeats, 1, "Number of times to repeat per tablet");
 DEFINE_int32(decoder_eval_test_lower, 0, "Lower bound on the predicate [lower, upper)");

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet-harness.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-harness.h b/src/kudu/tablet/tablet-harness.h
index 9d61ff2..5fc547c 100644
--- a/src/kudu/tablet/tablet-harness.h
+++ b/src/kudu/tablet/tablet-harness.h
@@ -24,9 +24,11 @@
 
 #include "kudu/clock/hybrid_clock.h"
 #include "kudu/clock/logical_clock.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/common/schema.h"
 #include "kudu/consensus/log_anchor_registry.h"
 #include "kudu/consensus/metadata.pb.h"
+#include "kudu/fs/fs_manager.h"
 #include "kudu/tablet/tablet.h"
 #include "kudu/util/env.h"
 #include "kudu/util/mem_tracker.h"
@@ -50,8 +52,7 @@ static std::pair<PartitionSchema, Partition> CreateDefaultPartition(const Schema
 
   // Create the tablet partitions.
   std::vector<Partition> partitions;
-  CHECK_OK(partition_schema.CreatePartitions(
-      std::vector<KuduPartialRow>(), {}, schema, &partitions));
+  CHECK_OK(partition_schema.CreatePartitions({}, {}, schema, &partitions));
   CHECK_EQ(1, partitions.size());
   return std::make_pair(partition_schema, partitions[0]);
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet-pushdown-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-pushdown-test.cc b/src/kudu/tablet/tablet-pushdown-test.cc
index 03758bc..cabc2a3 100644
--- a/src/kudu/tablet/tablet-pushdown-test.cc
+++ b/src/kudu/tablet/tablet-pushdown-test.cc
@@ -15,17 +15,35 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/logging.h>
-#include <gtest/gtest.h>
-
 #include <algorithm>
+#include <cinttypes>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <unordered_map>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/common/column_predicate.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/iterator_stats.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/row.h"
+#include "kudu/common/scan_spec.h"
 #include "kudu/common/schema.h"
-#include "kudu/tablet/tablet-test-base.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/stringprintf.h"
+#include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/tablet-test-util.h"
 #include "kudu/tablet/tablet.h"
 #include "kudu/util/auto_release_pool.h"
 #include "kudu/util/memory/arena.h"
+#include "kudu/util/status.h"
+#include "kudu/util/stopwatch.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/tablet/tablet-schema-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-schema-test.cc b/src/kudu/tablet/tablet-schema-test.cc
index a066bfc..4b428e7 100644
--- a/src/kudu/tablet/tablet-schema-test.cc
+++ b/src/kudu/tablet/tablet-schema-test.cc
@@ -15,19 +15,29 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstddef>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
-#include <algorithm>
-#include <vector>
-
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/common/schema.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/tablet/transactions/alter_schema_transaction.h"
+#include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/tablet-test-util.h"
 #include "kudu/tablet/tablet.h"
-#include "kudu/tablet/tablet-test-base.h"
+#include "kudu/tablet/tablet_metadata.h"
+#include "kudu/util/slice.h"
+#include "kudu/util/status.h"
 #include "kudu/util/test_macros.h"
-#include "kudu/util/test_util.h"
 
 using std::pair;
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet-test-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test-base.h b/src/kudu/tablet/tablet-test-base.h
index 3f4df2d..92ce1b6 100644
--- a/src/kudu/tablet/tablet-test-base.h
+++ b/src/kudu/tablet/tablet-test-base.h
@@ -18,14 +18,15 @@
 #define KUDU_TABLET_TABLET_TEST_BASE_H
 
 #include <algorithm>
-#include <boost/optional.hpp>
-#include <glog/logging.h>
-#include <gtest/gtest.h>
 #include <limits>
 #include <string>
 #include <unordered_set>
 #include <vector>
 
+#include <boost/optional/optional.hpp>
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include "kudu/common/partial_row.h"
 #include "kudu/common/row.h"
 #include "kudu/common/scan_spec.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test-util.h b/src/kudu/tablet/tablet-test-util.h
index 515ff0c..4b76bac 100644
--- a/src/kudu/tablet/tablet-test-util.h
+++ b/src/kudu/tablet/tablet-test-util.h
@@ -22,6 +22,8 @@
 #include <string>
 #include <vector>
 
+#include <gflags/gflags.h>
+
 #include "kudu/common/iterator.h"
 #include "kudu/gutil/casts.h"
 #include "kudu/gutil/strings/join.h"
@@ -31,6 +33,7 @@
 #include "kudu/tablet/transactions/alter_schema_transaction.h"
 #include "kudu/tablet/transactions/write_transaction.h"
 #include "kudu/util/metrics.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/tablet/tablet-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test.cc b/src/kudu/tablet/tablet-test.cc
index 1e257db..d09ff20 100644
--- a/src/kudu/tablet/tablet-test.cc
+++ b/src/kudu/tablet/tablet-test.cc
@@ -15,21 +15,50 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
+#include <cstdint>
 #include <ctime>
-
+#include <map>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include <boost/optional/optional.hpp>
+#include <gflags/gflags.h>
 #include <glog/logging.h>
+#include <gtest/gtest.h>
 
 #include "kudu/cfile/cfile_util.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/iterator.h"
-#include "kudu/common/row.h"
-#include "kudu/common/scan_spec.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/fs/block_id.h"
+#include "kudu/fs/block_manager.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/join.h"
+#include "kudu/tablet/delta_key.h"
+#include "kudu/tablet/delta_stats.h"
 #include "kudu/tablet/deltafile.h"
 #include "kudu/tablet/local_tablet_writer.h"
-#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/rowset_metadata.h"
 #include "kudu/tablet/tablet-test-base.h"
-#include "kudu/util/slice.h"
+#include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/tablet/tablet_metadata.h"
+#include "kudu/util/faststring.h"
+#include "kudu/util/jsonwriter.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/status.h"
+#include "kudu/util/stopwatch.h"
 #include "kudu/util/test_macros.h"
 
 DEFINE_int32(testflush_num_inserts, 1000,

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.cc b/src/kudu/tablet/tablet.cc
index 6da7ea3..90c4835 100644
--- a/src/kudu/tablet/tablet.cc
+++ b/src/kudu/tablet/tablet.cc
@@ -18,55 +18,79 @@
 #include "kudu/tablet/tablet.h"
 
 #include <algorithm>
+#include <cstdlib>
+#include <cstring>
 #include <iterator>
-#include <limits>
 #include <memory>
 #include <mutex>
 #include <ostream>
+#include <type_traits>
+#include <unordered_map>
 #include <unordered_set>
 #include <utility>
 #include <vector>
 
-#include "kudu/cfile/cfile_writer.h"
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
 #include "kudu/clock/hybrid_clock.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/encoded_key.h"
+#include "kudu/common/generic_iterators.h"
 #include "kudu/common/iterator.h"
+#include "kudu/common/partition.h"
+#include "kudu/common/row.h"
 #include "kudu/common/row_changelist.h"
 #include "kudu/common/row_operations.h"
+#include "kudu/common/rowid.h"
 #include "kudu/common/scan_spec.h"
 #include "kudu/common/schema.h"
-#include "kudu/consensus/consensus.pb.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/common/types.h"
+#include "kudu/common/wire_protocol.pb.h"
 #include "kudu/consensus/log_anchor_registry.h"
-#include "kudu/consensus/opid_util.h"
-#include "kudu/gutil/atomicops.h"
-#include "kudu/gutil/map-util.h"
+#include "kudu/consensus/opid.pb.h"
+#include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/basictypes.h"
+#include "kudu/gutil/bind.h"
+#include "kudu/gutil/bind_helpers.h"
+#include "kudu/gutil/casts.h"
+#include "kudu/gutil/move.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/human_readable.h"
-#include "kudu/gutil/strings/numbers.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/compaction.h"
 #include "kudu/tablet/compaction_policy.h"
-#include "kudu/tablet/delta_compaction.h"
+#include "kudu/tablet/delta_tracker.h"
 #include "kudu/tablet/diskrowset.h"
+#include "kudu/tablet/memrowset.h"
 #include "kudu/tablet/row_op.h"
 #include "kudu/tablet/rowset_info.h"
+#include "kudu/tablet/rowset_metadata.h"
 #include "kudu/tablet/rowset_tree.h"
 #include "kudu/tablet/svg_dump.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/tablet/tablet_metrics.h"
 #include "kudu/tablet/tablet_mm_ops.h"
 #include "kudu/tablet/transactions/alter_schema_transaction.h"
 #include "kudu/tablet/transactions/write_transaction.h"
+#include "kudu/tserver/tserver.pb.h"
+#include "kudu/util/bitmap.h"
 #include "kudu/util/bloom_filter.h"
 #include "kudu/util/debug/trace_event.h"
-#include "kudu/util/env.h"
+#include "kudu/util/faststring.h"
 #include "kudu/util/fault_injection.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/locks.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/maintenance_manager.h"
-#include "kudu/util/mem_tracker.h"
+#include "kudu/util/make_shared.h"
 #include "kudu/util/metrics.h"
-#include "kudu/util/scoped_cleanup.h"
-#include "kudu/util/stopwatch.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"
 
@@ -160,6 +184,10 @@ using std::vector;
 using strings::Substitute;
 
 namespace kudu {
+
+class RowBlock;
+struct IteratorStats;
+
 namespace tablet {
 
 static CompactionPolicy *CreateCompactionPolicy() {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.h b/src/kudu/tablet/tablet.h
index 3f3c006..daf7227 100644
--- a/src/kudu/tablet/tablet.h
+++ b/src/kudu/tablet/tablet.h
@@ -17,7 +17,8 @@
 #ifndef KUDU_TABLET_TABLET_H
 #define KUDU_TABLET_TABLET_H
 
-#include <condition_variable>
+#include <cstddef>
+#include <cstdint>
 #include <iosfwd>
 #include <map>
 #include <memory>
@@ -25,37 +26,41 @@
 #include <string>
 #include <vector>
 
+#include <gtest/gtest_prod.h>
+
+#include "kudu/clock/clock.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/iterator.h"
 #include "kudu/common/schema.h"
-#include "kudu/gutil/atomicops.h"
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/tablet/lock_manager.h"
 #include "kudu/tablet/mvcc.h"
 #include "kudu/tablet/rowset.h"
-#include "kudu/tablet/rowset_metadata.h"
 #include "kudu/tablet/tablet_mem_trackers.h"
 #include "kudu/tablet/tablet_metadata.h"
+#include "kudu/util/bloom_filter.h"
 #include "kudu/util/locks.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/rw_semaphore.h"
 #include "kudu/util/semaphore.h"
-#include "kudu/util/slice.h"
 #include "kudu/util/status.h"
-#include "kudu/util/throttler.h"
 
 namespace kudu {
 
+class ConstContiguousRow;
 class MaintenanceManager;
 class MaintenanceOp;
 class MaintenanceOpStats;
 class MemTracker;
-class MetricEntity;
-class RowChangeList;
-class UnionIterator;
-
-namespace clock {
-class Clock;
-}
+class MonoDelta;
+class RowBlock;
+class ScanSpec;
+class Throttler;
+class Timestamp;
+struct IteratorStats;
 
 namespace log {
 class LogAnchorRegistry;
@@ -67,7 +72,6 @@ class AlterSchemaTransactionState;
 class CompactionPolicy;
 class HistoryGcOpts;
 class MemRowSet;
-class MvccSnapshot;
 struct RowOp;
 class RowSetsInCompaction;
 class RowSetTree;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_bootstrap-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_bootstrap-test.cc b/src/kudu/tablet/tablet_bootstrap-test.cc
index 5b51ccf..e31574f 100644
--- a/src/kudu/tablet/tablet_bootstrap-test.cc
+++ b/src/kudu/tablet/tablet_bootstrap-test.cc
@@ -17,23 +17,65 @@
 
 #include "kudu/consensus/log-test-base.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <limits>
 #include <memory>
+#include <ostream>
+#include <string>
+#include <type_traits>
+#include <utility>
 #include <vector>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/clock/clock.h"
 #include "kudu/clock/logical_clock.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/iterator.h"
+#include "kudu/common/partition.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/common/wire_protocol-test-util.h"
+#include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
 #include "kudu/consensus/consensus-test-util.h"
+#include "kudu/consensus/consensus.pb.h"
 #include "kudu/consensus/consensus_meta.h"
 #include "kudu/consensus/consensus_meta_manager.h"
+#include "kudu/consensus/log.h"
 #include "kudu/consensus/log_anchor_registry.h"
+#include "kudu/consensus/log_reader.h"
 #include "kudu/consensus/log_util.h"
 #include "kudu/consensus/metadata.pb.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/consensus/ref_counted_replicate.h"
 #include "kudu/fs/data_dirs.h"
+#include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/rpc/result_tracker.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/rowset_metadata.h"
+#include "kudu/tablet/tablet-harness.h"
 #include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/tablet/tablet_bootstrap.h"
 #include "kudu/tablet/tablet_metadata.h"
+#include "kudu/tablet/tablet_replica.h"
+#include "kudu/tserver/tserver.pb.h"
+#include "kudu/util/env.h"
 #include "kudu/util/logging_test_util.h"
+#include "kudu/util/pb_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 using std::shared_ptr;
 using std::string;
@@ -41,6 +83,9 @@ using std::unique_ptr;
 using std::vector;
 
 namespace kudu {
+
+class MemTracker;
+
 namespace tablet {
 
 using clock::Clock;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_bootstrap.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_bootstrap.cc b/src/kudu/tablet/tablet_bootstrap.cc
index f6b9d65..1eb6533 100644
--- a/src/kudu/tablet/tablet_bootstrap.cc
+++ b/src/kudu/tablet/tablet_bootstrap.cc
@@ -17,47 +17,78 @@
 
 #include "kudu/tablet/tablet_bootstrap.h"
 
-#include <gflags/gflags.h>
+#include <algorithm>
+#include <cstdint>
+#include <iterator>
 #include <map>
 #include <memory>
+#include <ostream>
 #include <string>
+#include <unordered_map>
 #include <utility>
 #include <vector>
 
+#include <gflags/gflags.h>
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
+
 #include "kudu/clock/clock.h"
 #include "kudu/clock/hybrid_clock.h"
-#include "kudu/common/partial_row.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/row_operations.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/consensus/consensus.pb.h"
 #include "kudu/consensus/log.h"
+#include "kudu/consensus/log.pb.h"
 #include "kudu/consensus/log_anchor_registry.h"
 #include "kudu/consensus/log_reader.h"
 #include "kudu/consensus/log_util.h"
 #include "kudu/consensus/metadata.pb.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
+#include "kudu/consensus/raft_consensus.h"
 #include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/bind.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/map-util.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/human_readable.h"
-#include "kudu/gutil/strings/strcat.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/gutil/strings/util.h"
 #include "kudu/gutil/walltime.h"
 #include "kudu/rpc/result_tracker.h"
-#include "kudu/tablet/lock_manager.h"
+#include "kudu/rpc/rpc_header.pb.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/mvcc.h"
 #include "kudu/tablet/row_op.h"
+#include "kudu/tablet/rowset.h"
+#include "kudu/tablet/rowset_metadata.h"
 #include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/tablet/tablet_metadata.h"
+#include "kudu/tablet/tablet_replica.h"
 #include "kudu/tablet/transactions/alter_schema_transaction.h"
+#include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/write_transaction.h"
+#include "kudu/tserver/tserver.pb.h"
+#include "kudu/tserver/tserver_admin.pb.h"
 #include "kudu/util/debug/trace_event.h"
+#include "kudu/util/env.h"
 #include "kudu/util/fault_injection.h"
 #include "kudu/util/flag_tags.h"
-#include "kudu/util/locks.h"
 #include "kudu/util/logging.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/path_util.h"
 #include "kudu/util/pb_util.h"
-#include "kudu/util/scoped_cleanup.h"
 #include "kudu/util/stopwatch.h"
 
+
 DECLARE_int32(group_commit_queue_size_bytes);
 
 DEFINE_bool(skip_remove_old_recovery_dir, false,

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_bootstrap.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_bootstrap.h b/src/kudu/tablet/tablet_bootstrap.h
index 83df3ff..4a147cc 100644
--- a/src/kudu/tablet/tablet_bootstrap.h
+++ b/src/kudu/tablet/tablet_bootstrap.h
@@ -17,22 +17,14 @@
 #pragma once
 
 #include <memory>
-#include <string>
-#include <vector>
 
-#include "kudu/common/schema.h"
-#include "kudu/consensus/log.pb.h"
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/ref_counted.h"
-#include "kudu/tablet/tablet_replica.h"
-#include "kudu/util/rw_mutex.h"
 #include "kudu/util/status.h"
 
 namespace kudu {
 
+class MemTracker;
 class MetricRegistry;
-class Partition;
-class PartitionSchema;
 
 namespace log {
 class Log;
@@ -40,8 +32,8 @@ class LogAnchorRegistry;
 }
 
 namespace consensus {
+class RaftConfigPB;
 struct ConsensusBootstrapInfo;
-class ConsensusMetadataManager;
 } // namespace consensus
 
 namespace rpc {
@@ -55,6 +47,7 @@ class Clock;
 namespace tablet {
 class Tablet;
 class TabletMetadata;
+class TabletReplica;
 
 extern const char* kLogRecoveryDir;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_history_gc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_history_gc-test.cc b/src/kudu/tablet/tablet_history_gc-test.cc
index c8a5f08..d12bba7 100644
--- a/src/kudu/tablet/tablet_history_gc-test.cc
+++ b/src/kudu/tablet/tablet_history_gc-test.cc
@@ -15,16 +15,46 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
 #include <atomic>
-#include <gflags/gflags.h>
 
+#include <cstdint>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include <boost/optional/optional.hpp>
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/clock/clock.h"
 #include "kudu/clock/hybrid_clock.h"
 #include "kudu/clock/mock_ntp.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/gutil/casts.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/strings/substitute.h"
+#include "kudu/gutil/walltime.h"
 #include "kudu/tablet/compaction.h"
-#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/diskrowset.h"
+#include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/rowset.h"
+#include "kudu/tablet/rowset_metadata.h"
+#include "kudu/tablet/tablet-harness.h"
 #include "kudu/tablet/tablet-test-base.h"
 #include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet_metadata.h"
 #include "kudu/tablet/tablet_metrics.h"
+#include "kudu/util/make_shared.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 DECLARE_bool(enable_maintenance_manager);
 DECLARE_int32(tablet_history_max_age_sec);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_metadata-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metadata-test.cc b/src/kudu/tablet/tablet_metadata-test.cc
index 5bc3e7d..72287e0 100644
--- a/src/kudu/tablet/tablet_metadata-test.cc
+++ b/src/kudu/tablet/tablet_metadata-test.cc
@@ -15,15 +15,27 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <cstdint>
+#include <memory>
+#include <ostream>
+#include <string>
+
 #include <glog/logging.h>
+#include <gtest/gtest.h>
 
-#include "kudu/common/schema.h"
+#include "kudu/common/partial_row.h"
 #include "kudu/common/wire_protocol-test-util.h"
-#include "kudu/fs/fs_manager.h"
-#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
 #include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/metadata.pb.h"
+#include "kudu/tablet/tablet-harness.h"
 #include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet_metadata.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/status.h"
+#include "kudu/util/test_macros.h"
 
 namespace kudu {
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_metadata.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metadata.cc b/src/kudu/tablet/tablet_metadata.cc
index 463ae3d..93502e8 100644
--- a/src/kudu/tablet/tablet_metadata.cc
+++ b/src/kudu/tablet/tablet_metadata.cc
@@ -18,25 +18,32 @@
 #include "kudu/tablet/tablet_metadata.h"
 
 #include <algorithm>
-#include <boost/optional.hpp>
-#include <gflags/gflags.h>
 #include <mutex>
+#include <ostream>
 #include <string>
+#include <type_traits>
+
+#include <boost/optional/optional.hpp>
+#include <gflags/gflags.h>
 
+#include "kudu/common/schema.h"
 #include "kudu/common/wire_protocol.h"
-#include "kudu/consensus/metadata.pb.h"
 #include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
-#include "kudu/fs/block_manager.h"
+#include "kudu/fs/block_id.h"
 #include "kudu/fs/data_dirs.h"
+#include "kudu/fs/fs.pb.h"
+#include "kudu/fs/fs_manager.h"
 #include "kudu/gutil/atomicops.h"
 #include "kudu/gutil/bind.h"
-#include "kudu/gutil/dynamic_annotations.h"
 #include "kudu/gutil/map-util.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/rowset_metadata.h"
 #include "kudu/util/debug/trace_event.h"
+#include "kudu/util/env.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/pb_util.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_metadata.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metadata.h b/src/kudu/tablet/tablet_metadata.h
index 316b390..afac374 100644
--- a/src/kudu/tablet/tablet_metadata.h
+++ b/src/kudu/tablet/tablet_metadata.h
@@ -18,31 +18,42 @@
 #define KUDU_TABLET_TABLET_METADATA_H
 
 #include <atomic>
-#include <boost/optional/optional_fwd.hpp>
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <unordered_set>
 #include <vector>
 
+#include <glog/logging.h>
+
 #include "kudu/common/partition.h"
-#include "kudu/common/schema.h"
 #include "kudu/consensus/opid.pb.h"
 #include "kudu/fs/block_id.h"
-#include "kudu/fs/fs_manager.h"
-#include "kudu/gutil/callback.h"
-#include "kudu/gutil/dynamic_annotations.h"
+#include "kudu/gutil/atomicops.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/tablet/metadata.pb.h"
+#include "kudu/util/locks.h"
 #include "kudu/util/mutex.h"
 #include "kudu/util/status.h"
 #include "kudu/util/status_callback.h"
 
+namespace boost {
+template <class T>
+class optional;
+}
+
 namespace kudu {
+
+class BlockIdPB;
+class FsManager;
+class Schema;
+
 namespace tablet {
 
 class RowSetMetadata;
-class RowSetMetadataUpdate;
 
 typedef std::vector<std::shared_ptr<RowSetMetadata> > RowSetMetadataVector;
 typedef std::unordered_set<int64_t> RowSetMetadataIds;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_metrics.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metrics.cc b/src/kudu/tablet/tablet_metrics.cc
index c24f96c..d73ccd4 100644
--- a/src/kudu/tablet/tablet_metrics.cc
+++ b/src/kudu/tablet/tablet_metrics.cc
@@ -19,8 +19,11 @@
 #include <functional>
 #include <map>
 #include <utility>
+#include <cstdint>
+#include <unordered_map>
 
 #include "kudu/gutil/strings/substitute.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/util/memory/arena.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/trace.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_metrics.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metrics.h b/src/kudu/tablet/tablet_metrics.h
index 5fcea64..d7f3b38 100644
--- a/src/kudu/tablet/tablet_metrics.h
+++ b/src/kudu/tablet/tablet_metrics.h
@@ -17,17 +17,14 @@
 #ifndef KUDU_TABLET_TABLET_METRICS_H
 #define KUDU_TABLET_TABLET_METRICS_H
 
-#include "kudu/gutil/macros.h"
-#include "kudu/tablet/rowset.h"
+#include <cstdint>
+
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/util/metrics.h"
 
 namespace kudu {
 
 class Arena;
-class Counter;
-template<class T>
-class AtomicGauge;
-class Histogram;
-class MetricEntity;
 
 namespace tablet {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_mm_ops-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_mm_ops-test.cc b/src/kudu/tablet/tablet_mm_ops-test.cc
index 815242e..a2f5572 100644
--- a/src/kudu/tablet/tablet_mm_ops-test.cc
+++ b/src/kudu/tablet/tablet_mm_ops-test.cc
@@ -15,10 +15,24 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <memory>
+#include <unordered_set>
+#include <vector>
+
+#include <gtest/gtest.h>
+
+#include "kudu/common/common.pb.h"
+#include "kudu/gutil/map-util.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/tablet/tablet-test-base.h"
 #include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_metrics.h"
 #include "kudu/tablet/tablet_mm_ops.h"
-#include "kudu/tablet/tablet-test-base.h"
+#include "kudu/util/maintenance_manager.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/test_macros.h"
 
 namespace kudu {
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_mm_ops.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_mm_ops.cc b/src/kudu/tablet/tablet_mm_ops.cc
index 12268a0..3f6f949 100644
--- a/src/kudu/tablet/tablet_mm_ops.cc
+++ b/src/kudu/tablet/tablet_mm_ops.cc
@@ -17,14 +17,21 @@
 
 #include "kudu/tablet/tablet_mm_ops.h"
 
+#include <algorithm>
 #include <mutex>
 
 #include <gflags/gflags.h>
+#include <glog/logging.h>
 
+#include "kudu/gutil/strings/substitute.h"
+#include "kudu/tablet/rowset.h"
 #include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_metrics.h"
 #include "kudu/util/flag_tags.h"
-#include "kudu/util/locks.h"
+#include "kudu/util/logging.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
 
 DEFINE_int32(undo_delta_block_gc_init_budget_millis, 1000,
     "The maximum number of milliseconds we will spend initializing "

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_mm_ops.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_mm_ops.h b/src/kudu/tablet/tablet_mm_ops.h
index 2f8e18d..8fc865e 100644
--- a/src/kudu/tablet/tablet_mm_ops.h
+++ b/src/kudu/tablet/tablet_mm_ops.h
@@ -18,15 +18,19 @@
 #ifndef KUDU_TABLET_TABLET_MM_OPS_H_
 #define KUDU_TABLET_TABLET_MM_OPS_H_
 
+#include <cstdint>
 #include <string>
 
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/util/locks.h"
 #include "kudu/util/maintenance_manager.h"
 
 namespace kudu {
 
 class Histogram;
-template<class T>
+template <class T>
 class AtomicGauge;
 
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_random_access-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_random_access-test.cc b/src/kudu/tablet/tablet_random_access-test.cc
index 8d9304f..e31ae5d 100644
--- a/src/kudu/tablet/tablet_random_access-test.cc
+++ b/src/kudu/tablet/tablet_random_access-test.cc
@@ -15,21 +15,44 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/optional.hpp>
+#include <cstdint>
+#include <cstdlib>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include <boost/bind.hpp> // IWYU pragma: keep
+#include <boost/optional/optional.hpp>
 #include <boost/optional/optional_io.hpp>
 #include <glog/logging.h>
-#include <glog/stl_logging.h>
 #include <gtest/gtest.h>
 #include <gflags/gflags.h>
-#include <string>
-#include <vector>
-
+#include <gflags/gflags_declare.h>
+
+#include "kudu/common/column_predicate.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/iterator.h"
+#include "kudu/common/partial_row.h"
+#include "kudu/common/rowblock.h"
+#include "kudu/common/scan_spec.h"
 #include "kudu/common/schema.h"
-#include "kudu/gutil/casts.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/tablet/key_value_test_schema.h"
+#include "kudu/tablet/local_tablet_writer.h"
+#include "kudu/tablet/rowset.h"
+#include "kudu/tablet/tablet-test-util.h"
 #include "kudu/tablet/tablet.h"
-#include "kudu/tablet/tablet-test-base.h"
+#include "kudu/util/countdown_latch.h"
+#include "kudu/util/memory/arena.h"
+#include "kudu/util/monotime.h"
+#include "kudu/util/status.h"
 #include "kudu/util/stopwatch.h"
+#include "kudu/util/test_util.h"
+#include "kudu/util/thread.h"
 
 DEFINE_int32(keyspace_size, 3000, "number of unique row keys to insert/mutate");
 DEFINE_int32(runtime_seconds, 1, "number of seconds to run the test");

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_replica-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica-test.cc b/src/kudu/tablet/tablet_replica-test.cc
index 8335827..7ebb64e 100644
--- a/src/kudu/tablet/tablet_replica-test.cc
+++ b/src/kudu/tablet/tablet_replica-test.cc
@@ -15,36 +15,62 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <algorithm>
+#include <cstdint>
+#include <memory>
+#include <ostream>
+#include <string>
+
+#include <gflags/gflags.h>
+#include <gflags/gflags_declare.h>
 #include <glog/logging.h>
 #include <gtest/gtest.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/timestamp.h"
-#include "kudu/common/wire_protocol-test-util.h"
+#include "kudu/common/row_operations.h"
+#include "kudu/common/schema.h"
 #include "kudu/common/wire_protocol.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/consensus/consensus.pb.h"
 #include "kudu/consensus/consensus_meta.h"
 #include "kudu/consensus/consensus_meta_manager.h"
 #include "kudu/consensus/log.h"
+#include "kudu/consensus/log_anchor_registry.h"
 #include "kudu/consensus/log_reader.h"
 #include "kudu/consensus/log_util.h"
+#include "kudu/consensus/metadata.pb.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/opid_util.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/fs/fs_manager.h"
+#include "kudu/gutil/bind.h"
+#include "kudu/gutil/bind_helpers.h"
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
 #include "kudu/rpc/messenger.h"
+#include "kudu/rpc/result_tracker.h"
 #include "kudu/tablet/tablet-test-util.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet_metadata.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tablet/tablet_replica_mm_ops.h"
 #include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/transaction_driver.h"
+#include "kudu/tablet/transactions/transaction_tracker.h"
 #include "kudu/tablet/transactions/write_transaction.h"
 #include "kudu/tserver/tserver.pb.h"
+#include "kudu/util/countdown_latch.h"
 #include "kudu/util/maintenance_manager.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/status.h"
 #include "kudu/util/test_macros.h"
-#include "kudu/util/test_util.h"
 #include "kudu/util/threadpool.h"
 
 METRIC_DECLARE_entity(tablet);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_replica.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica.cc b/src/kudu/tablet/tablet_replica.cc
index 873f5f2..c16b465 100644
--- a/src/kudu/tablet/tablet_replica.cc
+++ b/src/kudu/tablet/tablet_replica.cc
@@ -21,37 +21,33 @@
 #include <functional>
 #include <memory>
 #include <mutex>
+#include <ostream>
 #include <string>
-#include <utility>
+#include <type_traits>
 #include <vector>
 
-#include <gflags/gflags.h>
-
+#include "kudu/clock/clock.h"
+#include "kudu/common/partition.h"
+#include "kudu/consensus/consensus.pb.h"
 #include "kudu/consensus/consensus_meta_manager.h"
 #include "kudu/consensus/consensus_peers.h"
 #include "kudu/consensus/log.h"
 #include "kudu/consensus/log_anchor_registry.h"
-#include "kudu/consensus/log_util.h"
-#include "kudu/consensus/opid_util.h"
-#include "kudu/consensus/quorum_util.h"
+#include "kudu/consensus/opid.pb.h"
 #include "kudu/consensus/raft_consensus.h"
-#include "kudu/gutil/mathlimits.h"
+#include "kudu/gutil/move.h"
 #include "kudu/gutil/stl_util.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/gutil/sysinfo.h"
-#include "kudu/rpc/messenger.h"
-#include "kudu/rpc/remote_method.h"
-#include "kudu/rpc/rpc_service.h"
-#include "kudu/rpc/service_pool.h"
+#include "kudu/rpc/result_tracker.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/tablet.pb.h"
+#include "kudu/tablet/tablet_replica_mm_ops.h"
 #include "kudu/tablet/transactions/alter_schema_transaction.h"
 #include "kudu/tablet/transactions/transaction_driver.h"
 #include "kudu/tablet/transactions/write_transaction.h"
-#include "kudu/tablet/tablet.pb.h"
-#include "kudu/tablet/tablet_bootstrap.h"
-#include "kudu/tablet/tablet_metrics.h"
-#include "kudu/tablet/tablet_replica_mm_ops.h"
-#include "kudu/util/logging.h"
+#include "kudu/util/maintenance_manager.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/pb_util.h"
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/threadpool.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_replica.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica.h b/src/kudu/tablet/tablet_replica.h
index 27a858d..b1d8bf9 100644
--- a/src/kudu/tablet/tablet_replica.h
+++ b/src/kudu/tablet/tablet_replica.h
@@ -18,30 +18,51 @@
 #ifndef KUDU_TABLET_TABLET_REPLICA_H_
 #define KUDU_TABLET_TABLET_REPLICA_H_
 
+#include <cstdint>
 #include <map>
 #include <memory>
 #include <mutex>
 #include <string>
 #include <vector>
 
-#include "kudu/consensus/log.h"
+#include <glog/logging.h>
+#include <gtest/gtest_prod.h>
+
 #include "kudu/consensus/raft_consensus.h"
 #include "kudu/consensus/time_manager.h"
+#include "kudu/consensus/log.h"
+#include "kudu/consensus/metadata.pb.h"
+#include "kudu/fs/fs_manager.h"
 #include "kudu/gutil/callback.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
+#include "kudu/tablet/metadata.pb.h"
 #include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet_metadata.h"
 #include "kudu/tablet/transaction_order_verifier.h"
+#include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/transaction_tracker.h"
-#include "kudu/util/metrics.h"
-#include "kudu/util/semaphore.h"
+#include "kudu/util/locks.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 class MaintenanceManager;
 class MaintenanceOp;
+class MonoDelta;
 class ThreadPool;
+class ThreadPoolToken;
+template <typename Sig>
+class Callback;
 
 namespace consensus {
 class ConsensusMetadataManager;
+class TransactionStatusPB;
+}
+
+namespace clock {
+class Clock;
 }
 
 namespace log {
@@ -53,16 +74,11 @@ class Messenger;
 class ResultTracker;
 } // namespace rpc
 
-namespace tserver {
-class CatchUpServiceTest;
-} // namespace tserver
-
 namespace tablet {
-class LeaderTransactionDriver;
-class ReplicaTransactionDriver;
-class TabletReplica;
+class AlterSchemaTransactionState;
 class TabletStatusPB;
 class TransactionDriver;
+class WriteTransactionState;
 
 // A replica in a tablet consensus configuration, which coordinates writes to tablets.
 // Each time Write() is called this class appends a new entry to a replicated

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_replica_mm_ops.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica_mm_ops.cc b/src/kudu/tablet/tablet_replica_mm_ops.cc
index f2d16e2..6d0fc38 100644
--- a/src/kudu/tablet/tablet_replica_mm_ops.cc
+++ b/src/kudu/tablet/tablet_replica_mm_ops.cc
@@ -17,17 +17,21 @@
 
 #include "kudu/tablet/tablet_replica_mm_ops.h"
 
-#include <algorithm>
-#include <gflags/gflags.h>
 #include <map>
 #include <mutex>
+#include <ostream>
 #include <string>
 
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
+#include "kudu/gutil/macros.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/tablet_metrics.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/maintenance_manager.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/status.h"
 
 DEFINE_int32(flush_threshold_mb, 1024,
              "Size at which MemRowSet flushes are triggered. "

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_replica_mm_ops.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica_mm_ops.h b/src/kudu/tablet/tablet_replica_mm_ops.h
index fc391ed..2404b48 100644
--- a/src/kudu/tablet/tablet_replica_mm_ops.h
+++ b/src/kudu/tablet/tablet_replica_mm_ops.h
@@ -18,16 +18,21 @@
 #ifndef KUDU_TABLET_TABLET_REPLICA_MM_OPS_H_
 #define KUDU_TABLET_TABLET_REPLICA_MM_OPS_H_
 
+#include <cstdint>
+#include <string>
+
+#include "kudu/gutil/port.h"
+#include "kudu/gutil/ref_counted.h"
+#include "kudu/gutil/stringprintf.h"
+#include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
+#include "kudu/util/locks.h"
 #include "kudu/util/maintenance_manager.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/semaphore.h"
 #include "kudu/util/stopwatch.h"
 
 namespace kudu {
-
-class Histogram;
-template<class T>
-class AtomicGauge;
-
 namespace tablet {
 
 class FlushOpPerfImprovementPolicy {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/tablet_throttle-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_throttle-test.cc b/src/kudu/tablet/tablet_throttle-test.cc
index c150dcc..80a83b2 100644
--- a/src/kudu/tablet/tablet_throttle-test.cc
+++ b/src/kudu/tablet/tablet_throttle-test.cc
@@ -15,15 +15,20 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <gflags/gflags.h>
-#include <glog/logging.h>
+#include <memory>
+#include <string>
 
-#include "kudu/tablet/tablet.h"
+#include <gflags/gflags_declare.h>
+#include <gtest/gtest.h>
+
+#include "kudu/common/common.pb.h"
+#include "kudu/common/schema.h"
+#include "kudu/gutil/port.h"
 #include "kudu/tablet/tablet-test-util.h"
-#include "kudu/util/test_macros.h"
+#include "kudu/tablet/tablet.h"
+#include "kudu/util/monotime.h"
 
 DECLARE_int64(tablet_throttler_rpc_per_sec);
-
 DECLARE_int64(tablet_throttler_bytes_per_sec);
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transaction_order_verifier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transaction_order_verifier.cc b/src/kudu/tablet/transaction_order_verifier.cc
index 57b9b59..4986109 100644
--- a/src/kudu/tablet/transaction_order_verifier.cc
+++ b/src/kudu/tablet/transaction_order_verifier.cc
@@ -15,7 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <ostream>
+
 #include <glog/logging.h>
+
 #include "kudu/tablet/transaction_order_verifier.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transaction_order_verifier.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transaction_order_verifier.h b/src/kudu/tablet/transaction_order_verifier.h
index 8c41a32..a2c327a 100644
--- a/src/kudu/tablet/transaction_order_verifier.h
+++ b/src/kudu/tablet/transaction_order_verifier.h
@@ -17,6 +17,8 @@
 #ifndef KUDU_TABLET_TRANSACTION_ORDER_VERIFIER_H
 #define KUDU_TABLET_TRANSACTION_ORDER_VERIFIER_H
 
+#include <cstdint>
+
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/walltime.h"
 #include "kudu/gutil/threading/thread_collision_warner.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/alter_schema_transaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.cc b/src/kudu/tablet/transactions/alter_schema_transaction.cc
index 89ed599..eea0417 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.cc
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.cc
@@ -15,15 +15,21 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <glog/logging.h>
-
 #include "kudu/tablet/transactions/alter_schema_transaction.h"
 
+#include <algorithm>
+#include <memory>
+
+#include <glog/logging.h>
+
 #include "kudu/clock/hybrid_clock.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/common/wire_protocol.h"
-#include "kudu/rpc/rpc_context.h"
+#include "kudu/consensus/log.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/tablet/tablet.h"
-#include "kudu/tablet/tablet_metrics.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/tserver.pb.h"
 #include "kudu/util/pb_util.h"
@@ -32,7 +38,6 @@
 namespace kudu {
 namespace tablet {
 
-using boost::bind;
 using consensus::ReplicateMsg;
 using consensus::CommitMsg;
 using consensus::ALTER_SCHEMA_OP;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/alter_schema_transaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.h b/src/kudu/tablet/transactions/alter_schema_transaction.h
index e1e0ab9..ae17933 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.h
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.h
@@ -18,23 +18,29 @@
 #ifndef KUDU_TABLET_ALTER_SCHEMA_TRANSACTION_H_
 #define KUDU_TABLET_ALTER_SCHEMA_TRANSACTION_H_
 
+#include <cstddef>
+#include <cstdint>
+#include <memory>
 #include <mutex>
 #include <string>
 
+#include "kudu/consensus/consensus.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/tablet/transactions/transaction.h"
-#include "kudu/util/locks.h"
+#include "kudu/tserver/tserver_admin.pb.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 
 class Schema;
-
-namespace consensus {
-class Consensus;
-}
+class rw_semaphore;
 
 namespace tablet {
 
+class TabletReplica;
+
 // Transaction Context for the AlterSchema operation.
 // Keeps track of the Transaction states (request, result, ...)
 class AlterSchemaTransactionState : public TransactionState {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction.cc b/src/kudu/tablet/transactions/transaction.cc
index efa6688..543dcd8 100644
--- a/src/kudu/tablet/transactions/transaction.cc
+++ b/src/kudu/tablet/transactions/transaction.cc
@@ -17,6 +17,8 @@
 
 #include "kudu/tablet/transactions/transaction.h"
 
+#include "kudu/rpc/result_tracker.h"
+
 namespace kudu {
 namespace tablet {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction.h b/src/kudu/tablet/transactions/transaction.h
index dd277cd..2fabd05 100644
--- a/src/kudu/tablet/transactions/transaction.h
+++ b/src/kudu/tablet/transactions/transaction.h
@@ -18,24 +18,38 @@
 #ifndef KUDU_TABLET_TRANSACTION_H_
 #define KUDU_TABLET_TRANSACTION_H_
 
-#include <string>
+#include <cstddef>
+#include <cstdint>
 #include <mutex>
-#include <kudu/rpc/result_tracker.h>
+#include <string>
+
+#include <glog/logging.h>
 
+#include "kudu/common/common.pb.h"
 #include "kudu/common/timestamp.h"
 #include "kudu/common/wire_protocol.h"
+#include "kudu/consensus/consensus.pb.h"
+#include "kudu/consensus/opid.pb.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/rpc/result_tracker.h"
+#include "kudu/rpc/rpc_header.pb.h"
+#include "kudu/tserver/tserver.pb.h"
 #include "kudu/util/auto_release_pool.h"
+#include "kudu/util/countdown_latch.h"
 #include "kudu/util/locks.h"
 #include "kudu/util/memory/arena.h"
 #include "kudu/util/status.h"
 
-namespace kudu {
-
-namespace rpc {
-class ResultTracker;
-} // namespace rpc
+namespace google {
+namespace protobuf {
+class Message;
+}
+}
 
+namespace kudu {
 namespace tablet {
 class TabletReplica;
 class TransactionCompletionCallback;

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction_driver.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_driver.cc b/src/kudu/tablet/transactions/transaction_driver.cc
index d823b10..986e925 100644
--- a/src/kudu/tablet/transactions/transaction_driver.cc
+++ b/src/kudu/tablet/transactions/transaction_driver.cc
@@ -17,18 +17,40 @@
 
 #include "kudu/tablet/transactions/transaction_driver.h"
 
+#include <algorithm>
 #include <functional>
+#include <memory>
 #include <mutex>
-
+#include <ostream>
+#include <type_traits>
+
+#include <glog/logging.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/message.h>
+
+#include "kudu/clock/clock.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/common/common.pb.h"
+#include "kudu/common/timestamp.h"
+#include "kudu/consensus/log.h"
 #include "kudu/consensus/time_manager.h"
+#include "kudu/gutil/bind.h"
+#include "kudu/gutil/bind_helpers.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/strings/strcat.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/rpc/result_tracker.h"
+#include "kudu/rpc/rpc_header.pb.h"
+#include "kudu/tablet/mvcc.h"
+#include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
+#include "kudu/tablet/transaction_order_verifier.h"
 #include "kudu/tablet/transactions/transaction_tracker.h"
-#include "kudu/util/debug-util.h"
 #include "kudu/util/debug/trace_event.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/status_callback.h"
 #include "kudu/util/threadpool.h"
 #include "kudu/util/trace.h"
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction_driver.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_driver.h b/src/kudu/tablet/transactions/transaction_driver.h
index da65d59..1e77dd6 100644
--- a/src/kudu/tablet/transactions/transaction_driver.h
+++ b/src/kudu/tablet/transactions/transaction_driver.h
@@ -20,24 +20,29 @@
 
 #include <string>
 
-#include "kudu/clock/clock.h"
-#include "kudu/consensus/raft_consensus.h"
+#include "kudu/consensus/consensus.pb.h"
+#include "kudu/consensus/opid.pb.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/gutil/walltime.h"
-#include "kudu/rpc/result_tracker.h"
 #include "kudu/tablet/transactions/transaction.h"
+#include "kudu/util/locks.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/status.h"
 #include "kudu/util/trace.h"
 
 namespace kudu {
+class Timestamp;
 class ThreadPool;
+class ThreadPoolToken;
 
 namespace log {
 class Log;
 } // namespace log
 
-namespace rpc {
-class ResultTracker;
+namespace consensus {
+class RaftConsensus;
 }
 
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction_tracker-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_tracker-test.cc b/src/kudu/tablet/transactions/transaction_tracker-test.cc
index 695dd6a..4edb7e8 100644
--- a/src/kudu/tablet/transactions/transaction_tracker-test.cc
+++ b/src/kudu/tablet/transactions/transaction_tracker-test.cc
@@ -15,20 +15,40 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <gtest/gtest.h>
+#include <cstdint>
+#include <ostream>
+#include <string>
 #include <memory>
 #include <vector>
 
+#include <gflags/gflags_declare.h>
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "kudu/consensus/consensus.pb.h"
+#include "kudu/gutil/casts.h"
+#include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
+#include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/transaction_driver.h"
 #include "kudu/tablet/transactions/transaction_tracker.h"
-#include "kudu/tablet/transactions/transaction.h"
-#include "kudu/tablet/transactions/write_transaction.h"
+#include "kudu/util/countdown_latch.h"
 #include "kudu/util/mem_tracker.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"
 
+namespace google {
+namespace protobuf {
+class Message;
+}
+}
+
 DECLARE_int64(tablet_transaction_memory_limit_mb);
 
 METRIC_DECLARE_entity(tablet);

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction_tracker.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_tracker.cc b/src/kudu/tablet/transactions/transaction_tracker.cc
index c15b39e..76d2d88 100644
--- a/src/kudu/tablet/transactions/transaction_tracker.cc
+++ b/src/kudu/tablet/transactions/transaction_tracker.cc
@@ -19,11 +19,21 @@
 
 #include <algorithm>
 #include <limits>
+#include <mutex>
+#include <ostream>
+#include <string>
 #include <vector>
 
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+#include <google/protobuf/message.h>
+
 #include "kudu/gutil/map-util.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/strings/substitute.h"
+#include "kudu/tablet/tablet.h"
 #include "kudu/tablet/tablet_replica.h"
+#include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/transaction_driver.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/logging.h"

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/transaction_tracker.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_tracker.h b/src/kudu/tablet/transactions/transaction_tracker.h
index 3a3725b..437e28e 100644
--- a/src/kudu/tablet/transactions/transaction_tracker.h
+++ b/src/kudu/tablet/transactions/transaction_tracker.h
@@ -18,25 +18,25 @@
 #ifndef KUDU_TABLET_TRANSACTION_TRACKER_H_
 #define KUDU_TABLET_TRANSACTION_TRACKER_H_
 
+#include <cstdint>
 #include <memory>
-#include <string>
 #include <unordered_map>
 #include <vector>
 
 #include "kudu/gutil/gscoped_ptr.h"
+#include "kudu/gutil/macros.h"
 #include "kudu/gutil/ref_counted.h"
-#include "kudu/tablet/transactions/transaction.h"
 #include "kudu/util/locks.h"
+#include "kudu/util/metrics.h"
+#include "kudu/util/status.h"
 
 namespace kudu {
 
-template<class T>
-class AtomicGauge;
-class Counter;
 class MemTracker;
-class MetricEntity;
+class MonoDelta;
 
 namespace tablet {
+
 class TransactionDriver;
 
 // Each TabletReplica has a TransactionTracker which keeps track of pending transactions.

http://git-wip-us.apache.org/repos/asf/kudu/blob/0f6dcf83/src/kudu/tablet/transactions/write_transaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/write_transaction.cc b/src/kudu/tablet/transactions/write_transaction.cc
index 899ebf0..bb56751 100644
--- a/src/kudu/tablet/transactions/write_transaction.cc
+++ b/src/kudu/tablet/transactions/write_transaction.cc
@@ -18,23 +18,44 @@
 #include "kudu/tablet/transactions/write_transaction.h"
 
 #include <algorithm>
+#include <cstdint>
+#include <ctime>
+#include <new>
+#include <ostream>
+#include <type_traits>
 #include <vector>
 
-#include "kudu/clock/hybrid_clock.h"
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
+#include "kudu/clock/clock.h"
+#include "kudu/common/common.pb.h"
 #include "kudu/common/row_operations.h"
+#include "kudu/common/schema.h"
+#include "kudu/common/timestamp.h"
 #include "kudu/common/wire_protocol.h"
-#include "kudu/gutil/stl_util.h"
-#include "kudu/gutil/strings/numbers.h"
+#include "kudu/common/wire_protocol.pb.h"
+#include "kudu/consensus/opid.pb.h"
+#include "kudu/consensus/raft_consensus.h"
+#include "kudu/util/memory/arena.h"
+#include "kudu/gutil/dynamic_annotations.h"
+#include "kudu/gutil/move.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/gutil/walltime.h"
-#include "kudu/rpc/rpc_context.h"
+#include "kudu/rpc/rpc_header.pb.h"
+#include "kudu/tablet/lock_manager.h"
+#include "kudu/tablet/mvcc.h"
 #include "kudu/tablet/row_op.h"
 #include "kudu/tablet/tablet.h"
+#include "kudu/tablet/tablet.pb.h"
 #include "kudu/tablet/tablet_metrics.h"
 #include "kudu/tablet/tablet_replica.h"
 #include "kudu/tserver/tserver.pb.h"
 #include "kudu/util/debug/trace_event.h"
 #include "kudu/util/flag_tags.h"
+#include "kudu/util/metrics.h"
 #include "kudu/util/pb_util.h"
+#include "kudu/util/rw_semaphore.h"
 #include "kudu/util/trace.h"
 
 DEFINE_int32(tablet_inject_latency_on_apply_write_txn_ms, 0,
@@ -43,21 +64,22 @@ DEFINE_int32(tablet_inject_latency_on_apply_write_txn_ms, 0,
 TAG_FLAG(tablet_inject_latency_on_apply_write_txn_ms, unsafe);
 TAG_FLAG(tablet_inject_latency_on_apply_write_txn_ms, runtime);
 
+using std::string;
+using std::unique_ptr;
+using std::vector;
+using strings::Substitute;
+
 namespace kudu {
 namespace tablet {
 
-using consensus::ReplicateMsg;
+using pb_util::SecureShortDebugString;
 using consensus::CommitMsg;
 using consensus::DriverType;
+using consensus::ReplicateMsg;
 using consensus::WRITE_OP;
-using pb_util::SecureShortDebugString;
 using tserver::TabletServerErrorPB;
 using tserver::WriteRequestPB;
 using tserver::WriteResponsePB;
-using std::string;
-using std::unique_ptr;
-using std::vector;
-using strings::Substitute;
 
 WriteTransaction::WriteTransaction(unique_ptr<WriteTransactionState> state, DriverType type)
   : Transaction(state.get(), type, Transaction::WRITE_TXN),


Mime
View raw message