You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2016/06/24 23:08:24 UTC

incubator-kudu git commit: Remove miscellaneous boost dependencies

Repository: incubator-kudu
Updated Branches:
  refs/heads/master 4b48dad1e -> ea9dedbd1


Remove miscellaneous boost dependencies

This commit removes some lesser used boost dependencies where it is
straightforward to do so. The number of boost include lines is dropped from 158
to 130, and the number of unique boost headers included drops from 36 to 21.

Change-Id: I0fb6e90e765082cdfde3175f504cf8512fd2cc4f
Reviewed-on: http://gerrit.cloudera.org:8080/3490
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: ea9dedbd1b2520319006b59181d1b1d2f445f202
Parents: 4b48dad
Author: Dan Burkert <da...@cloudera.com>
Authored: Fri Jun 24 14:46:50 2016 -0700
Committer: Dan Burkert <da...@cloudera.com>
Committed: Fri Jun 24 23:08:04 2016 +0000

----------------------------------------------------------------------
 src/kudu/cfile/cfile_writer.h                  |  1 -
 src/kudu/cfile/compression-test.cc             |  2 +-
 src/kudu/cfile/encoding-test.cc                | 14 ++++++------
 src/kudu/cfile/index_block.cc                  |  5 ++---
 src/kudu/cfile/index_block.h                   |  2 --
 src/kudu/common/key_encoder.cc                 |  1 -
 src/kudu/experiments/merge-test.cc             |  3 +--
 src/kudu/integration-tests/alter_table-test.cc |  2 +-
 src/kudu/rpc/reactor.h                         |  2 +-
 src/kudu/rpc/rpc-test.cc                       | 24 +++++++++++----------
 src/kudu/rpc/rpc_stub-test.cc                  | 20 ++++++++---------
 src/kudu/rpc/transfer.h                        |  2 --
 src/kudu/server/webserver.cc                   |  9 ++++----
 src/kudu/tablet/delta_compaction-test.cc       |  2 +-
 src/kudu/tablet/deltafile.cc                   | 21 +++++++++---------
 src/kudu/tablet/deltafile.h                    |  4 ++--
 src/kudu/tablet/deltamemstore.h                |  1 -
 src/kudu/tablet/mt-tablet-test.cc              |  1 -
 src/kudu/tablet/tablet-schema-test.cc          |  1 -
 src/kudu/tools/ksck-test.cc                    |  3 +--
 src/kudu/tools/kudu-ts-cli-test.cc             |  2 --
 src/kudu/twitter-demo/oauth.cc                 |  3 +--
 src/kudu/util/atomic.h                         |  4 ++--
 src/kudu/util/bit-util-test.cc                 |  2 +-
 src/kudu/util/blocking_queue.h                 |  3 +--
 src/kudu/util/inline_slice.h                   |  8 +++----
 src/kudu/util/knapsack_solver-test.cc          |  5 +++--
 src/kudu/util/metrics-test.cc                  |  1 -
 src/kudu/util/pb_util-test.cc                  |  1 -
 src/kudu/util/resettable_heartbeater-test.cc   |  3 +--
 src/kudu/util/rle-test.cc                      |  2 +-
 31 files changed, 68 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/cfile/cfile_writer.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile_writer.h b/src/kudu/cfile/cfile_writer.h
index b718757..74984f7 100644
--- a/src/kudu/cfile/cfile_writer.h
+++ b/src/kudu/cfile/cfile_writer.h
@@ -18,7 +18,6 @@
 #ifndef KUDU_CFILE_CFILE_WRITER_H
 #define KUDU_CFILE_CFILE_WRITER_H
 
-#include <boost/utility.hpp>
 #include <unordered_map>
 #include <stdint.h>
 #include <string>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/cfile/compression-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/compression-test.cc b/src/kudu/cfile/compression-test.cc
