kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [8/9] incubator-kudu git commit: Enable C++11
Date Wed, 13 Jan 2016 17:18:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/java/kudu-client/dev-support/build-proto.sh
----------------------------------------------------------------------
diff --git a/java/kudu-client/dev-support/build-proto.sh b/java/kudu-client/dev-support/build-proto.sh
index a2eff19..9a03a0b 100755
--- a/java/kudu-client/dev-support/build-proto.sh
+++ b/java/kudu-client/dev-support/build-proto.sh
@@ -23,7 +23,7 @@
 #
 
 KUDU_DIR=`dirname $0`/../../..
-PROTOC_BIN=$KUDU_DIR/thirdparty/installed/bin/protoc
+PROTOC_BIN=$KUDU_DIR/thirdparty/installed-deps/bin/protoc
 if [ ! -f "$PROTOC_BIN" ] ; then
   if which protoc > /dev/null; then
     PROTOC_BIN=`which protoc`

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/java/kudu-client/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-client/pom.xml b/java/kudu-client/pom.xml
index f144756..2f42593 100644
--- a/java/kudu-client/pom.xml
+++ b/java/kudu-client/pom.xml
@@ -113,7 +113,7 @@
                     <protocExecutable>${project.basedir}/dev-support/build-proto.sh</protocExecutable>
                     <additionalProtoPathElements>
                       <additionalProtoPathElement>
-                        ${project.basedir}/../../thirdparty/installed/include
+                        ${project.basedir}/../../thirdparty/installed-deps/include
                       </additionalProtoPathElement>
                     </additionalProtoPathElements>
                     <excludes>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/tpch/rpc_line_item_dao-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/rpc_line_item_dao-test.cc b/src/kudu/benchmarks/tpch/rpc_line_item_dao-test.cc