index a03275f..2f88fc2 100644
--- a/src/kudu/cfile/compression-test.cc
+++ b/src/kudu/cfile/compression-test.cc
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-#include <boost/scoped_array.hpp>
+
 #include <gtest/gtest.h>
 #include <glog/logging.h>
 #include <stdlib.h>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/cfile/encoding-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/encoding-test.cc b/src/kudu/cfile/encoding-test.cc
index 6b184a0..0e6a6d9 100644
--- a/src/kudu/cfile/encoding-test.cc
+++ b/src/kudu/cfile/encoding-test.cc
@@ -15,12 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/utility/binary.hpp>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
-#include <stdlib.h>
 #include <limits>
+#include <stdlib.h>
+#include <vector>
 
 #include "kudu/cfile/block_encodings.h"
 #include "kudu/cfile/bshuf_block.h"
@@ -40,6 +39,8 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/stopwatch.h"
 
+using std::vector;
+
 namespace kudu { namespace cfile {
 
 extern void DumpSSETable();
@@ -72,13 +73,12 @@ class TestEncoding : public ::testing::Test {
   static Slice CreateBinaryBlock(BuilderType *sbb,
                                  int num_items,
                                  const char *fmt_str) {
-    boost::ptr_vector<string> to_insert;
+    vector<string> to_insert;
     std::vector<Slice> slices;
 
     for (uint i = 0; i < num_items; i++) {
-      string *val = new string(StringPrintf(fmt_str, i));
-      to_insert.push_back(val);
-      slices.push_back(Slice(*val));
+      to_insert.emplace_back(StringPrintf(fmt_str, i));
+      slices.push_back(Slice(to_insert.back()));
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/cfile/index_block.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/index_block.cc b/src/kudu/cfile/index_block.cc
index 33e41b4..92ec5a3 100644
--- a/src/kudu/cfile/index_block.cc
+++ b/src/kudu/cfile/index_block.cc
@@ -15,9 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-
 #include "kudu/cfile/cfile_writer.h"
 #include "kudu/cfile/index_block.h"
+#include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/protobuf_util.h"
 
 namespace kudu {
@@ -145,8 +145,7 @@ Status IndexBlockReader::Parse(const Slice &data) {
   size_t max_size = trailer_size_ptr - data_.data();
   if (trailer_size <= 0 ||
       trailer_size > max_size) {
-    string err = "invalid index block trailer size: " +
-      boost::lexical_cast<string>(trailer_size);
+    string err = strings::Substitute("invalid index block trailer size: $0", trailer_size);
     return Status::Corruption(err);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/cfile/index_block.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/index_block.h b/src/kudu/cfile/index_block.h
index 2fbacf9..139ccf6 100644
--- a/src/kudu/cfile/index_block.h
+++ b/src/kudu/cfile/index_block.h
@@ -18,8 +18,6 @@
 #ifndef KUDU_CFILE_INDEX_BLOCK_H
 #define KUDU_CFILE_INDEX_BLOCK_H
 
-#include <boost/lexical_cast.hpp>
-#include <boost/utility.hpp>
 #include <glog/logging.h>
 #include <string>
 #include <vector>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/common/key_encoder.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/key_encoder.cc b/src/kudu/common/key_encoder.cc
index 3d4e4e8..84a38bf 100644
--- a/src/kudu/common/key_encoder.cc
+++ b/src/kudu/common/key_encoder.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/noncopyable.hpp>
 #include <functional>
 #include <string>
 #include <unordered_map>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/experiments/merge-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/experiments/merge-test.cc b/src/kudu/experiments/merge-test.cc
index b9760a2..efe513f 100644
--- a/src/kudu/experiments/merge-test.cc
+++ b/src/kudu/experiments/merge-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/lexical_cast.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <algorithm>
@@ -114,7 +113,7 @@ int main(int argc, char **argv) {
     int entry = 0;
     for (int j = 0; j < FLAGS_num_rows; j++) {
       entry += rand() % 5;
-      list.push_back(boost::lexical_cast<MergeType>(entry));
+      list.emplace_back(std::to_string(entry));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/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 94d305e..c876f7e 100644
--- a/src/kudu/integration-tests/alter_table-test.cc
+++ b/src/kudu/integration-tests/alter_table-test.cc
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/assign.hpp>
+#include <boost/bind.hpp>
 #include <gflags/gflags.h>
 #include <gtest/gtest.h>
 #include <map>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/rpc/reactor.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.h b/src/kudu/rpc/reactor.h
index f456e9f..54f3332 100644
--- a/src/kudu/rpc/reactor.h
+++ b/src/kudu/rpc/reactor.h
@@ -17,8 +17,8 @@
 #ifndef KUDU_RPC_REACTOR_H
 #define KUDU_RPC_REACTOR_H
 
+#include <boost/function.hpp>
 #include <boost/intrusive/list.hpp>
-#include <boost/utility.hpp>
 #include <ev++.h>
 #include <list>
 #include <map>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/rpc/rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc-test.cc b/src/kudu/rpc/rpc-test.cc
index 5217122..e4f7969 100644
--- a/src/kudu/rpc/rpc-test.cc
+++ b/src/kudu/rpc/rpc-test.cc
@@ -20,8 +20,9 @@
 #include <memory>
 #include <string>
 #include <unordered_map>
+#include <vector>
 
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/bind.hpp>
 #include <gtest/gtest.h>
 
 #include "kudu/gutil/map-util.h"
@@ -38,9 +39,11 @@ METRIC_DECLARE_histogram(rpc_incoming_queue_time);
 
 DECLARE_int32(rpc_negotiation_inject_delay_ms);
 
-using std::string;
 using std::shared_ptr;
+using std::string;
+using std::unique_ptr;
 using std::unordered_map;
+using std::vector;
 
 namespace kudu {
 namespace rpc {
@@ -386,7 +389,7 @@ TEST_F(TestRpc, TestServerShutsDown) {
   req.set_y(rand());
   AddResponsePB resp;
 
-  boost::ptr_vector<RpcController> controllers;
+  vector<unique_ptr<RpcController>> controllers;
 
   // We'll send several calls async, and ensure that they all
   // get the error status when the connection drops.
@@ -394,9 +397,8 @@ TEST_F(TestRpc, TestServerShutsDown) {
 
   CountDownLatch latch(n_calls);
   for (int i = 0; i < n_calls; i++) {
-    auto controller = new RpcController();
-    controllers.push_back(controller);
-    p.AsyncRequest(GenericCalculatorService::kAddMethodName, req, &resp, controller,
+    controllers.emplace_back(new RpcController());
+    p.AsyncRequest(GenericCalculatorService::kAddMethodName, req, &resp, controllers.back().get(),
                    boost::bind(&CountDownLatch::CountDown, boost::ref(latch)));
   }
 
@@ -406,8 +408,8 @@ TEST_F(TestRpc, TestServerShutsDown) {
   ASSERT_OK(listen_sock.Accept(&server_sock, &remote, 0));
 
   // The call is still in progress at this point.
-  for (const RpcController &controller : controllers) {
-    ASSERT_FALSE(controller.finished());
+  for (const auto& controller : controllers) {
+    ASSERT_FALSE(controller->finished());
   }
 
   // Shut down the socket.
@@ -418,9 +420,9 @@ TEST_F(TestRpc, TestServerShutsDown) {
   latch.Wait();
 
   // Should get the appropriate error on the client for all calls;
-  for (const RpcController &controller : controllers) {
-    ASSERT_TRUE(controller.finished());
-    Status s = controller.status();
+  for (const auto& controller : controllers) {
+    ASSERT_TRUE(controller->finished());
+    Status s = controller->status();
     ASSERT_TRUE(s.IsNetworkError()) <<
       "Unexpected status: " << s.ToString();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/rpc/rpc_stub-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_stub-test.cc b/src/kudu/rpc/rpc_stub-test.cc
index 15d45cf..d989aa9 100644
--- a/src/kudu/rpc/rpc_stub-test.cc
+++ b/src/kudu/rpc/rpc_stub-test.cc
@@ -16,6 +16,7 @@
 // under the License.
 
 #include <atomic>
+#include <memory>
 #include <thread>
 #include <vector>
 
@@ -23,7 +24,6 @@
 #include <glog/stl_logging.h>
 #include <gtest/gtest.h>
 #include <boost/bind.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
 
 #include "kudu/gutil/stl_util.h"
 #include "kudu/rpc/rpc_introspection.pb.h"
@@ -40,8 +40,8 @@
 DEFINE_bool(is_panic_test_child, false, "Used by TestRpcPanic");
 DECLARE_bool(socket_inject_short_recvs);
 
-using boost::ptr_vector;
 using std::shared_ptr;
+using std::unique_ptr;
 using std::vector;
 
 namespace kudu {
@@ -106,24 +106,22 @@ TEST_F(RpcStubTest, TestBigCallData) {
   EchoRequestPB req;
   req.set_data(data);
 
-  ptr_vector<EchoResponsePB> resps;
-  ptr_vector<RpcController> controllers;
+  vector<unique_ptr<EchoResponsePB>> resps;
+  vector<unique_ptr<RpcController>> controllers;
 
   CountDownLatch latch(kNumSentAtOnce);
   for (int i = 0; i < kNumSentAtOnce; i++) {
-    auto resp = new EchoResponsePB;
-    resps.push_back(resp);
-    auto controller = new RpcController;
-    controllers.push_back(controller);
+    resps.emplace_back(new EchoResponsePB);
+    controllers.emplace_back(new RpcController);
 
-    p.EchoAsync(req, resp, controller,
+    p.EchoAsync(req, resps.back().get(), controllers.back().get(),
                 boost::bind(&CountDownLatch::CountDown, boost::ref(latch)));
   }
 
   latch.Wait();
 
-  for (RpcController &c : controllers) {
-    ASSERT_OK(c.status());
+  for (const auto& c : controllers) {
+    ASSERT_OK(c->status());
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/rpc/transfer.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/transfer.h b/src/kudu/rpc/transfer.h
index 6a0c3e2..7fb6b10 100644
--- a/src/kudu/rpc/transfer.h
+++ b/src/kudu/rpc/transfer.h
@@ -18,9 +18,7 @@
 #ifndef KUDU_RPC_TRANSFER_H
 #define KUDU_RPC_TRANSFER_H
 
-#include <boost/function.hpp>
 #include <boost/intrusive/list.hpp>
-#include <boost/utility.hpp>
 #include <gflags/gflags.h>
 #include <set>
 #include <stdint.h>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/server/webserver.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver.cc b/src/kudu/server/webserver.cc
index d685bc6..98bb545 100644
--- a/src/kudu/server/webserver.cc
+++ b/src/kudu/server/webserver.cc
@@ -18,10 +18,8 @@
 
 #include <algorithm>
 #include <boost/algorithm/string.hpp>
-#include <boost/bind.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/mem_fn.hpp>
 #include <boost/thread/shared_mutex.hpp>
+#include <functional>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <map>
@@ -66,7 +64,7 @@ Webserver::Webserver(const WebserverOptions& opts)
   : opts_(opts),
     context_(nullptr) {
   string host = opts.bind_interface.empty() ? "0.0.0.0" : opts.bind_interface;
-  http_address_ = host + ":" + boost::lexical_cast<string>(opts.port);
+  http_address_ = host + ":" + std::to_string(opts.port);
 }
 
 Webserver::~Webserver() {
@@ -201,7 +199,8 @@ Status Webserver::Start() {
   }
 
   PathHandlerCallback default_callback =
-    boost::bind<void>(boost::mem_fn(&Webserver::RootHandler), this, _1, _2);
+    std::bind<void>(std::mem_fn(&Webserver::RootHandler),
+                    this, std::placeholders::_1, std::placeholders::_2);
 
   RegisterPathHandler("/", "Home", default_callback);
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tablet/delta_compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_compaction-test.cc b/src/kudu/tablet/delta_compaction-test.cc
index c5aceab..0f1dca1 100644
--- a/src/kudu/tablet/delta_compaction-test.cc
+++ b/src/kudu/tablet/delta_compaction-test.cc
@@ -149,7 +149,7 @@ TEST_F(TestDeltaCompaction, TestMergeMultipleSchemas) {
             break;
           case BINARY:
             {
-              string s = boost::lexical_cast<string>(update_value);
+              string s = std::to_string(update_value);
               Slice str_val(s);
               update.AddColumnUpdate(col_schema, col_id, &str_val);
             }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tablet/deltafile.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile.cc b/src/kudu/tablet/deltafile.cc
index c3249f0..2f56ad4 100644
--- a/src/kudu/tablet/deltafile.cc
+++ b/src/kudu/tablet/deltafile.cc
@@ -44,6 +44,7 @@ DEFINE_int32(deltafile_default_block_size, 32*1024,
 TAG_FLAG(deltafile_default_block_size, experimental);
 
 using std::shared_ptr;
+using std::unique_ptr;
 
 namespace kudu {
 
@@ -421,7 +422,7 @@ Status DeltaFileIterator::ReadCurrentBlockOntoQueue() {
   DCHECK(initted_) << "Must call Init()";
   DCHECK(index_iter_) << "Must call SeekToOrdinal()";
 
-  gscoped_ptr<PreparedDeltaBlock> pdb(new PreparedDeltaBlock());
+  unique_ptr<PreparedDeltaBlock> pdb(new PreparedDeltaBlock());
   BlockPointer dblk_ptr = index_iter_->GetCurrentBlockPointer();
   RETURN_NOT_OK(dfr_->cfile_reader()->ReadBlock(
       dblk_ptr, cache_blocks_, &pdb->block_));
@@ -443,7 +444,7 @@ Status DeltaFileIterator::ReadCurrentBlockOntoQueue() {
     pdb->last_updated_idx_;
   #endif
 
-  delta_blocks_.push_back(pdb.release());
+  delta_blocks_.emplace_back(std::move(pdb));
   return Status::OK();
 }
 
@@ -485,7 +486,7 @@ Status DeltaFileIterator::PrepareBatch(size_t nrows, PrepareFlag flag) {
   // Remove blocks from our list which are no longer relevant to the range
   // being prepared.
   while (!delta_blocks_.empty() &&
-         delta_blocks_.front().last_updated_idx_ < start_row) {
+         delta_blocks_.front()->last_updated_idx_ < start_row) {
     delta_blocks_.pop_front();
   }
 
@@ -509,7 +510,7 @@ Status DeltaFileIterator::PrepareBatch(size_t nrows, PrepareFlag flag) {
   }
 
   if (!delta_blocks_.empty()) {
-    PreparedDeltaBlock &block = delta_blocks_.front();
+    PreparedDeltaBlock& block = *delta_blocks_.front();
     int i = 0;
     for (i = block.prepared_block_start_idx_;
          i < block.decoder_->Count();
@@ -538,12 +539,12 @@ Status DeltaFileIterator::VisitMutations(Visitor *visitor) {
 
   rowid_t start_row = prepared_idx_;
 
-  for (PreparedDeltaBlock &block : delta_blocks_) {
-    BinaryPlainBlockDecoder &bpd = *block.decoder_;
-    DVLOG(2) << "Visiting delta block " << block.first_updated_idx_ << "-"
-      << block.last_updated_idx_ << " for row block starting at " << start_row;
+  for (auto& block : delta_blocks_) {
+    BinaryPlainBlockDecoder& bpd = *block->decoder_;
+    DVLOG(2) << "Visiting delta block " << block->first_updated_idx_ << "-"
+             << block->last_updated_idx_ << " for row block starting at " << start_row;
 
-    if (PREDICT_FALSE(start_row > block.last_updated_idx_)) {
+    if (PREDICT_FALSE(start_row > block->last_updated_idx_)) {
       // The block to be updated completely falls after this delta block:
       //  <-- delta block -->      <-- delta block -->
       //                      <-- block to update     -->
@@ -555,7 +556,7 @@ Status DeltaFileIterator::VisitMutations(Visitor *visitor) {
 
     rowid_t previous_rowidx = MathLimits<rowid_t>::kMax;
     bool continue_visit = true;
-    for (int i = block.prepared_block_start_idx_; i < bpd.Count(); i++) {
+    for (int i = block->prepared_block_start_idx_; i < bpd.Count(); i++) {
       Slice slice = bpd.string_at_index(i);
 
       // Decode and check the ID of the row we're going to update.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tablet/deltafile.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile.h b/src/kudu/tablet/deltafile.h
index 1494859..cdfdcd7 100644
--- a/src/kudu/tablet/deltafile.h
+++ b/src/kudu/tablet/deltafile.h
@@ -17,7 +17,7 @@
 #ifndef KUDU_TABLET_DELTAFILE_H
 #define KUDU_TABLET_DELTAFILE_H
 
-#include <boost/ptr_container/ptr_deque.hpp>
+#include <deque>
 #include <memory>
 #include <string>
 #include <vector>
@@ -297,7 +297,7 @@ class DeltaFileIterator : public DeltaIterator {
 
   // After PrepareBatch(), the set of delta blocks in the delta file
   // which correspond to prepared_block_.
-  boost::ptr_deque<PreparedDeltaBlock> delta_blocks_;
+  std::deque<std::unique_ptr<PreparedDeltaBlock>> delta_blocks_;
 
   // Temporary buffer used in seeking.
   faststring tmp_buf_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tablet/deltamemstore.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore.h b/src/kudu/tablet/deltamemstore.h
index cd81875..5228efe 100644
--- a/src/kudu/tablet/deltamemstore.h
+++ b/src/kudu/tablet/deltamemstore.h
@@ -17,7 +17,6 @@
 #ifndef KUDU_TABLET_DELTAMEMSTORE_H
 #define KUDU_TABLET_DELTAMEMSTORE_H
 
-#include <boost/thread/mutex.hpp>
 #include <deque>
 #include <gtest/gtest_prod.h>
 #include <memory>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/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 4181530..5d320c0 100644
--- a/src/kudu/tablet/mt-tablet-test.cc
+++ b/src/kudu/tablet/mt-tablet-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/ptr_container/ptr_vector.hpp>
 #include <gflags/gflags.h>
 #include <gtest/gtest.h>
 #include <memory>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/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 d87e598..0b95271 100644
--- a/src/kudu/tablet/tablet-schema-test.cc
+++ b/src/kudu/tablet/tablet-schema-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/lexical_cast.hpp>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tools/ksck-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck-test.cc b/src/kudu/tools/ksck-test.cc
index 4a3f221..f64ff94 100644
--- a/src/kudu/tools/ksck-test.cc
+++ b/src/kudu/tools/ksck-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/lexical_cast.hpp>
 #include <gtest/gtest.h>
 #include <memory>
 #include <unordered_map>
@@ -142,7 +141,7 @@ class KsckTest : public KuduTest {
 
     vector<shared_ptr<KsckTablet>> tablets;
     for (int i = 0; i < num_tablets; i++) {
-      shared_ptr<KsckTablet> tablet(new KsckTablet(table.get(), boost::lexical_cast<string>(i)));
+      shared_ptr<KsckTablet> tablet(new KsckTablet(table.get(), std::to_string(i)));
       CreateAndFillTablet(tablet, num_replicas, true);
       tablets.push_back(tablet);
     }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/tools/kudu-ts-cli-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/kudu-ts-cli-test.cc b/src/kudu/tools/kudu-ts-cli-test.cc
index 5317334..02d9c2e 100644
--- a/src/kudu/tools/kudu-ts-cli-test.cc
+++ b/src/kudu/tools/kudu-ts-cli-test.cc
@@ -17,7 +17,6 @@
 //
 // Tests for the kudu-admin command-line tool.
 
-#include <boost/assign/list_of.hpp>
 #include <gtest/gtest.h>
 
 #include "kudu/gutil/map-util.h"
@@ -30,7 +29,6 @@
 #include "kudu/util/path_util.h"
 #include "kudu/util/subprocess.h"
 
-using boost::assign::list_of;
 using kudu::itest::TabletServerMap;
 using kudu::itest::TServerDetails;
 using strings::Split;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/twitter-demo/oauth.cc
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/oauth.cc b/src/kudu/twitter-demo/oauth.cc
index efffcb4..c7292ce 100644
--- a/src/kudu/twitter-demo/oauth.cc
+++ b/src/kudu/twitter-demo/oauth.cc
@@ -19,7 +19,6 @@
 
 #include <algorithm>
 #include <vector>
-#include <boost/lexical_cast.hpp>
 #include <glog/logging.h>
 extern "C" {
 #include <oauth.h>
@@ -57,7 +56,7 @@ void OAuthRequest::AddStandardOAuthFields(const string& consumer_key,
   AddPair("oauth_version", "1.0");
   AddPair("oauth_signature_method", "HMAC-SHA1");
   AddPair("oauth_nonce", GenerateNonce());
-  AddPair("oauth_timestamp", boost::lexical_cast<string>(time(NULL)));
+  AddPair("oauth_timestamp", std::to_string(time(nullptr)));
   AddPair("oauth_consumer_key", consumer_key);
   AddPair("oauth_token", token_key);
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/atomic.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/atomic.h b/src/kudu/util/atomic.h
index 106048e..da9b677 100644
--- a/src/kudu/util/atomic.h
+++ b/src/kudu/util/atomic.h
@@ -19,7 +19,7 @@
 #define KUDU_UTIL_ATOMIC_H
 
 #include <algorithm>
-#include <boost/type_traits/make_signed.hpp>
+#include <type_traits>
 
 #include "kudu/gutil/atomicops.h"
 #include "kudu/gutil/macros.h"
@@ -132,7 +132,7 @@ class AtomicInt {
   // The gutil/atomicops.h functions only operate on signed types.
   // So, even if the user specializes on an unsigned type, we use a
   // signed type internally.
-  typedef typename boost::make_signed<T>::type SignedT;
+  typedef typename std::make_signed<T>::type SignedT;
   SignedT value_;
 
   DISALLOW_COPY_AND_ASSIGN(AtomicInt);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/bit-util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/bit-util-test.cc b/src/kudu/util/bit-util-test.cc
index 02f5b7c..8c43562 100644
--- a/src/kudu/util/bit-util-test.cc
+++ b/src/kudu/util/bit-util-test.cc
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-#include <boost/utility.hpp>
+#include <boost/utility/binary.hpp>
 #include <gtest/gtest.h>
 #include "kudu/util/bit-util.h"
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/blocking_queue.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/blocking_queue.h b/src/kudu/util/blocking_queue.h
index f20f787..b44c129 100644
--- a/src/kudu/util/blocking_queue.h
+++ b/src/kudu/util/blocking_queue.h
@@ -17,7 +17,6 @@
 #ifndef KUDU_UTIL_BLOCKING_QUEUE_H
 #define KUDU_UTIL_BLOCKING_QUEUE_H
 
-#include <boost/type_traits/remove_pointer.hpp>
 #include <list>
 #include <string>
 #include <type_traits>
@@ -52,7 +51,7 @@ class BlockingQueue {
   // If T is a pointer, this will be the base type.  If T is not a pointer, you
   // can ignore this and the functions which make use of it.
   // Template substitution failure is not an error.
-  typedef typename boost::remove_pointer<T>::type T_VAL;
+  typedef typename std::remove_pointer<T>::type T_VAL;
 
   explicit BlockingQueue(size_t max_size)
     : shutdown_(false),

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/inline_slice.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/inline_slice.h b/src/kudu/util/inline_slice.h
index aeca370..692617b 100644
--- a/src/kudu/util/inline_slice.h
+++ b/src/kudu/util/inline_slice.h
@@ -17,8 +17,6 @@
 #ifndef KUDU_UTIL_INLINE_SLICE_H
 #define KUDU_UTIL_INLINE_SLICE_H
 
-#include <boost/static_assert.hpp>
-
 #include "kudu/gutil/atomicops.h"
 #include "kudu/gutil/casts.h"
 #include "kudu/util/memory/arena.h"
@@ -69,8 +67,10 @@ class InlineSlice {
     kMaxInlineData = STORAGE_SIZE - 1
   };
 
-  BOOST_STATIC_ASSERT(STORAGE_SIZE >= kPointerByteWidth);
-  BOOST_STATIC_ASSERT(STORAGE_SIZE <= 256);
+  static_assert(STORAGE_SIZE >= kPointerByteWidth,
+                "InlineSlice storage size must be greater than the width of a pointer");
+  static_assert(STORAGE_SIZE <= 256,
+                "InlineSlice storage size must be less than 256 bytes");
  public:
   InlineSlice() {
   }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/knapsack_solver-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/knapsack_solver-test.cc b/src/kudu/util/knapsack_solver-test.cc
index 703255f..4d95ada 100644
--- a/src/kudu/util/knapsack_solver-test.cc
+++ b/src/kudu/util/knapsack_solver-test.cc
@@ -15,10 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/lexical_cast.hpp>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
+#include <string>
 #include <vector>
+
 #include "kudu/util/knapsack_solver.h"
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/test_util.h"
@@ -71,7 +72,7 @@ static string JoinInts(const vector<int> &ints) {
     if (i > 0) {
       ret.push_back(',');
     }
-    ret.append(boost::lexical_cast<string>(ints[i]));
+    ret.append(std::to_string(ints[i]));
   }
   return ret;
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/metrics-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/metrics-test.cc b/src/kudu/util/metrics-test.cc
index 725c91c..867ea6a 100644
--- a/src/kudu/util/metrics-test.cc
+++ b/src/kudu/util/metrics-test.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/assign/list_of.hpp>
 #include <gtest/gtest.h>
 #include <rapidjson/document.h>
 #include <string>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/pb_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/pb_util-test.cc b/src/kudu/util/pb_util-test.cc
index f59fa3d..093d5c9 100644
--- a/src/kudu/util/pb_util-test.cc
+++ b/src/kudu/util/pb_util-test.cc
@@ -22,7 +22,6 @@
 #include <string>
 #include <vector>
 
-#include <boost/assign.hpp>
 #include <google/protobuf/descriptor.pb.h>
 #include <gtest/gtest.h>
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/resettable_heartbeater-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/resettable_heartbeater-test.cc b/src/kudu/util/resettable_heartbeater-test.cc
index aeb67d7..0e4cf3b 100644
--- a/src/kudu/util/resettable_heartbeater-test.cc
+++ b/src/kudu/util/resettable_heartbeater-test.cc
@@ -17,8 +17,7 @@
 
 #include "kudu/util/resettable_heartbeater.h"
 
-#include <boost/bind/bind.hpp>
-#include <boost/thread/locks.hpp>
+#include <boost/bind.hpp>
 #include <gtest/gtest.h>
 #include <string>
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/ea9dedbd/src/kudu/util/rle-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/rle-test.cc b/src/kudu/util/rle-test.cc
index d9a9489..3b71dc2 100644
--- a/src/kudu/util/rle-test.cc
+++ b/src/kudu/util/rle-test.cc
@@ -20,7 +20,7 @@
 // Must come before gtest.h.
 #include "kudu/gutil/mathlimits.h"
 
-#include <boost/utility.hpp>
+#include <boost/utility/binary.hpp>
 #include <gtest/gtest.h>
 #include <string>
 #include <vector>