index 821f803..9a03b22 100644
--- a/src/kudu/benchmarks/tpch/rpc_line_item_dao-test.cc
+++ b/src/kudu/benchmarks/tpch/rpc_line_item_dao-test.cc
@@ -34,7 +34,6 @@
 
 namespace kudu {
 
-using boost::assign::list_of;
 using client::KuduRowResult;
 using client::KuduSchema;
 using std::string;
@@ -152,7 +151,7 @@ TEST_F(RpcLineItemDAOTest, TestUpdate) {
   dao_->MutateLine(boost::bind(UpdateTestRow, 1, 1, 12345, _1));
   dao_->FinishWriting();
   gscoped_ptr<RpcLineItemDAO::Scanner> scanner;
-  dao_->OpenScanner(list_of<string>(tpch::kQuantityColName), &scanner);
+  dao_->OpenScanner({ tpch::kQuantityColName }, &scanner);
   vector<KuduRowResult> rows;
   while (scanner->HasMore()) {
     scanner->GetNext(&rows);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/tpch/rpc_line_item_dao.cc
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/rpc_line_item_dao.cc b/src/kudu/benchmarks/tpch/rpc_line_item_dao.cc
index df334db..b6dec1e 100644
--- a/src/kudu/benchmarks/tpch/rpc_line_item_dao.cc
+++ b/src/kudu/benchmarks/tpch/rpc_line_item_dao.cc
@@ -19,7 +19,6 @@
 #include <boost/thread/locks.hpp>
 #include <glog/logging.h>
 #include <vector>
-#include <tr1/memory>
 #include <utility>
 
 #include "kudu/benchmarks/tpch/rpc_line_item_dao.h"
@@ -39,8 +38,6 @@
 DEFINE_bool(tpch_cache_blocks_when_scanning, true,
             "Whether the scanners should cache the blocks that are read or not");
 
-using std::tr1::shared_ptr;
-
 namespace kudu {
 
 using client::KuduInsert;
@@ -63,7 +60,7 @@ namespace {
 
 class FlushCallback : public KuduStatusCallback {
  public:
-  FlushCallback(shared_ptr<KuduSession> session, Semaphore *sem)
+  FlushCallback(client::sp::shared_ptr<KuduSession> session, Semaphore *sem)
     : session_(session),
       sem_(sem) {
     sem_->Acquire();
@@ -94,7 +91,7 @@ class FlushCallback : public KuduStatusCallback {
     }
   }
 
-  shared_ptr<KuduSession> session_;
+  client::sp::shared_ptr<KuduSession> session_;
   Semaphore *sem_;
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/tpch/rpc_line_item_dao.h
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/rpc_line_item_dao.h b/src/kudu/benchmarks/tpch/rpc_line_item_dao.h
index 0a22e76..3ad6bcb 100644
--- a/src/kudu/benchmarks/tpch/rpc_line_item_dao.h
+++ b/src/kudu/benchmarks/tpch/rpc_line_item_dao.h
@@ -20,7 +20,6 @@
 #include <boost/function.hpp>
 #include <set>
 #include <string>
-#include <tr1/memory>
 #include <utility>
 #include <vector>
 
@@ -90,9 +89,9 @@ class RpcLineItemDAO {
                    gscoped_ptr<Scanner>* scanner);
 
   simple_spinlock lock_;
-  std::tr1::shared_ptr<client::KuduClient> client_;
-  std::tr1::shared_ptr<client::KuduSession> session_;
-  std::tr1::shared_ptr<client::KuduTable> client_table_;
+  client::sp::shared_ptr<client::KuduClient> client_;
+  client::sp::shared_ptr<client::KuduSession> session_;
+  client::sp::shared_ptr<client::KuduTable> client_table_;
   const std::string master_address_;
   const std::string table_name_;
   const MonoDelta timeout_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/tpch/tpch-schemas.h
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/tpch-schemas.h b/src/kudu/benchmarks/tpch/tpch-schemas.h
index acd1c38..20dfe6c 100644
--- a/src/kudu/benchmarks/tpch/tpch-schemas.h
+++ b/src/kudu/benchmarks/tpch/tpch-schemas.h
@@ -19,7 +19,6 @@
 #ifndef KUDU_BENCHMARKS_TPCH_SCHEMAS_H
 #define KUDU_BENCHMARKS_TPCH_SCHEMAS_H
 
-#include <boost/assign/list_of.hpp>
 #include <string>
 #include <vector>
 
@@ -98,21 +97,20 @@ inline client::KuduSchema CreateLineItemSchema() {
   b.AddColumn(kShipModeColName)->Type(kString)->NotNull()->Encoding(kPlainEncoding);
   b.AddColumn(kCommentColName)->Type(kString)->NotNull()->Encoding(kPlainEncoding);
 
-  b.SetPrimaryKey(boost::assign::list_of<std::string>(kOrderKeyColName)(kLineNumberColName));
+  b.SetPrimaryKey({ kOrderKeyColName, kLineNumberColName });
 
   CHECK_OK(b.Build(&s));
   return s;
 }
 
 inline std::vector<std::string> GetTpchQ1QueryColumns() {
-  return boost::assign::list_of<std::string>
-    (kShipDateColName)
-    (kReturnFlagColName)
-    (kLineStatusColName)
-    (kQuantityColName)
-    (kExtendedPriceColName)
-    (kDiscountColName)
-    (kTaxColName);
+  return { kShipDateColName,
+           kReturnFlagColName,
+           kLineStatusColName,
+           kQuantityColName,
+           kExtendedPriceColName,
+           kDiscountColName,
+           kTaxColName };
 }
 
 } // namespace tpch

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/tpch/tpch1.cc
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/tpch/tpch1.cc b/src/kudu/benchmarks/tpch/tpch1.cc
index 453d48f..9188a32 100644
--- a/src/kudu/benchmarks/tpch/tpch1.cc
+++ b/src/kudu/benchmarks/tpch/tpch1.cc
@@ -58,7 +58,7 @@
 // ====
 #include <boost/bind.hpp>
 #include <boost/foreach.hpp>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <stdlib.h>
 
 #include <glog/logging.h>
@@ -99,7 +99,7 @@ using client::KuduColumnSchema;
 using client::KuduRowResult;
 using client::KuduSchema;
 
-using std::tr1::unordered_map;
+using std::unordered_map;
 
 struct Result {
   int32_t l_quantity;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/benchmarks/ycsb-schema.h
----------------------------------------------------------------------
diff --git a/src/kudu/benchmarks/ycsb-schema.h b/src/kudu/benchmarks/ycsb-schema.h
index 0f847d4..5a5386a 100644
--- a/src/kudu/benchmarks/ycsb-schema.h
+++ b/src/kudu/benchmarks/ycsb-schema.h
@@ -19,7 +19,6 @@
 #ifndef KUDU_BENCHMARKS_YCSB_SCHEMA_H
 #define KUDU_BENCHMARKS_YCSB_SCHEMA_H
 
-#include <boost/assign/list_of.hpp>
 #include "kudu/client/schema.h"
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/binary_dict_block.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/binary_dict_block.h b/src/kudu/cfile/binary_dict_block.h
index 8f0b964..19a69eb 100644
--- a/src/kudu/cfile/binary_dict_block.h
+++ b/src/kudu/cfile/binary_dict_block.h
@@ -37,7 +37,7 @@
 #define KUDU_CFILE_BINARY_DICT_BLOCK_H
 
 #include <string>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <vector>
 
 #include "kudu/cfile/block_encodings.h"
@@ -100,7 +100,7 @@ class BinaryDictBlockBuilder : public BlockBuilder {
   // They should NOT be clear in the Reset() method.
   BinaryPlainBlockBuilder dict_block_;
 
-  std::tr1::unordered_map<StringPiece, uint32_t, GoodFastHash<StringPiece> > dictionary_;
+  std::unordered_map<StringPiece, uint32_t, GoodFastHash<StringPiece> > dictionary_;
   // Memory to hold the actual content for strings in the dictionary_.
   //
   // The size of it should be bigger than the size limit for dictionary block

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/block_compression.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/block_compression.h b/src/kudu/cfile/block_compression.h
index 3592e74..14c7bff 100644
--- a/src/kudu/cfile/block_compression.h
+++ b/src/kudu/cfile/block_compression.h
@@ -17,7 +17,7 @@
 #ifndef KUDU_CFILE_BLOCK_COMPRESSION_H
 #define KUDU_CFILE_BLOCK_COMPRESSION_H
 
-#include <tr1/memory>
+#include <memory>
 #include <vector>
 
 #include "kudu/cfile/cfile.pb.h"

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/bloomfile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/bloomfile-test.cc b/src/kudu/cfile/bloomfile-test.cc
index a39848b..185a174 100644
--- a/src/kudu/cfile/bloomfile-test.cc
+++ b/src/kudu/cfile/bloomfile-test.cc
@@ -18,7 +18,7 @@
 #include "kudu/cfile/bloomfile-test-base.h"
 #include "kudu/fs/fs-test-util.h"
 
-using std::tr1::shared_ptr;
+using std::shared_ptr;
 
 namespace kudu {
 namespace cfile {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/bloomfile.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/bloomfile.cc b/src/kudu/cfile/bloomfile.cc
index 3248a2a..6d2dcf0 100644
--- a/src/kudu/cfile/bloomfile.cc
+++ b/src/kudu/cfile/bloomfile.cc
@@ -17,9 +17,10 @@
 
 #include <boost/thread/locks.hpp>
 #include <boost/thread/mutex.hpp>
+#include <mutex>
 #include <sched.h>
-#include <unistd.h>
 #include <string>
+#include <unistd.h>
 
 #include "kudu/cfile/bloomfile.h"
 #include "kudu/cfile/cfile_writer.h"
@@ -247,9 +248,9 @@ Status BloomFileReader::CheckKeyPresent(const BloomKeyProbe &probe,
 #endif
   BlockPointer bblk_ptr;
   {
-    boost::unique_lock<simple_spinlock> lock;
+    std::unique_lock<simple_spinlock> lock;
     while (true) {
-      boost::unique_lock<simple_spinlock> l(iter_locks_[cpu], boost::try_to_lock);
+      std::unique_lock<simple_spinlock> l(iter_locks_[cpu], std::try_to_lock);
       if (l.owns_lock()) {
         lock.swap(l);
         break;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/cfile-dump.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile-dump.cc b/src/kudu/cfile/cfile-dump.cc
index 74b7b3b..ed33d1c 100644
--- a/src/kudu/cfile/cfile-dump.cc
+++ b/src/kudu/cfile/cfile-dump.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/assign/list_of.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <iostream>

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/cfile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile-test.cc b/src/kudu/cfile/cfile-test.cc
index 0dcc63e..0aab986 100644
--- a/src/kudu/cfile/cfile-test.cc
+++ b/src/kudu/cfile/cfile-test.cc
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <list>
 
-#include <boost/assign/list_of.hpp>
 #include "kudu/cfile/cfile-test-base.h"
 #include "kudu/cfile/cfile_reader.h"
 #include "kudu/cfile/cfile_writer.h"
@@ -47,7 +46,7 @@ METRIC_DECLARE_counter(block_cache_hits_caching);
 
 METRIC_DECLARE_entity(server);
 
-using std::tr1::shared_ptr;
+using std::shared_ptr;
 
 namespace kudu {
 namespace cfile {
@@ -472,9 +471,7 @@ void EncodeStringKey(const Schema &schema, const Slice& key,
 }
 
 void TestCFile::TestReadWriteStrings(EncodingType encoding) {
-  Schema schema(boost::assign::list_of
-                (ColumnSchema("key", STRING)),
-                1);
+  Schema schema({ ColumnSchema("key", STRING) }, 1);
 
   const int nrows = 10000;
   BlockId block_id;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/cfile_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile_util.h b/src/kudu/cfile/cfile_util.h
index 572b149..cf647a6 100644
--- a/src/kudu/cfile/cfile_util.h
+++ b/src/kudu/cfile/cfile_util.h
@@ -72,7 +72,7 @@ struct ReaderOptions {
   // The MemTracker that should account for this reader's memory consumption.
   //
   // Default: the root tracker.
-  std::tr1::shared_ptr<MemTracker> parent_mem_tracker;
+  std::shared_ptr<MemTracker> parent_mem_tracker;
 };
 
 struct DumpIteratorOptions {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/cfile_writer.h
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/cfile_writer.h b/src/kudu/cfile/cfile_writer.h
index 52a385c..a16b66a 100644
--- a/src/kudu/cfile/cfile_writer.h
+++ b/src/kudu/cfile/cfile_writer.h
@@ -19,7 +19,7 @@
 #define KUDU_CFILE_CFILE_WRITER_H
 
 #include <boost/utility.hpp>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <stdint.h>
 #include <string>
 #include <utility>
@@ -45,7 +45,7 @@ namespace kudu {
 class Arena;
 
 namespace cfile {
-using std::tr1::unordered_map;
+using std::unordered_map;
 
 class BlockPointer;
 class BTreeInfoPB;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/cfile/type_encodings.cc
----------------------------------------------------------------------
diff --git a/src/kudu/cfile/type_encodings.cc b/src/kudu/cfile/type_encodings.cc
index 815861f..baaeb8d 100644
--- a/src/kudu/cfile/type_encodings.cc
+++ b/src/kudu/cfile/type_encodings.cc
@@ -16,8 +16,8 @@
 // under the License.
 #include "kudu/cfile/type_encodings.h"
 
-#include <tr1/unordered_map>
-#include <tr1/memory>
+#include <unordered_map>
+#include <memory>
 #include <utility>
 
 #include <glog/logging.h>
@@ -36,8 +36,8 @@
 namespace kudu {
 namespace cfile {
 
-using std::tr1::unordered_map;
-using std::tr1::shared_ptr;
+using std::unordered_map;
+using std::shared_ptr;
 
 
 template<DataType Type, EncodingType Encoding>
@@ -308,7 +308,7 @@ class TypeEncodingResolver {
       shared_ptr<const TypeEncodingInfo>,
       EncodingMapHash > mapping_;
 
-  unordered_map<DataType, EncodingType, std::tr1::hash<size_t> > default_mapping_;
+  unordered_map<DataType, EncodingType, std::hash<size_t> > default_mapping_;
 
   friend class Singleton<TypeEncodingResolver>;
   DISALLOW_COPY_AND_ASSIGN(TypeEncodingResolver);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/client/CMakeLists.txt b/src/kudu/client/CMakeLists.txt
index 6693be6..e782aa2 100644
--- a/src/kudu/client/CMakeLists.txt
+++ b/src/kudu/client/CMakeLists.txt
@@ -156,6 +156,7 @@ install(FILES
   row_result.h
   scan_predicate.h
   schema.h
+  shared_ptr.h
   stubs.h
   value.h
   write_op.h

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/batcher.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/batcher.cc b/src/kudu/client/batcher.cc
index b5c5f8a..9b0bdf0 100644
--- a/src/kudu/client/batcher.cc
+++ b/src/kudu/client/batcher.cc
@@ -20,10 +20,10 @@
 #include <algorithm>
 #include <boost/bind.hpp>
 #include <glog/logging.h>
+#include <memory>
 #include <set>
 #include <string>
-#include <tr1/memory>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <utility>
 #include <vector>
 
@@ -51,8 +51,8 @@
 
 using std::pair;
 using std::set;
-using std::tr1::shared_ptr;
-using std::tr1::unordered_map;
+using std::shared_ptr;
+using std::unordered_map;
 using strings::Substitute;
 
 namespace kudu {
@@ -481,7 +481,7 @@ void WriteRpc::SendRpcCb(const Status& status) {
 
 Batcher::Batcher(KuduClient* client,
                  ErrorCollector* error_collector,
-                 const shared_ptr<KuduSession>& session,
+                 const sp::shared_ptr<KuduSession>& session,
                  kudu::client::KuduSession::ExternalConsistencyMode consistency_mode)
   : state_(kGatheringOps),
     client_(client),
@@ -554,7 +554,7 @@ int Batcher::CountBufferedOperations() const {
 }
 
 void Batcher::CheckForFinishedFlush() {
-  shared_ptr<KuduSession> session;
+  sp::shared_ptr<KuduSession> session;
   {
     lock_guard<simple_spinlock> l(&lock_);
     if (state_ != kFlushing || !ops_.empty()) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/batcher.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/batcher.h b/src/kudu/client/batcher.h
index fa33fa4..f79324b 100644
--- a/src/kudu/client/batcher.h
+++ b/src/kudu/client/batcher.h
@@ -17,9 +17,8 @@
 #ifndef KUDU_CLIENT_BATCHER_H
 #define KUDU_CLIENT_BATCHER_H
 
-#include <tr1/memory>
-#include <tr1/unordered_set>
-#include <tr1/unordered_map>
+#include <unordered_map>
+#include <unordered_set>
 #include <vector>
 
 #include "kudu/client/client.h"
@@ -65,7 +64,7 @@ class Batcher : public RefCountedThreadSafe<Batcher> {
   // Takes a reference on error_collector. Creates a weak_ptr to 'session'.
   Batcher(KuduClient* client,
           ErrorCollector* error_collector,
-          const std::tr1::shared_ptr<KuduSession>& session,
+          const client::sp::shared_ptr<KuduSession>& session,
           kudu::client::KuduSession::ExternalConsistencyMode consistency_mode);
 
   // Abort the current batch. Any writes that were buffered and not yet sent are
@@ -161,7 +160,7 @@ class Batcher : public RefCountedThreadSafe<Batcher> {
   State state_;
 
   KuduClient* const client_;
-  std::tr1::weak_ptr<KuduSession> weak_session_;
+  client::sp::weak_ptr<KuduSession> weak_session_;
 
   // The consistency mode set in the session.
   kudu::client::KuduSession::ExternalConsistencyMode consistency_mode_;
@@ -179,9 +178,9 @@ class Batcher : public RefCountedThreadSafe<Batcher> {
   KuduStatusCallback* flush_callback_;
 
   // All buffered or in-flight ops.
-  std::tr1::unordered_set<InFlightOp*> ops_;
+  std::unordered_set<InFlightOp*> ops_;
   // Each tablet's buffered ops.
-  typedef std::tr1::unordered_map<RemoteTablet*, std::vector<InFlightOp*> > OpsMap;
+  typedef std::unordered_map<RemoteTablet*, std::vector<InFlightOp*> > OpsMap;
   OpsMap per_tablet_ops_;
 
   // When each operation is added to the batcher, it is assigned a sequence number

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-internal.cc b/src/kudu/client/client-internal.cc
index a627c64..948d7c6 100644
--- a/src/kudu/client/client-internal.cc
+++ b/src/kudu/client/client-internal.cc
@@ -42,8 +42,8 @@
 #include "kudu/util/thread_restrictions.h"
 
 using std::set;
+using std::shared_ptr;
 using std::string;
-using std::tr1::shared_ptr;
 using std::vector;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-internal.h b/src/kudu/client/client-internal.h
index 1726404..81a2f43 100644
--- a/src/kudu/client/client-internal.h
+++ b/src/kudu/client/client-internal.h
@@ -20,6 +20,7 @@
 #include <boost/function.hpp>
 #include <set>
 #include <string>
+#include <unordered_set>
 #include <vector>
 
 #include "kudu/client/client.h"
@@ -151,7 +152,7 @@ class KuduClient::Data {
   Status SetMasterServerProxy(KuduClient* client,
                               const MonoTime& deadline);
 
-  std::tr1::shared_ptr<master::MasterServiceProxy> master_proxy() const;
+  std::shared_ptr<master::MasterServiceProxy> master_proxy() const;
 
   HostPort leader_master_hostport() const;
 
@@ -183,13 +184,13 @@ class KuduClient::Data {
                                    const ReqClass&, RespClass*,
                                    rpc::RpcController*)>& func);
 
-  std::tr1::shared_ptr<rpc::Messenger> messenger_;
+  std::shared_ptr<rpc::Messenger> messenger_;
   gscoped_ptr<DnsResolver> dns_resolver_;
   scoped_refptr<internal::MetaCache> meta_cache_;
 
   // Set of hostnames and IPs on the local host.
   // This is initialized at client startup.
-  std::tr1::unordered_set<std::string> local_host_names_;
+  std::unordered_set<std::string> local_host_names_;
 
   // Options the client was built with.
   std::vector<std::string> master_server_addrs_;
@@ -202,7 +203,7 @@ class KuduClient::Data {
   HostPort leader_master_hostport_;
 
   // Proxy to the leader master.
-  std::tr1::shared_ptr<master::MasterServiceProxy> master_proxy_;
+  std::shared_ptr<master::MasterServiceProxy> master_proxy_;
 
   // Ref-counted RPC instance: since 'SetMasterServerProxyAsync' call
   // is asynchronous, we need to hold a reference in this class

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-test-util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-test-util.cc b/src/kudu/client/client-test-util.cc
index ca13f89..898ae14 100644
--- a/src/kudu/client/client-test-util.cc
+++ b/src/kudu/client/client-test-util.cc
@@ -27,7 +27,7 @@
 namespace kudu {
 namespace client {
 
-void LogSessionErrorsAndDie(const std::tr1::shared_ptr<KuduSession>& session,
+void LogSessionErrorsAndDie(const sp::shared_ptr<KuduSession>& session,
                             const Status& s) {
   CHECK(!s.ok());
   std::vector<KuduError*> errors;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-test-util.h b/src/kudu/client/client-test-util.h
index 3c1143d..2932154 100644
--- a/src/kudu/client/client-test-util.h
+++ b/src/kudu/client/client-test-util.h
@@ -18,7 +18,6 @@
 #define KUDU_CLIENT_CLIENT_TEST_UTIL_H
 
 #include <string>
-#include <tr1/memory>
 #include <vector>
 
 #include "kudu/client/client.h"
@@ -33,12 +32,12 @@ class KuduSchema;
 
 // Log any pending errors in the given session, and then crash the current
 // process.
-void LogSessionErrorsAndDie(const std::tr1::shared_ptr<KuduSession>& session,
+void LogSessionErrorsAndDie(const sp::shared_ptr<KuduSession>& session,
                             const Status& s);
 
 // Flush the given session. If any errors occur, log them and crash
 // the process.
-inline void FlushSessionOrDie(const std::tr1::shared_ptr<KuduSession>& session) {
+inline void FlushSessionOrDie(const sp::shared_ptr<KuduSession>& session) {
   Status s = session->Flush();
   if (PREDICT_FALSE(!s.ok())) {
     LogSessionErrorsAndDie(session, s);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-test.cc b/src/kudu/client/client-test.cc
index 28a7047..505c167 100644
--- a/src/kudu/client/client-test.cc
+++ b/src/kudu/client/client-test.cc
@@ -15,13 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/assign/list_of.hpp>
 #include <boost/foreach.hpp>
 #include <gtest/gtest.h>
 #include <gflags/gflags.h>
 #include <glog/stl_logging.h>
 
-#include <tr1/memory>
 #include <vector>
 #include <algorithm>
 
@@ -78,24 +76,22 @@ DEFINE_int32(test_scan_num_rows, 1000, "Number of rows to insert and scan");
 METRIC_DECLARE_counter(scans_started);
 METRIC_DECLARE_counter(rpcs_queue_overflow);
 
-using boost::assign::list_of;
 using std::string;
 using std::set;
-using std::tr1::shared_ptr;
 using std::vector;
 
 namespace kudu {
 namespace client {
 
-
 using base::subtle::Atomic32;
+using base::subtle::NoBarrier_AtomicIncrement;
 using base::subtle::NoBarrier_Load;
 using base::subtle::NoBarrier_Store;
-using base::subtle::NoBarrier_AtomicIncrement;
 using master::CatalogManager;
 using master::GetTableLocationsRequestPB;
 using master::GetTableLocationsResponsePB;
 using master::TabletLocationsPB;
+using sp::shared_ptr;
 using tablet::TabletPeer;
 using tserver::MiniTabletServer;
 
@@ -255,7 +251,7 @@ class ClientTest : public KuduTest {
 
   void DoTestScanWithoutPredicates() {
     KuduScanner scanner(client_table_.get());
-    ASSERT_OK(scanner.SetProjectedColumns(list_of<string>("key")));
+    ASSERT_OK(scanner.SetProjectedColumns({ "key" }));
     LOG_TIMING(INFO, "Scanning with no predicates") {
       ASSERT_OK(scanner.Open());
 
@@ -751,14 +747,14 @@ TEST_F(ClientTest, TestScanEmptyProjection) {
 
 TEST_F(ClientTest, TestProjectInvalidColumn) {
   KuduScanner scanner(client_table_.get());
-  Status s = scanner.SetProjectedColumns(list_of<string>("column-doesnt-exist"));
+  Status s = scanner.SetProjectedColumns({ "column-doesnt-exist" });
   ASSERT_EQ("Not found: Column: \"column-doesnt-exist\" was not found in the table schema.",
             s.ToString());
 
   // Test trying to use a projection where a column is used multiple times.
   // TODO: consider fixing this to support returning the column multiple
   // times, even though it's not very useful.
-  s = scanner.SetProjectedColumns(list_of<string>("key")("key"));
+  s = scanner.SetProjectedColumns({ "key", "key" });
   ASSERT_EQ("Invalid argument: Duplicate column name: key", s.ToString());
 }
 
@@ -768,7 +764,7 @@ TEST_F(ClientTest, TestScanPredicateKeyColNotProjected) {
   ASSERT_NO_FATAL_FAILURE(InsertTestRows(client_table_.get(),
                                          FLAGS_test_scan_num_rows));
   KuduScanner scanner(client_table_.get());
-  ASSERT_OK(scanner.SetProjectedColumns(list_of<string>("int_val")));
+  ASSERT_OK(scanner.SetProjectedColumns({ "int_val" }));
   ASSERT_OK(scanner.AddConjunctPredicate(
                 client_table_->NewComparisonPredicate("key", KuduPredicate::GREATER_EQUAL,
                                                       KuduValue::FromInt(5))));
@@ -814,7 +810,7 @@ TEST_F(ClientTest, TestScanPredicateNonKeyColNotProjected) {
   size_t nrows = 0;
   int32_t curr_key = 10;
 
-  ASSERT_OK(scanner.SetProjectedColumns(list_of<string>("key")));
+  ASSERT_OK(scanner.SetProjectedColumns({ "key" }));
 
   LOG_TIMING(INFO, "Scanning with predicate columns not projected") {
     ASSERT_OK(scanner.Open());
@@ -2176,7 +2172,7 @@ TEST_F(ClientTest, TestReplicatedTabletWritesWithLeaderElection) {
 
   // Since we waited before, hopefully all replicas will be up to date
   // and we can just promote another replica.
-  shared_ptr<rpc::Messenger> client_messenger;
+  std::shared_ptr<rpc::Messenger> client_messenger;
   rpc::MessengerBuilder bld("client");
   ASSERT_OK(bld.Build(&client_messenger));
   gscoped_ptr<consensus::ConsensusServiceProxy> new_leader_proxy;
@@ -2570,7 +2566,7 @@ TEST_F(ClientTest, TestCreateTableWithTooManyTablets) {
   gscoped_ptr<KuduTableCreator> table_creator(client_->NewTableCreator());
   Status s = table_creator->table_name("foobar")
       .schema(&schema_)
-      .split_rows(list_of(split1)(split2))
+      .split_rows({ split1, split2 })
       .num_replicas(3)
       .Create();
   ASSERT_TRUE(s.IsInvalidArgument());
@@ -2588,7 +2584,7 @@ TEST_F(ClientTest, TestCreateTableWithTooManyReplicas) {
   gscoped_ptr<KuduTableCreator> table_creator(client_->NewTableCreator());
   Status s = table_creator->table_name("foobar")
       .schema(&schema_)
-      .split_rows(list_of(split1)(split2))
+      .split_rows({ split1, split2 })
       .num_replicas(3)
       .Create();
   ASSERT_TRUE(s.IsInvalidArgument());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client-unittest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-unittest.cc b/src/kudu/client/client-unittest.cc
index 3268f00..6c0033d 100644
--- a/src/kudu/client/client-unittest.cc
+++ b/src/kudu/client/client-unittest.cc
@@ -17,7 +17,6 @@
 //
 // Tests for the client which are true unit tests and don't require a cluster, etc.
 
-#include <boost/assign/list_of.hpp>
 #include <boost/bind.hpp>
 #include <gtest/gtest.h>
 #include <string>
@@ -26,7 +25,6 @@
 #include "kudu/client/client.h"
 #include "kudu/client/client-internal.h"
 
-using boost::assign::list_of;
 using std::string;
 using std::vector;
 
@@ -83,7 +81,7 @@ TEST(ClientUnitTest, TestSchemaBuilder_PrimaryKeyOnColumnAndSet) {
   KuduSchemaBuilder b;
   b.AddColumn("a")->Type(KuduColumnSchema::INT32)->PrimaryKey();
   b.AddColumn("b")->Type(KuduColumnSchema::INT32);
-  b.SetPrimaryKey(list_of<string>("a")("b"));
+  b.SetPrimaryKey({ "a", "b" });
   ASSERT_EQ("Invalid argument: primary key specified by both "
             "SetPrimaryKey() and on a specific column: a",
             b.Build(&s).ToString());
@@ -103,12 +101,12 @@ TEST(ClientUnitTest, TestSchemaBuilder_CompoundKey_GoodSchema) {
   KuduSchemaBuilder b;
   b.AddColumn("a")->Type(KuduColumnSchema::INT32)->NotNull();
   b.AddColumn("b")->Type(KuduColumnSchema::INT32)->NotNull();
-  b.SetPrimaryKey(list_of<string>("a")("b"));
+  b.SetPrimaryKey({ "a", "b" });
   ASSERT_EQ("OK", b.Build(&s).ToString());
 
   vector<int> key_columns;
   s.GetPrimaryKeyColumnIndexes(&key_columns);
-  ASSERT_EQ(list_of<int>(0)(1), key_columns);
+  ASSERT_EQ(vector<int>({ 0, 1 }), key_columns);
 }
 
 TEST(ClientUnitTest, TestSchemaBuilder_DefaultValues) {
@@ -137,7 +135,7 @@ TEST(ClientUnitTest, TestSchemaBuilder_CompoundKey_KeyNotFirst) {
   b.AddColumn("x")->Type(KuduColumnSchema::INT32)->NotNull();
   b.AddColumn("a")->Type(KuduColumnSchema::INT32)->NotNull();
   b.AddColumn("b")->Type(KuduColumnSchema::INT32)->NotNull();
-  b.SetPrimaryKey(list_of<string>("a")("b"));
+  b.SetPrimaryKey({ "a", "b" });
   ASSERT_EQ("Invalid argument: primary key columns must be listed "
             "first in the schema: a",
             b.Build(&s).ToString());
@@ -148,7 +146,7 @@ TEST(ClientUnitTest, TestSchemaBuilder_CompoundKey_BadColumnName) {
   KuduSchemaBuilder b;
   b.AddColumn("a")->Type(KuduColumnSchema::INT32)->NotNull();
   b.AddColumn("b")->Type(KuduColumnSchema::INT32)->NotNull();
-  b.SetPrimaryKey(list_of<string>("foo"));
+  b.SetPrimaryKey({ "foo" });
   ASSERT_EQ("Invalid argument: primary key column not defined: foo",
             b.Build(&s).ToString());
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.cc b/src/kudu/client/client.cc
index 0b3bab7..c1964c4 100644
--- a/src/kudu/client/client.cc
+++ b/src/kudu/client/client.cc
@@ -20,16 +20,15 @@
 #include <algorithm>
 #include <boost/bind.hpp>
 #include <set>
-#include <tr1/memory>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <vector>
 
 #include "kudu/client/batcher.h"
 #include "kudu/client/callbacks.h"
 #include "kudu/client/client-internal.h"
 #include "kudu/client/client_builder-internal.h"
-#include "kudu/client/error_collector.h"
 #include "kudu/client/error-internal.h"
+#include "kudu/client/error_collector.h"
 #include "kudu/client/meta_cache.h"
 #include "kudu/client/row_result.h"
 #include "kudu/client/scan_predicate-internal.h"
@@ -55,10 +54,6 @@
 #include "kudu/util/logging.h"
 #include "kudu/util/net/dns_resolver.h"
 
-using std::set;
-using std::string;
-using std::tr1::shared_ptr;
-using std::vector;
 using kudu::master::AlterTableRequestPB;
 using kudu::master::AlterTableRequestPB_Step;
 using kudu::master::AlterTableResponsePB;
@@ -68,17 +63,20 @@ using kudu::master::DeleteTableRequestPB;
 using kudu::master::DeleteTableResponsePB;
 using kudu::master::GetTableSchemaRequestPB;
 using kudu::master::GetTableSchemaResponsePB;
+using kudu::master::ListTablesRequestPB;
+using kudu::master::ListTablesResponsePB;
 using kudu::master::ListTabletServersRequestPB;
 using kudu::master::ListTabletServersResponsePB;
 using kudu::master::ListTabletServersResponsePB_Entry;
-using kudu::master::ListTablesRequestPB;
-using kudu::master::ListTablesResponsePB;
 using kudu::master::MasterServiceProxy;
 using kudu::master::TabletLocationsPB;
 using kudu::rpc::Messenger;
 using kudu::rpc::MessengerBuilder;
 using kudu::rpc::RpcController;
 using kudu::tserver::ScanResponsePB;
+using std::set;
+using std::string;
+using std::vector;
 
 MAKE_ENUM_LIMITS(kudu::client::KuduSession::FlushMode,
                  kudu::client::KuduSession::AUTO_FLUSH_SYNC,
@@ -102,6 +100,7 @@ namespace client {
 using internal::Batcher;
 using internal::ErrorCollector;
 using internal::MetaCache;
+using sp::shared_ptr;
 
 static const int kHtTimestampBitsToShift = 12;
 static const char* kProgName = "kudu_client";

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/client.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h
index 958b996..2ad8214 100644
--- a/src/kudu/client/client.h
+++ b/src/kudu/client/client.h
@@ -19,12 +19,11 @@
 
 #include <stdint.h>
 #include <string>
-#include <tr1/memory>
-#include <tr1/unordered_set>
 #include <vector>
 
 #include "kudu/client/scan_predicate.h"
 #include "kudu/client/schema.h"
+#include "kudu/client/shared_ptr.h"
 #ifdef KUDU_HEADERS_NO_STUBS
 #include <gtest/gtest_prod.h>
 #include "kudu/gutil/macros.h"
@@ -137,7 +136,7 @@ class KUDU_EXPORT KuduClientBuilder {
   // The return value may indicate an error in the create operation, or a
   // misuse of the builder; in the latter case, only the last error is
   // returned.
-  Status Build(std::tr1::shared_ptr<KuduClient>* client);
+  Status Build(sp::shared_ptr<KuduClient>* client);
  private:
   class KUDU_NO_EXPORT Data;
 
@@ -171,7 +170,7 @@ class KUDU_EXPORT KuduClientBuilder {
 // as well.
 //
 // This class is thread-safe.
-class KUDU_EXPORT KuduClient : public std::tr1::enable_shared_from_this<KuduClient> {
+class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
  public:
   ~KuduClient();
 
@@ -214,12 +213,12 @@ class KUDU_EXPORT KuduClient : public std::tr1::enable_shared_from_this<KuduClie
   // TODO: should we offer an async version of this as well?
   // TODO: probably should have a configurable timeout in KuduClientBuilder?
   Status OpenTable(const std::string& table_name,
-                   std::tr1::shared_ptr<KuduTable>* table);
+                   sp::shared_ptr<KuduTable>* table);
 
   // Create a new session for interacting with the cluster.
   // User is responsible for destroying the session object.
   // This is a fully local operation (no RPCs or blocking).
-  std::tr1::shared_ptr<KuduSession> NewSession();
+  sp::shared_ptr<KuduSession> NewSession();
 
   // Policy with which to choose amongst multiple replicas.
   enum ReplicaSelection {
@@ -389,7 +388,7 @@ class KUDU_EXPORT KuduTableCreator {
 // and the schema fetched for introspection.
 //
 // This class is thread-safe.
-class KUDU_EXPORT KuduTable : public std::tr1::enable_shared_from_this<KuduTable> {
+class KUDU_EXPORT KuduTable : public sp::enable_shared_from_this<KuduTable> {
  public:
   ~KuduTable();
 
@@ -436,7 +435,7 @@ class KUDU_EXPORT KuduTable : public std::tr1::enable_shared_from_this<KuduTable
 
   friend class KuduClient;
 
-  KuduTable(const std::tr1::shared_ptr<KuduClient>& client,
+  KuduTable(const sp::shared_ptr<KuduClient>& client,
             const std::string& name,
             const std::string& table_id,
             const KuduSchema& schema,
@@ -603,7 +602,7 @@ class KUDU_EXPORT KuduError {
 // concept of a Session familiar.
 //
 // This class is not thread-safe except where otherwise specified.
-class KUDU_EXPORT KuduSession : public std::tr1::enable_shared_from_this<KuduSession> {
+class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession> {
  public:
   ~KuduSession();
 
@@ -806,7 +805,7 @@ class KUDU_EXPORT KuduSession : public std::tr1::enable_shared_from_this<KuduSes
 
   friend class KuduClient;
   friend class internal::Batcher;
-  explicit KuduSession(const std::tr1::shared_ptr<KuduClient>& client);
+  explicit KuduSession(const sp::shared_ptr<KuduClient>& client);
 
   // Owned.
   Data* data_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/meta_cache.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/meta_cache.cc b/src/kudu/client/meta_cache.cc
index 4146a04..527c3b7 100644
--- a/src/kudu/client/meta_cache.cc
+++ b/src/kudu/client/meta_cache.cc
@@ -38,7 +38,7 @@
 
 using std::string;
 using std::map;
-using std::tr1::shared_ptr;
+using std::shared_ptr;
 using strings::Substitute;
 
 namespace kudu {
@@ -326,7 +326,7 @@ class LookupRpc : public Rpc {
  private:
   virtual void SendRpcCb(const Status& status) OVERRIDE;
 
-  std::tr1::shared_ptr<MasterServiceProxy> master_proxy() const {
+  std::shared_ptr<MasterServiceProxy> master_proxy() const {
     return table_->client()->data_->master_proxy();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/meta_cache.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/meta_cache.h b/src/kudu/client/meta_cache.h
index 08c440c..6e122c1 100644
--- a/src/kudu/client/meta_cache.h
+++ b/src/kudu/client/meta_cache.h
@@ -22,8 +22,8 @@
 #include <boost/function.hpp>
 #include <map>
 #include <string>
-#include <tr1/memory>
-#include <tr1/unordered_map>
+#include <memory>
+#include <unordered_map>
 #include <vector>
 
 #include "kudu/common/partition.h"
@@ -80,7 +80,7 @@ class RemoteTabletServer {
 
   // Return the current proxy to this tablet server. Requires that RefreshProxy
   // be called prior to this.
-  std::tr1::shared_ptr<tserver::TabletServerServiceProxy> proxy() const;
+  std::shared_ptr<tserver::TabletServerServiceProxy> proxy() const;
 
   std::string ToString() const;
 
@@ -101,7 +101,7 @@ class RemoteTabletServer {
   const std::string uuid_;
 
   std::vector<HostPort> rpc_hostports_;
-  std::tr1::shared_ptr<tserver::TabletServerServiceProxy> proxy_;
+  std::shared_ptr<tserver::TabletServerServiceProxy> proxy_;
 
   DISALLOW_COPY_AND_ASSIGN(RemoteTabletServer);
 };
@@ -112,7 +112,7 @@ struct RemoteReplica {
   bool failed;
 };
 
-typedef std::tr1::unordered_map<std::string, RemoteTabletServer*> TabletServerMap;
+typedef std::unordered_map<std::string, RemoteTabletServer*> TabletServerMap;
 
 // The client's view of a given tablet. This object manages lookups of
 // the tablet's locations, status, etc.
@@ -274,12 +274,12 @@ class MetaCache : public RefCountedThreadSafe<MetaCache> {
   //
   // Protected by lock_.
   typedef std::map<std::string, scoped_refptr<RemoteTablet> > TabletMap;
-  std::tr1::unordered_map<std::string, TabletMap> tablets_by_table_and_key_;
+  std::unordered_map<std::string, TabletMap> tablets_by_table_and_key_;
 
   // Cache of tablets, keyed by tablet ID.
   //
   // Protected by lock_
-  std::tr1::unordered_map<std::string, scoped_refptr<RemoteTablet> > tablets_by_id_;
+  std::unordered_map<std::string, scoped_refptr<RemoteTablet> > tablets_by_id_;
 
   // Prevents master lookup "storms" by delaying master lookups when all
   // permits have been acquired.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/samples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/client/samples/CMakeLists.txt b/src/kudu/client/samples/CMakeLists.txt
index 85337df..f4c4990 100644
--- a/src/kudu/client/samples/CMakeLists.txt
+++ b/src/kudu/client/samples/CMakeLists.txt
@@ -22,12 +22,6 @@ cmake_minimum_required(VERSION 2.8)
 find_package(kuduClient REQUIRED)
 include_directories(${KUDU_CLIENT_INCLUDE_DIR})
 
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-  # Use libstdc++ and not libc++. The latter lacks support for tr1 in OSX
-  # and since 10.9 is now the default.
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
-endif()
-
 # The Kudu client library always uses the old gcc ABI.
 add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/samples/sample.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/samples/sample.cc b/src/kudu/client/samples/sample.cc
index c994153..c2963ef 100644
--- a/src/kudu/client/samples/sample.cc
+++ b/src/kudu/client/samples/sample.cc
@@ -18,7 +18,6 @@
 #include <ctime>
 #include <iostream>
 #include <sstream>
-#include <tr1/memory>
 
 #include "kudu/client/callbacks.h"
 #include "kudu/client/client.h"
@@ -43,6 +42,7 @@ using kudu::client::KuduTable;
 using kudu::client::KuduTableAlterer;
 using kudu::client::KuduTableCreator;
 using kudu::client::KuduValue;
+using kudu::client::sp::shared_ptr;
 using kudu::KuduPartialRow;
 using kudu::MonoDelta;
 using kudu::Status;
@@ -50,7 +50,6 @@ using kudu::Status;
 using std::string;
 using std::stringstream;
 using std::vector;
-using std::tr1::shared_ptr;
 
 static Status CreateClient(const string& addr,
                            shared_ptr<KuduClient>* client) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/scanner-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/scanner-internal.h b/src/kudu/client/scanner-internal.h
index e92e34a..3ac321f 100644
--- a/src/kudu/client/scanner-internal.h
+++ b/src/kudu/client/scanner-internal.h
@@ -118,7 +118,7 @@ class KuduScanner::Data {
   internal::RemoteTabletServer* ts_;
   // The proxy can be derived from the RemoteTabletServer, but this involves retaking the
   // meta cache lock. Keeping our own shared_ptr avoids this overhead.
-  std::tr1::shared_ptr<tserver::TabletServerServiceProxy> proxy_;
+  std::shared_ptr<tserver::TabletServerServiceProxy> proxy_;
 
   // The next scan request to be sent. This is cached as a field
   // since most scan requests will share the scanner ID with the previous

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/schema.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/schema.cc b/src/kudu/client/schema.cc
index a0aa52e..aa574c0 100644
--- a/src/kudu/client/schema.cc
+++ b/src/kudu/client/schema.cc
@@ -19,7 +19,7 @@
 
 #include <boost/foreach.hpp>
 #include <glog/logging.h>
-#include <tr1/unordered_map>
+#include <unordered_map>
 
 #include "kudu/client/schema-internal.h"
 #include "kudu/client/value-internal.h"
@@ -40,7 +40,7 @@ MAKE_ENUM_LIMITS(kudu::client::KuduColumnSchema::DataType,
                  kudu::client::KuduColumnSchema::INT8,
                  kudu::client::KuduColumnSchema::BOOL);
 
-using std::tr1::unordered_map;
+using std::unordered_map;
 using std::vector;
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/session-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/session-internal.cc b/src/kudu/client/session-internal.cc
index f9f84dc..4052305 100644
--- a/src/kudu/client/session-internal.cc
+++ b/src/kudu/client/session-internal.cc
@@ -19,8 +19,7 @@
 
 #include "kudu/client/batcher.h"
 #include "kudu/client/error_collector.h"
-
-using std::tr1::shared_ptr;
+#include "kudu/client/shared_ptr.h"
 
 namespace kudu {
 
@@ -29,6 +28,8 @@ namespace client {
 using internal::Batcher;
 using internal::ErrorCollector;
 
+using sp::shared_ptr;
+
 KuduSession::Data::Data(const shared_ptr<KuduClient>& client)
   : client_(client),
     error_collector_(new ErrorCollector()),

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/session-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/session-internal.h b/src/kudu/client/session-internal.h
index 4b0157d..9611e61 100644
--- a/src/kudu/client/session-internal.h
+++ b/src/kudu/client/session-internal.h
@@ -17,8 +17,7 @@
 #ifndef KUDU_CLIENT_SESSION_INTERNAL_H
 #define KUDU_CLIENT_SESSION_INTERNAL_H
 
-#include <tr1/memory>
-#include <tr1/unordered_set>
+#include <unordered_set>
 
 #include "kudu/client/client.h"
 #include "kudu/util/locks.h"
@@ -34,14 +33,14 @@ class ErrorCollector;
 
 class KuduSession::Data {
  public:
-  explicit Data(const std::tr1::shared_ptr<KuduClient>& client);
+  explicit Data(const sp::shared_ptr<KuduClient>& client);
   ~Data();
 
-  void Init(const std::tr1::shared_ptr<KuduSession>& session);
+  void Init(const sp::shared_ptr<KuduSession>& session);
 
   // Swap in a new Batcher instance, returning the old one in '*old_batcher', unless it is
   // NULL.
-  void NewBatcher(const std::tr1::shared_ptr<KuduSession>& session,
+  void NewBatcher(const sp::shared_ptr<KuduSession>& session,
                   scoped_refptr<internal::Batcher>* old_batcher);
 
   // Called by Batcher when a flush has finished.
@@ -53,7 +52,7 @@ class KuduSession::Data {
   Status Close(bool force);
 
   // The client that this session is associated with.
-  const std::tr1::shared_ptr<KuduClient> client_;
+  const sp::shared_ptr<KuduClient> client_;
 
   // Lock protecting internal state.
   // Note that this lock should not be taken if the thread is already holding
@@ -73,7 +72,7 @@ class KuduSession::Data {
   // the flush is active, the batcher manages its own refcount. The Batcher will always
   // call FlushFinished() before it destructs itself, so we're guaranteed that these
   // pointers stay valid.
-  std::tr1::unordered_set<internal::Batcher*> flushed_batchers_;
+  std::unordered_set<internal::Batcher*> flushed_batchers_;
 
   FlushMode flush_mode_;
   kudu::client::KuduSession::ExternalConsistencyMode external_consistency_mode_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/shared_ptr.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/shared_ptr.h b/src/kudu/client/shared_ptr.h
new file mode 100644
index 0000000..2cc8c16
--- /dev/null
+++ b/src/kudu/client/shared_ptr.h
@@ -0,0 +1,63 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef KUDU_CLIENT_SHARED_PTR_H
+#define KUDU_CLIENT_SHARED_PTR_H
+
+// Kudu uses c++11 features internally, but provides a client interface which
+// does not require c++11. We use std::tr1::shared_ptr in our public interface
+// to hold shared instances of KuduClient, KuduSession, and KuduTable.
+//
+// Unfortunately, on OS X, libc++ is the default c++ standard library
+// implementation and is required when compiling with c++11, but it does not
+// include the tr1 APIs. As a workaround, we use std::shared_ptr on OS X, since
+// OS X is for development only, and it is acceptable to require clients to
+// compile with c++11.
+//
+// In order to allow applications to compile against Kudu on both Linux and OS
+// X, we provide this typedef which resolves to std::tr1::shared_ptr on Linux
+// and std::shared_ptr on OS X. Clients are encouraged to use these typedefs in
+// order to ensure that applications will compile on both Linux and OS X.
+
+#if defined(__APPLE__)
+#include <memory>
+
+namespace kudu {
+namespace client {
+namespace sp {
+  using std::shared_ptr;
+  using std::weak_ptr;
+  using std::enable_shared_from_this;
+}
+}
+}
+
+#else
+#include <tr1/memory>
+
+namespace kudu {
+namespace client {
+namespace sp {
+  using std::tr1::shared_ptr;
+  using std::tr1::weak_ptr;
+  using std::tr1::enable_shared_from_this;
+}
+}
+}
+#endif
+
+#endif // define KUDU_CLIENT_SHARED_PTR_H

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/symbols.map
----------------------------------------------------------------------
diff --git a/src/kudu/client/symbols.map b/src/kudu/client/symbols.map
index 40c574b..0f08921 100644
--- a/src/kudu/client/symbols.map
+++ b/src/kudu/client/symbols.map
@@ -19,11 +19,19 @@
     zError;
     zlib*;
 
+    # devtoolset
+    __cxa_throw_bad_array*;
+
     extern "C++" {
       # glog, gflags, and protobuf
       *google::*;
       fL*::FLAGS_*;
       gflags_mutex_namespace::*;
-      glog_internal_namespace_::*
+      glog_internal_namespace_::*;
+
+      # devtoolset - the Red Hat devtoolset statically links c++11 symbols
+      # into binaries so that the result may be executed on a system with an
+      # older libstdc++ which doesn't include the necessary c++11 symbols.
+      std::*;
     };
 };

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/table-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/table-internal.cc b/src/kudu/client/table-internal.cc
index 9ea85d9..04575f7 100644
--- a/src/kudu/client/table-internal.cc
+++ b/src/kudu/client/table-internal.cc
@@ -34,10 +34,11 @@ using master::GetTableLocationsRequestPB;
 using master::GetTableLocationsResponsePB;
 using rpc::RpcController;
 using std::string;
-using std::tr1::shared_ptr;
 
 namespace client {
 
+using sp::shared_ptr;
+
 KuduTable::Data::Data(const shared_ptr<KuduClient>& client,
                       const string& name,
                       const string& id,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/table-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/table-internal.h b/src/kudu/client/table-internal.h
index 33a2bd1..5d3beb7 100644
--- a/src/kudu/client/table-internal.h
+++ b/src/kudu/client/table-internal.h
@@ -28,7 +28,7 @@ namespace client {
 
 class KuduTable::Data {
  public:
-  Data(const std::tr1::shared_ptr<KuduClient>& client,
+  Data(const sp::shared_ptr<KuduClient>& client,
        const std::string& name,
        const std::string& table_id,
        const KuduSchema& schema,
@@ -37,7 +37,7 @@ class KuduTable::Data {
 
   Status Open();
 
-  std::tr1::shared_ptr<KuduClient> client_;
+  sp::shared_ptr<KuduClient> client_;
 
   std::string name_;
   const std::string id_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/write_op.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/write_op.cc b/src/kudu/client/write_op.cc
index d50e96e..6064885 100644
--- a/src/kudu/client/write_op.cc
+++ b/src/kudu/client/write_op.cc
@@ -22,11 +22,11 @@
 #include "kudu/common/row.h"
 #include "kudu/common/wire_protocol.pb.h"
 
-using std::tr1::shared_ptr;
-
 namespace kudu {
 namespace client {
 
+using sp::shared_ptr;
+
 RowOperationsPB_Type ToInternalWriteType(KuduWriteOperation::Type type) {
   switch (type) {
     case KuduWriteOperation::INSERT: return RowOperationsPB_Type_INSERT;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/client/write_op.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/write_op.h b/src/kudu/client/write_op.h
index bc1251d..4340eb3 100644
--- a/src/kudu/client/write_op.h
+++ b/src/kudu/client/write_op.h
@@ -18,8 +18,8 @@
 #define KUDU_CLIENT_WRITE_OP_H
 
 #include <string>
-#include <tr1/memory>
 
+#include "kudu/client/shared_ptr.h"
 #include "kudu/common/partial_row.h"
 #include "kudu/util/kudu_export.h"
 
@@ -60,10 +60,10 @@ class KUDU_EXPORT KuduWriteOperation {
 
   virtual std::string ToString() const = 0;
  protected:
-  explicit KuduWriteOperation(const std::tr1::shared_ptr<KuduTable>& table);
+  explicit KuduWriteOperation(const sp::shared_ptr<KuduTable>& table);
   virtual Type type() const = 0;
 
-  std::tr1::shared_ptr<KuduTable> const table_;
+  sp::shared_ptr<KuduTable> const table_;
   KuduPartialRow row_;
 
  private:
@@ -101,7 +101,7 @@ class KUDU_EXPORT KuduInsert : public KuduWriteOperation {
 
  private:
   friend class KuduTable;
-  explicit KuduInsert(const std::tr1::shared_ptr<KuduTable>& table);
+  explicit KuduInsert(const sp::shared_ptr<KuduTable>& table);
 };
 
 
@@ -123,7 +123,7 @@ class KUDU_EXPORT KuduUpdate : public KuduWriteOperation {
 
  private:
   friend class KuduTable;
-  explicit KuduUpdate(const std::tr1::shared_ptr<KuduTable>& table);
+  explicit KuduUpdate(const sp::shared_ptr<KuduTable>& table);
 };
 
 
@@ -144,7 +144,7 @@ class KUDU_EXPORT KuduDelete : public KuduWriteOperation {
 
  private:
   friend class KuduTable;
-  explicit KuduDelete(const std::tr1::shared_ptr<KuduTable>& table);
+  explicit KuduDelete(const sp::shared_ptr<KuduTable>& table);
 };
 
 } // namespace client

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/CMakeLists.txt b/src/kudu/codegen/CMakeLists.txt
index ddbb3db..37dc612 100644
--- a/src/kudu/codegen/CMakeLists.txt
+++ b/src/kudu/codegen/CMakeLists.txt
@@ -44,12 +44,7 @@ add_definitions(${LLVM_DEFINITIONS})
 add_definitions(-DLLVM_SUPPORT_VALGRIND_H)
 
 ## Get the required libraries to link to in llvm
-# as of llvm 3.5, there are two different functions for this
-if (${LLVM_PACKAGE_VERSION} VERSION_LESS 3.5)
-  llvm_map_components_to_libraries(llvm_LIBRARIES "${LLVM_REQ_COMPONENTS}")
-else()
-  llvm_map_components_to_libnames(llvm_LIBRARIES "${LLVM_REQ_COMPONENETS}")
-endif()
+llvm_map_components_to_libnames(llvm_LIBRARIES "${LLVM_REQ_COMPONENTS}")
 
 #######################################
 # Precompiling to LLVM bytecode
@@ -67,6 +62,14 @@ set(IR_INCLUDES
   -I ${GTEST_INCLUDE_DIR}
   -I ${Boost_INCLUDE_DIR})
 
+if (APPLE)
+  # OS X keeps the libc++ headers in a non-standard location that the thirdparty
+  # Clang does not know about by default.
+  set(IR_INCLUDES
+    ${IR_INCLUDES}
+    -cxx-isystem "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1")
+endif()
+
 # Get preprocessing definitions, which enable directives for glog and gtest
 get_directory_property(IR_PP_DEFINITIONS
   DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -80,7 +83,6 @@ set(IR_FLAGS
   -DIR_BUILD
   ${CMAKE_CXX_FLAGS}
   ${PREFIXED_IR_PP_DEFS}
-  -Wno-c++11-extensions # OVERRIDE macro conflicts with c++11 override
   ${IR_INCLUDES})
 separate_arguments(IR_FLAGS)
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/README
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/README b/src/kudu/codegen/README
index 68f689a..fb0a1e1 100644
--- a/src/kudu/codegen/README
+++ b/src/kudu/codegen/README
@@ -63,7 +63,7 @@ two items when retrieving a row projector.
 Code Generation Implementation Details
 ================================================================================
 
-Code generation works by creating what is essentially an assembly languange
+Code generation works by creating what is essentially an assembly language
 file for the desired object, then handing off that assembly to the LLVM
 MCJIT compiler. The LLVM backend handles generating target-dependent machine
 code. After code generation, the machine code, which is represented as a
@@ -244,4 +244,4 @@ Debugging
 ---------
 
 Debug info is available by printing the generated code. See the flags declared
-in code_generator.cc for further details.
\ No newline at end of file
+in code_generator.cc for further details.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/code_generator.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/code_generator.cc b/src/kudu/codegen/code_generator.cc
index 0a56cbe..923752a 100644
--- a/src/kudu/codegen/code_generator.cc
+++ b/src/kudu/codegen/code_generator.cc
@@ -26,13 +26,12 @@
 #include <llvm/ADT/StringRef.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/IR/Instructions.h>
-#include <llvm/IR/LLVMContext.h>
 #include <llvm/IR/Module.h>
+#include <llvm/MC/MCContext.h>
 #include <llvm/MC/MCDisassembler.h>
 #include <llvm/MC/MCInst.h>
 #include <llvm/MC/MCInstPrinter.h>
 #include <llvm/Support/raw_os_ostream.h>
-#include <llvm/Support/StringRefMemoryObject.h>
 #include <llvm/Support/TargetRegistry.h>
 #include <llvm/Support/TargetSelect.h>
 #include <llvm/Target/TargetInstrInfo.h>
@@ -63,25 +62,24 @@ namespace llvm {
 class MCAsmInfo;
 class MCInstrInfo;
 class MCRegisterInfo;
-class MCSubtargetInfo;
 } // namespace llvm
 
+using llvm::ArrayRef;
 using llvm::ExecutionEngine;
-using llvm::LLVMContext;
 using llvm::MCAsmInfo;
+using llvm::MCContext;
 using llvm::MCDisassembler;
 using llvm::MCInst;
 using llvm::MCInstPrinter;
 using llvm::MCInstrInfo;
-using llvm::MCSubtargetInfo;
-using llvm::Module;
 using llvm::MCRegisterInfo;
 using llvm::MCSubtargetInfo;
+using llvm::Module;
 using llvm::raw_os_ostream;
 using llvm::StringRef;
-using llvm::StringRefMemoryObject;
 using llvm::Target;
 using llvm::TargetMachine;
+using llvm::Triple;
 using std::string;
 
 namespace kudu {
@@ -102,11 +100,10 @@ Status CheckCodegenEnabled() {
 #endif
 }
 
-const char* ptr_from_i64(uint64_t addr) {
-  COMPILE_ASSERT(sizeof(uint64_t) <= sizeof(uintptr_t),
-                 cannot_represent_address_as_pointer);
+const uint8_t* ptr_from_i64(uint64_t addr) {
+  COMPILE_ASSERT(sizeof(uint64_t) <= sizeof(uintptr_t), cannot_represent_address_as_pointer);
   uintptr_t iptr = addr;
-  return reinterpret_cast<char*>(iptr);
+  return reinterpret_cast<const uint8_t*>(iptr);
 }
 
 template<class FuncPtr>
@@ -126,16 +123,19 @@ uint64_t i64_from_ptr(FuncPtr ptr) {
 //
 // Returns number of lines printed.
 template<class FuncPtr>
-int DumpAsm(FuncPtr fptr, const TargetMachine& tm,
-            std::ostream* out, int max_instr) {
+int DumpAsm(FuncPtr fptr, const TargetMachine& tm, std::ostream* out, int max_instr) {
   uint64_t base_addr = i64_from_ptr(fptr);
 
-  const MCInstrInfo& instr_info = *CHECK_NOTNULL(tm.getInstrInfo());
-  const MCRegisterInfo& register_info = *CHECK_NOTNULL(tm.getRegisterInfo());
-  const MCAsmInfo& asm_info = *CHECK_NOTNULL(tm.getMCAsmInfo());
-  const MCSubtargetInfo& subtarget_info = tm.getSubtarget<MCSubtargetInfo>();
+  const MCInstrInfo& instr_info = *CHECK_NOTNULL(tm.getMCInstrInfo());
+  const MCRegisterInfo* register_info = CHECK_NOTNULL(tm.getMCRegisterInfo());
+  const MCAsmInfo* asm_info = CHECK_NOTNULL(tm.getMCAsmInfo());
+  const MCSubtargetInfo subtarget_info = *CHECK_NOTNULL(tm.getMCSubtargetInfo());
+  const Triple& triple = tm.getTargetTriple();
+
+  MCContext context(asm_info, register_info, nullptr);
+
   gscoped_ptr<MCDisassembler> disas(
-    CHECK_NOTNULL(tm.getTarget().createMCDisassembler(subtarget_info)));
+    CHECK_NOTNULL(tm.getTarget().createMCDisassembler(subtarget_info, context)));
 
   // LLVM uses these completely undocumented magic syntax constants which had
   // to be found in lib/Target/$ARCH/MCTargetDesc/$(ARCH)TargetDesc.cpp.
@@ -146,15 +146,13 @@ int DumpAsm(FuncPtr fptr, const TargetMachine& tm,
   // will always be defined, so that's what we use.
   static const unsigned kSyntaxVariant = 0;
   gscoped_ptr<MCInstPrinter> printer(
-    CHECK_NOTNULL(tm.getTarget().createMCInstPrinter(kSyntaxVariant, asm_info,
-                                                     instr_info, register_info,
-                                                     subtarget_info)));
+    CHECK_NOTNULL(tm.getTarget().createMCInstPrinter(triple, kSyntaxVariant, *asm_info,
+                                                     instr_info, *register_info)));
 
   // Make a memory object referring to the bytes with addresses ranging from
   // base_addr to base_addr + (maximum number of bytes instructions take).
   const size_t kInstrSizeMax = 16; // max on x86 is 15 bytes
-  StringRefMemoryObject mem_obj(StringRef(ptr_from_i64(base_addr),
-                                          max_instr * kInstrSizeMax));
+  ArrayRef<uint8_t> mem_obj(ptr_from_i64(base_addr), max_instr * kInstrSizeMax);
   uint64_t addr = 0;
 
   for (int i = 0; i < max_instr; ++i) {
@@ -162,14 +160,14 @@ int DumpAsm(FuncPtr fptr, const TargetMachine& tm,
     MCInst inst;
     uint64_t size;
     MCDisassembler::DecodeStatus stat =
-    disas->getInstruction(inst, size, mem_obj, addr, llvm::nulls(), llvm::nulls());
+      disas->getInstruction(inst, size, mem_obj.slice(addr), addr, llvm::nulls(), llvm::nulls());
     if (stat != MCDisassembler::Success) {
       *out << "<ERROR at 0x" << std::hex << addr
            << " (absolute 0x" << (addr + base_addr) << ")"
            << ", skipping instruction>\n" << std::dec;
     } else {
       string annotations;
-      printer->printInst(&inst, os, annotations);
+      printer->printInst(&inst, os, annotations, subtarget_info);
       os << " " << annotations << "\n";
       // We need to check the opcode name for "RET" instead of comparing
       // the opcode to llvm::ReturnInst::getOpcode() because the native

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/codegen-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/codegen-test.cc b/src/kudu/codegen/codegen-test.cc
index 3ac8da9..f9ff013 100644
--- a/src/kudu/codegen/codegen-test.cc
+++ b/src/kudu/codegen/codegen-test.cc
@@ -18,26 +18,28 @@
 #include <string>
 #include <vector>
 
-#include <boost/assign/list_of.hpp>
 #include <boost/foreach.hpp>
 #include <glog/logging.h>
+#include <gmock/gmock.h>
 
 #include "kudu/codegen/code_generator.h"
 #include "kudu/codegen/row_projector.h"
-#include "kudu/common/schema.h"
 #include "kudu/common/row.h"
 #include "kudu/common/rowblock.h"
+#include "kudu/common/schema.h"
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/util/bitmap.h"
+#include "kudu/util/logging_test_util.h"
 #include "kudu/util/random.h"
 #include "kudu/util/random_util.h"
 #include "kudu/util/test_util.h"
 
-using boost::assign::list_of;
 using std::string;
 using std::vector;
 
+DECLARE_bool(codegen_dump_mc);
+
 namespace kudu {
 
 typedef RowProjector NoCodegenRP;
@@ -51,14 +53,13 @@ class CodegenTest : public KuduTest {
       // for its initial size and its eventual max size.
       projections_arena_(16, kIndirectPerProjection * 2) {
     // Create the base schema.
-    vector<ColumnSchema> cols = list_of
-      (ColumnSchema("key           ", UINT64       ))
-      (ColumnSchema("int32         ",  INT32, false))
-      (ColumnSchema("int32-null-val",  INT32,  true))
-      (ColumnSchema("int32-null    ",  INT32,  true))
-      (ColumnSchema("str32         ", STRING, false))
-      (ColumnSchema("str32-null-val", STRING,  true))
-      (ColumnSchema("str32-null    ", STRING,  true));
+    vector<ColumnSchema> cols = { ColumnSchema("key           ", UINT64, false),
+                                  ColumnSchema("int32         ",  INT32, false),
+                                  ColumnSchema("int32-null-val",  INT32,  true),
+                                  ColumnSchema("int32-null    ",  INT32,  true),
+                                  ColumnSchema("str32         ", STRING, false),
+                                  ColumnSchema("str32-null-val", STRING,  true),
+                                  ColumnSchema("str32-null    ", STRING,  true) };
     base_.Reset(cols, 1);
     base_ = SchemaBuilder(base_).Build(); // add IDs
 
@@ -262,8 +263,7 @@ TEST_F(CodegenTest, TestKey) {
 // Test int projection
 TEST_F(CodegenTest, TestInts) {
   Schema ints;
-  vector<size_t> part_cols = list_of<size_t>
-    (kI32Col)(kI32NullValCol)(kI32NullCol);
+  vector<size_t> part_cols = { kI32Col, kI32NullValCol, kI32NullCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &ints));
 
   TestProjection<true>(&ints);
@@ -273,8 +273,7 @@ TEST_F(CodegenTest, TestInts) {
 // Test string projection
 TEST_F(CodegenTest, TestStrings) {
   Schema strs;
-  vector<size_t> part_cols = list_of<size_t>
-    (kStrCol)(kStrNullValCol)(kStrNullCol);
+  vector<size_t> part_cols = { kStrCol, kStrNullValCol, kStrNullCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &strs));
 
   TestProjection<true>(&strs);
@@ -284,7 +283,7 @@ TEST_F(CodegenTest, TestStrings) {
 // Tests the projection of every non-nullable column
 TEST_F(CodegenTest, TestNonNullables) {
   Schema non_null;
-  vector<size_t> part_cols = list_of<size_t>(kKeyCol)(kI32Col)(kStrCol);
+  vector<size_t> part_cols = { kKeyCol, kI32Col, kStrCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &non_null));
 
   TestProjection<true>(&non_null);
@@ -294,8 +293,7 @@ TEST_F(CodegenTest, TestNonNullables) {
 // Tests the projection of every nullable column
 TEST_F(CodegenTest, TestNullables) {
   Schema nullables;
-  vector<size_t> part_cols = list_of<size_t>
-    (kI32NullValCol)(kI32NullCol)(kStrNullValCol)(kStrNullCol);
+  vector<size_t> part_cols = { kI32NullValCol, kI32NullCol, kStrNullValCol, kStrNullCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &nullables));
 
   TestProjection<true>(&nullables);
@@ -313,14 +311,13 @@ TEST_F(CodegenTest, TestDefaultsOnly) {
   Schema pure_defaults;
 
   // Default read projections
-  vector<size_t> part_cols = list_of<size_t>
-    (kI32RCol)(kI32RWCol)(kStrRCol)(kStrRWCol);
+  vector<size_t> part_cols = { kI32RCol, kI32RWCol, kStrRCol, kStrRWCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &pure_defaults));
 
   TestProjection<true>(&pure_defaults);
 
   // Default write projections
-  part_cols = list_of<size_t>(kI32RWCol)(kStrRWCol);
+  part_cols = { kI32RWCol, kStrRWCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &pure_defaults));
 
   TestProjection<false>(&pure_defaults);
@@ -332,11 +329,35 @@ TEST_F(CodegenTest, TestFullSchemaWithDefaults) {
 
   // Default write projection
   Schema full_write;
-  vector<size_t> part_cols = list_of<size_t>(kKeyCol)(kI32Col)(kI32NullValCol)
-    (kI32NullCol)(kStrCol)(kStrNullValCol)(kStrNullCol)(kI32RWCol)(kStrRWCol);
+  vector<size_t> part_cols = { kKeyCol,
+                               kI32Col,
+                               kI32NullValCol,
+                               kI32NullCol,
+                               kStrCol,
+                               kStrNullValCol,
+                               kStrNullCol,
+                               kI32RWCol,
+                               kStrRWCol };
   ASSERT_OK(CreatePartialSchema(part_cols, &full_write));
 
   TestProjection<false>(&full_write);
 }
 
+// Test the codegen_dump_mc flag works properly.
+TEST_F(CodegenTest, TestDumpMC) {
+  FLAGS_codegen_dump_mc = true;
+
+  StringVectorSink sink;
+  ScopedRegisterSink srs(&sink);
+
+  Schema ints;
+  vector<size_t> part_cols = { kI32Col, kI32NullValCol, kI32NullCol };
+  ASSERT_OK(CreatePartialSchema(part_cols, &ints));
+  TestProjection<true>(&ints);
+
+  const vector<string>& msgs = sink.logged_msgs();
+  ASSERT_EQ(msgs.size(), 1);
+  EXPECT_THAT(msgs[0], testing::ContainsRegex("retq"));
+}
+
 } // namespace kudu

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/compilation_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/compilation_manager.cc b/src/kudu/codegen/compilation_manager.cc
index 8ca91d4..0cc3eb2 100644
--- a/src/kudu/codegen/compilation_manager.cc
+++ b/src/kudu/codegen/compilation_manager.cc
@@ -42,7 +42,7 @@
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/threadpool.h"
 
-using std::tr1::shared_ptr;
+using std::shared_ptr;
 
 DEFINE_bool(codegen_time_compilation, false, "Whether to print time that each code "
             "generation request took.");

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/jit_wrapper.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/jit_wrapper.cc b/src/kudu/codegen/jit_wrapper.cc
index 98a563f..056baac 100644
--- a/src/kudu/codegen/jit_wrapper.cc
+++ b/src/kudu/codegen/jit_wrapper.cc
@@ -19,16 +19,16 @@
 
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/util/faststring.h"
 
 using llvm::ExecutionEngine;
+using std::unique_ptr;
 
 namespace kudu {
 namespace codegen {
 
-JITWrapper::JITWrapper(gscoped_ptr<JITCodeOwner> owner)
-  : owner_(owner.Pass()) {}
+JITWrapper::JITWrapper(unique_ptr<JITCodeOwner> owner)
+  : owner_(std::move(owner)) {}
 
 JITWrapper::~JITWrapper() {}
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/jit_wrapper.h
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/jit_wrapper.h b/src/kudu/codegen/jit_wrapper.h
index e598fee..1998167 100644
--- a/src/kudu/codegen/jit_wrapper.h
+++ b/src/kudu/codegen/jit_wrapper.h
@@ -18,8 +18,9 @@
 #ifndef KUDU_CODEGEN_JIT_WRAPPER_H
 #define KUDU_CODEGEN_JIT_WRAPPER_H
 
+#include <memory>
+
 #include "kudu/gutil/casts.h"
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/util/status.h"
@@ -61,13 +62,13 @@ class JITWrapper : public RefCountedThreadSafe<JITWrapper> {
   virtual Status EncodeOwnKey(faststring* out) = 0;
 
  protected:
-  explicit JITWrapper(gscoped_ptr<JITCodeOwner> owner);
+  explicit JITWrapper(std::unique_ptr<JITCodeOwner> owner);
   virtual ~JITWrapper();
 
  private:
   friend class RefCountedThreadSafe<JITWrapper>;
 
-  gscoped_ptr<JITCodeOwner> owner_;
+  std::unique_ptr<JITCodeOwner> owner_;
 
   DISALLOW_COPY_AND_ASSIGN(JITWrapper);
 };

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/module_builder.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/module_builder.cc b/src/kudu/codegen/module_builder.cc
index 7d5f528..538f6bd 100644
--- a/src/kudu/codegen/module_builder.cc
+++ b/src/kudu/codegen/module_builder.cc
@@ -14,6 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+
 #include "kudu/codegen/module_builder.h"
 
 #include <cstdlib>
@@ -23,22 +24,21 @@
 
 #include <boost/foreach.hpp>
 #include <glog/logging.h>
-#include <llvm/LinkAllPasses.h>
 #include <llvm/ADT/StringRef.h>
 #include <llvm/Analysis/Passes.h>
-#include <llvm/ExecutionEngine/MCJIT.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
-#include <llvm/IR/IRBuilder.h>
+#include <llvm/ExecutionEngine/MCJIT.h>
+#include <llvm/IR/DerivedTypes.h>
 #include <llvm/IR/Function.h>
+#include <llvm/IR/IRBuilder.h>
+#include <llvm/IR/LegacyPassManager.h>
 #include <llvm/IR/LLVMContext.h>
 #include <llvm/IR/Module.h>
-#include <llvm/PassManager.h>
 #include <llvm/IR/Type.h>
-#include <llvm/IR/DerivedTypes.h>
 #include <llvm/IRReader/IRReader.h>
 #include <llvm/Support/MemoryBuffer.h>
-#include <llvm/Support/SourceMgr.h>
 #include <llvm/Support/raw_os_ostream.h>
+#include <llvm/Support/SourceMgr.h>
 #include <llvm/Transforms/IPO.h>
 #include <llvm/Transforms/IPO/PassManagerBuilder.h>
 
@@ -61,12 +61,12 @@ using llvm::ConstantInt;
 using llvm::EngineBuilder;
 using llvm::ExecutionEngine;
 using llvm::Function;
-using llvm::FunctionPassManager;
 using llvm::FunctionType;
 using llvm::IntegerType;
+using llvm::legacy::FunctionPassManager;
+using llvm::legacy::PassManager;
 using llvm::LLVMContext;
 using llvm::Module;
-using llvm::PassManager;
 using llvm::PassManagerBuilder;
 using llvm::PointerType;
 using llvm::raw_os_ostream;
@@ -74,9 +74,11 @@ using llvm::SMDiagnostic;
 using llvm::TargetMachine;
 using llvm::Type;
 using llvm::Value;
+using std::move;
 using std::ostream;
 using std::string;
 using std::stringstream;
+using std::unique_ptr;
 using std::vector;
 using strings::Substitute;
 
@@ -144,8 +146,8 @@ Status ModuleBuilder::Init() {
 
   // Parse IR.
   SMDiagnostic err;
-  gscoped_ptr<llvm::MemoryBuffer> ir_buf(llvm::MemoryBuffer::getMemBuffer(ir_data));
-  module_.reset(llvm::ParseIR(ir_buf.release(), err, *context_));
+  unique_ptr<llvm::MemoryBuffer> ir_buf(llvm::MemoryBuffer::getMemBuffer(ir_data));
+  module_ = llvm::parseIR(ir_buf->getMemBufferRef(), err, *context_);
   if (!module_) {
     return Status::ConfigurationError("Could not parse IR", ToString(err));
   }
@@ -229,10 +231,6 @@ void DoOptimizations(ExecutionEngine* engine,
 
   PassManager module_passes;
 
-  // Specifying the data layout is necessary for some optimizations (e.g. removing many of
-  // the loads/stores produced by structs).
-  // Transfers ownership of the data layout to module_passes.
-  module_passes.add(new llvm::DataLayout(module->getDataLayout()));
   // Internalize all functions that aren't explicitly specified with external linkage.
   module_passes.add(llvm::createInternalizePass(external_functions));
   pass_builder.populateModulePassManager(module_passes);
@@ -246,7 +244,7 @@ void DoOptimizations(ExecutionEngine* engine,
 
 } // anonymous namespace
 
-Status ModuleBuilder::Compile(gscoped_ptr<ExecutionEngine>* out) {
+Status ModuleBuilder::Compile(unique_ptr<ExecutionEngine>* out) {
   CHECK_EQ(state_, kBuilding);
 
   // Attempt to generate the engine
@@ -256,20 +254,21 @@ Status ModuleBuilder::Compile(gscoped_ptr<ExecutionEngine>* out) {
 #else
   Level opt_level = llvm::CodeGenOpt::None;
 #endif
-  EngineBuilder ebuilder(module_.get());
+  Module* module = module_.get();
+  EngineBuilder ebuilder(move(module_));
   ebuilder.setErrorStr(&str);
-  ebuilder.setUseMCJIT(true);
   ebuilder.setOptLevel(opt_level);
   target_ = ebuilder.selectTarget();
-  gscoped_ptr<ExecutionEngine> local_engine(ebuilder.create(target_));
+  unique_ptr<ExecutionEngine> local_engine(ebuilder.create(target_));
   if (!local_engine) {
     return Status::ConfigurationError("Code generation for module failed. "
                                       "Could not start ExecutionEngine",
                                       str);
   }
+  module->setDataLayout(target_->createDataLayout());
 
 #if CODEGEN_MODULE_BUILDER_DO_OPTIMIZATIONS
-  DoOptimizations(local_engine.get(), module_.get(), GetFunctionNames());
+  DoOptimizations(local_engine.get(), module, GetFunctionNames());
 #endif
 
   // Compile the module
@@ -285,14 +284,15 @@ Status ModuleBuilder::Compile(gscoped_ptr<ExecutionEngine>* out) {
     }
   }
 
-  // For LLVM 3.4, generated code lasts exactly as long as the execution engine
+  // For LLVM 3.7, generated code lasts exactly as long as the execution engine
   // that created it does. Furthermore, if the module is removed from the
   // engine's ownership, neither the context nor the module have to stick
-  // around for the jitted code to run. NOTE: this may change in LLVM 3.5
-  CHECK(local_engine->removeModule(module_.get())); // releases ownership
+  // around for the jitted code to run.
+  CHECK(local_engine->removeModule(module)); // releases ownership
+  module_.reset(module);
 
   // Upon success write to the output parameter
-  *out = local_engine.Pass();
+  out->swap(local_engine);
   state_ = kCompiled;
   return Status::OK();
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/module_builder.h
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/module_builder.h b/src/kudu/codegen/module_builder.h
index 120113e..a5661b0 100644
--- a/src/kudu/codegen/module_builder.h
+++ b/src/kudu/codegen/module_builder.h
@@ -18,13 +18,13 @@
 #ifndef KUDU_CODEGEN_FUNCTION_BUILDER_H
 #define KUDU_CODEGEN_FUNCTION_BUILDER_H
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include <llvm/IR/IRBuilder.h>
 #include <llvm/IR/Module.h>
 
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/util/status.h"
 
 namespace llvm {
@@ -109,7 +109,7 @@ class ModuleBuilder {
   // After this method has been called, the jit-compiled code may be
   // called as long as 'out' remains alive. Once 'out' destructs,
   // the code will be freed.
-  Status Compile(gscoped_ptr<llvm::ExecutionEngine>* out);
+  Status Compile(std::unique_ptr<llvm::ExecutionEngine>* out);
 
   // Retrieves the TargetMachine that the engine builder guessed was
   // the native target. Requires compilation is complete.
@@ -138,8 +138,8 @@ class ModuleBuilder {
 
   MBState state_;
   std::vector<JITFuture> futures_;
-  gscoped_ptr<llvm::LLVMContext> context_;
-  gscoped_ptr<llvm::Module> module_;
+  std::unique_ptr<llvm::LLVMContext> context_;
+  std::unique_ptr<llvm::Module> module_;
   LLVMBuilder builder_;
   llvm::TargetMachine* target_; // not owned
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/row_projector.cc
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/row_projector.cc b/src/kudu/codegen/row_projector.cc
index 97fa807..3b18e16 100644
--- a/src/kudu/codegen/row_projector.cc
+++ b/src/kudu/codegen/row_projector.cc
@@ -23,7 +23,6 @@
 #include <utility>
 #include <vector>
 
-#include <boost/assign/list_of.hpp>
 #include <boost/foreach.hpp>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/IR/Argument.h>
@@ -47,7 +46,6 @@ namespace llvm {
 class LLVMContext;
 } // namespace llvm
 
-using boost::assign::list_of;
 using llvm::Argument;
 using llvm::BasicBlock;
 using llvm::ConstantInt;
@@ -60,8 +58,9 @@ using llvm::Module;
 using llvm::PointerType;
 using llvm::Type;
 using llvm::Value;
-using std::string;
 using std::ostream;
+using std::string;
+using std::unique_ptr;
 using std::vector;
 
 DECLARE_bool(codegen_dump_functions);
@@ -92,10 +91,9 @@ llvm::Function* MakeProjection(const string& name,
   const Schema& projection = *proj.projection();
 
   // Create the function after providing a declaration
-  vector<Type*> argtypes = list_of<Type*>
-    (Type::getInt8PtrTy(context))
-    (PointerType::getUnqual(mbuilder->GetType("class.kudu::RowBlockRow")))
-    (PointerType::getUnqual(mbuilder->GetType("class.kudu::Arena")));
+  vector<Type*> argtypes = { Type::getInt8PtrTy(context),
+                             PointerType::getUnqual(mbuilder->GetType("class.kudu::RowBlockRow")),
+                             PointerType::getUnqual(mbuilder->GetType("class.kudu::Arena")) };
   FunctionType* fty =
     FunctionType::get(Type::getInt1Ty(context), argtypes, false);
   Function* f = mbuilder->Create(fty, name);
@@ -191,8 +189,7 @@ llvm::Function* MakeProjection(const string& name,
     src_cell->setName(StrCat("src_cell_base_", base_idx));
     Value* col_idx = builder->getInt64(proj_idx);
     ConstantInt* is_binary = builder->getInt1(col.type_info()->physical_type() == BINARY);
-    vector<Value*> args = list_of<Value*>
-      (size)(src_cell)(rbrow)(col_idx)(is_binary)(arena);
+    vector<Value*> args = { size, src_cell, rbrow, col_idx, is_binary, arena };
 
     // Add additional arguments if nullable
     Function* to_call = copy_cell_not_null;
@@ -229,15 +226,14 @@ llvm::Function* MakeProjection(const string& name,
     // Handle default columns that are nullable
     if (col.is_nullable()) {
       Value* is_null = builder->getInt1(dfl == NULL);
-      vector<Value*> args = list_of<Value*>(rbrow)(col_idx)(is_null);
+      vector<Value*> args = { rbrow, col_idx, is_null };
       builder->CreateCall(row_block_set_null, args);
       // If dfl was NULL, we're done
       if (dfl == NULL) continue;
     }
 
     // Make the copy cell call and check the return value
-    vector<Value*> args = list_of
-      (size)(src_cell)(rbrow)(col_idx)(is_binary)(arena);
+    vector<Value*> args = { size, src_cell, rbrow, col_idx, is_binary, arena };
     Value* result = builder->CreateCall(copy_cell_not_null, args);
     result->setName(StrCat("result_dfl", dfl_idx));
     success = builder->CreateAnd(success, result);
@@ -261,8 +257,8 @@ RowProjectorFunctions::RowProjectorFunctions(const Schema& base_schema,
                                              const Schema& projection,
                                              ProjectionFunction read_f,
                                              ProjectionFunction write_f,
-                                             gscoped_ptr<JITCodeOwner> owner)
-  : JITWrapper(owner.Pass()),
+                                             unique_ptr<JITCodeOwner> owner)
+  : JITWrapper(std::move(owner)),
     base_schema_(base_schema),
     projection_(projection),
     read_f_(read_f),
@@ -296,14 +292,14 @@ Status RowProjectorFunctions::Create(const Schema& base_schema,
   builder.AddJITPromise(read, &read_f);
   builder.AddJITPromise(write, &write_f);
 
-  gscoped_ptr<JITCodeOwner> owner;
+  unique_ptr<JITCodeOwner> owner;
   RETURN_NOT_OK(builder.Compile(&owner));
 
   if (tm) {
     *tm = builder.GetTargetMachine();
   }
   out->reset(new RowProjectorFunctions(base_schema, projection, read_f,
-                                       write_f, owner.Pass()));
+                                       write_f, std::move(owner)));
   return Status::OK();
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/codegen/row_projector.h
----------------------------------------------------------------------
diff --git a/src/kudu/codegen/row_projector.h b/src/kudu/codegen/row_projector.h
index 7c8c5ea..724f61a 100644
--- a/src/kudu/codegen/row_projector.h
+++ b/src/kudu/codegen/row_projector.h
@@ -19,13 +19,13 @@
 #define KUDU_CODEGEN_ROW_PROJECTOR_H
 
 #include <iosfwd>
+#include <memory>
 #include <vector>
 
 #include "kudu/codegen/jit_wrapper.h"
 #include "kudu/common/row.h"
 #include "kudu/common/rowblock.h"
 #include "kudu/common/schema.h"
-#include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/util/slice.h"
 #include "kudu/util/status.h"
@@ -70,7 +70,7 @@ class RowProjectorFunctions : public JITWrapper {
  private:
   RowProjectorFunctions(const Schema& base_schema, const Schema& projection,
                         ProjectionFunction read_f, ProjectionFunction write_f,
-                        gscoped_ptr<JITCodeOwner> owner);
+                        std::unique_ptr<JITCodeOwner> owner);
 
   const Schema base_schema_, projection_;
   const ProjectionFunction read_f_, write_f_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/common/encoded_key-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/encoded_key-test.cc b/src/kudu/common/encoded_key-test.cc
index 5c2de72..3b31218 100644
--- a/src/kudu/common/encoded_key-test.cc
+++ b/src/kudu/common/encoded_key-test.cc
@@ -17,7 +17,6 @@
 
 #include "kudu/common/encoded_key.h"
 
-#include <boost/assign/list_of.hpp>
 #include <gtest/gtest.h>
 
 #include "kudu/gutil/strings/substitute.h"
@@ -50,8 +49,7 @@ class EncodedKeyTest : public ::testing::Test {
   }
 
   static Schema CreateSchema() {
-    return Schema(boost::assign::list_of
-                  (ColumnSchema("key", UINT32)), 1);
+    return Schema({ ColumnSchema("key", UINT32) }, 1);
   }
 
   EncodedKey* BuildEncodedKey(EncodedKeyBuilder& key_builder, int val) {
@@ -80,8 +78,7 @@ class EncodedKeyTest : public ::testing::Test {
   void ExpectDecodedKeyEq(const string& expected,
                           const Slice& encoded_form,
                           void* val) {
-    Schema schema(boost::assign::list_of
-                  (ColumnSchema("key", Type)), 1);
+    Schema schema({ ColumnSchema("key", Type) }, 1);
     EncodedKeyBuilder builder(&schema);
     builder.AddColumnKey(val);
     gscoped_ptr<EncodedKey> key(builder.BuildEncodedKey());
@@ -174,10 +171,9 @@ TEST_F(EncodedKeyTest, TestDecodeCompoundKeys) {
   gscoped_ptr<EncodedKey> key;
   {
     // Integer type compound key.
-    Schema schema(boost::assign::list_of
-                  (ColumnSchema("key0", UINT16))
-                  (ColumnSchema("key1", UINT32))
-                  (ColumnSchema("key2", UINT64)), 3);
+    Schema schema({ ColumnSchema("key0", UINT16),
+                    ColumnSchema("key1", UINT32),
+                    ColumnSchema("key2", UINT64) }, 3);
 
     EncodedKeyBuilder builder(&schema);
     uint16_t key0 = 12345;
@@ -195,9 +191,8 @@ TEST_F(EncodedKeyTest, TestDecodeCompoundKeys) {
 
   {
     // Mixed type compound key with STRING last.
-    Schema schema(boost::assign::list_of
-                  (ColumnSchema("key0", UINT16))
-                  (ColumnSchema("key1", STRING)), 2);
+    Schema schema({ ColumnSchema("key0", UINT16),
+                    ColumnSchema("key1", STRING) }, 2);
     EncodedKeyBuilder builder(&schema);
     uint16_t key0 = 12345;
     Slice key1("aKey");
@@ -210,10 +205,9 @@ TEST_F(EncodedKeyTest, TestDecodeCompoundKeys) {
 
   {
     // Mixed type compound key with STRING in the middle
-    Schema schema(boost::assign::list_of
-                  (ColumnSchema("key0", UINT16))
-                  (ColumnSchema("key1", STRING))
-                  (ColumnSchema("key2", UINT8)), 3);
+    Schema schema({ ColumnSchema("key0", UINT16),
+                    ColumnSchema("key1", STRING),
+                    ColumnSchema("key2", UINT8) }, 3);
     EncodedKeyBuilder builder(&schema);
     uint16_t key0 = 12345;
     Slice key1("aKey");
@@ -233,10 +227,9 @@ TEST_F(EncodedKeyTest, TestConstructFromEncodedString) {
 
   {
     // Integer type compound key.
-    Schema schema(boost::assign::list_of
-                  (ColumnSchema("key0", UINT16))
-                  (ColumnSchema("key1", UINT32))
-                  (ColumnSchema("key2", UINT64)), 3);
+    Schema schema({ ColumnSchema("key0", UINT16),
+                    ColumnSchema("key1", UINT32),
+                    ColumnSchema("key2", UINT64) }, 3);
 
     // Prefix with only one full column specified
     ASSERT_OK(EncodedKey::DecodeEncodedString(

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/common/generic_iterators-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/generic_iterators-test.cc b/src/kudu/common/generic_iterators-test.cc
index 532bddc..aaaf9e9 100644
--- a/src/kudu/common/generic_iterators-test.cc
+++ b/src/kudu/common/generic_iterators-test.cc
@@ -15,11 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <boost/assign/list_of.hpp>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
-#include <tr1/memory>
-#include <algorithm>
+#include <memory>
 
 #include "kudu/common/iterator.h"
 #include "kudu/common/generic_iterators.h"
@@ -38,11 +36,9 @@ DEFINE_int32(num_iters, 1, "Number of times to run merge");
 
 namespace kudu {
 
-using std::tr1::shared_ptr;
-
-static const Schema kIntSchema(
-  boost::assign::list_of(ColumnSchema("val", UINT32)), 1);
+using std::shared_ptr;
 
+static const Schema kIntSchema({ ColumnSchema("val", UINT32) }, 1);
 
 // Test iterator which just yields integer rows from a provided
 // vector.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9806863e/src/kudu/common/generic_iterators.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/generic_iterators.cc b/src/kudu/common/generic_iterators.cc
index 01937d0..5ffd0cf 100644
--- a/src/kudu/common/generic_iterators.cc
+++ b/src/kudu/common/generic_iterators.cc
@@ -18,6 +18,7 @@
 #include <boost/foreach.hpp>
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -28,8 +29,8 @@
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/memory/arena.h"
 
+using std::shared_ptr;
 using std::string;
-using std::tr1::shared_ptr;
 
 DEFINE_bool(materializing_iterator_do_pushdown, true,
             "Should MaterializingIterator do predicate pushdown");



Mime
View raw message