Repository: kudu
Updated Branches:
  refs/heads/master b0839fcdb -> 154b07de7


http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tserver/ts_tablet_manager.h
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/ts_tablet_manager.h 
b/src/kudu/tserver/ts_tablet_manager.h
index 5883771..d4c7c63 100644
--- a/src/kudu/tserver/ts_tablet_manager.h
+++ b/src/kudu/tserver/ts_tablet_manager.h
@@ -198,7 +198,7 @@ class TSTabletManager : public 
tserver::TabletReplicaLookupIf {
   };
 
   // Standard log prefix, given a tablet id.
-  static std::string LogPrefix(const string& tablet_id, FsManager *fs_manager);
+  static std::string LogPrefix(const std::string& tablet_id, FsManager 
*fs_manager);
   std::string LogPrefix(const std::string& tablet_id) const {
     return LogPrefix(tablet_id, fs_manager_);
   }
@@ -329,7 +329,7 @@ class TSTabletManager : public 
tserver::TabletReplicaLookupIf {
 class TransitionInProgressDeleter : public 
RefCountedThreadSafe<TransitionInProgressDeleter> {
  public:
   TransitionInProgressDeleter(TransitionInProgressMap* map, rw_spinlock* lock,
-                              string entry);
+                              std::string entry);
 
  private:
   friend class RefCountedThreadSafe<TransitionInProgressDeleter>;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tserver/tserver-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tserver-path-handlers.cc 
b/src/kudu/tserver/tserver-path-handlers.cc
index 10c425a..329d640 100644
--- a/src/kudu/tserver/tserver-path-handlers.cc
+++ b/src/kudu/tserver/tserver-path-handlers.cc
@@ -57,7 +57,9 @@ using kudu::tablet::TabletStatePB;
 using kudu::tablet::TabletStatusPB;
 using kudu::tablet::Transaction;
 using std::endl;
+using std::map;
 using std::shared_ptr;
+using std::string;
 using std::vector;
 using strings::Substitute;
 
@@ -195,7 +197,7 @@ void TabletServerPathHandlers::HandleTabletsPage(const 
Webserver::WebRequest& re
   // For assigning ids to table divs;
   int i = 0;
   auto generate_table = [this, &i](const vector<scoped_refptr<TabletReplica>>& 
replicas,
-                                   ostream* output) {
+                                   std::ostream* output) {
     i++;
 
     *output << "<h4>Summary</h4>\n";

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/insert_consumer.cc
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/insert_consumer.cc 
b/src/kudu/twitter-demo/insert_consumer.cc
index 361b8bd..1d5a0c6 100644
--- a/src/kudu/twitter-demo/insert_consumer.cc
+++ b/src/kudu/twitter-demo/insert_consumer.cc
@@ -36,13 +36,15 @@
 #include "kudu/twitter-demo/twitter-schema.h"
 #include "kudu/util/status.h"
 
-namespace kudu {
-namespace twitter_demo {
-
 using kudu::client::KuduInsert;
 using kudu::client::KuduClient;
 using kudu::client::KuduSession;
 using kudu::client::KuduTableCreator;
+using std::string;
+using std::vector;
+
+namespace kudu {
+namespace twitter_demo {
 
 InsertConsumer::InsertConsumer(client::sp::shared_ptr<KuduClient> client)
   : initted_(false),

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/parser-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/parser-test.cc 
b/src/kudu/twitter-demo/parser-test.cc
index 2870864..4c84054 100644
--- a/src/kudu/twitter-demo/parser-test.cc
+++ b/src/kudu/twitter-demo/parser-test.cc
@@ -26,6 +26,9 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/status.h"
 
+using std::string;
+using std::vector;
+
 namespace kudu {
 namespace twitter_demo {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/parser.cc
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/parser.cc b/src/kudu/twitter-demo/parser.cc
index 20a82f4..73b8a13 100644
--- a/src/kudu/twitter-demo/parser.cc
+++ b/src/kudu/twitter-demo/parser.cc
@@ -71,7 +71,7 @@ static Status ParseTweet(const JsonReader& r,
   return Status::OK();
 }
 
-Status TwitterEventParser::Parse(const string& json, TwitterEvent* event) {
+Status TwitterEventParser::Parse(const std::string& json, TwitterEvent* event) 
{
   JsonReader r(json);
   RETURN_NOT_OK(r.Init());
   const rapidjson::Value* delete_obj;
@@ -83,7 +83,7 @@ Status TwitterEventParser::Parse(const string& json, 
TwitterEvent* event) {
   return ParseDelete(r, delete_obj, event);
 }
 
-string TwitterEventParser::ReformatTime(const string& twitter_time) {
+std::string TwitterEventParser::ReformatTime(const std::string& twitter_time) {
   struct tm t;
   memset(&t, 0, sizeof(t));
   // Example: Wed Aug 14 06:31:07 +0000 2013
@@ -95,7 +95,7 @@ string TwitterEventParser::ReformatTime(const string& 
twitter_time) {
   char buf[100];
   size_t n = strftime(buf, arraysize(buf), "%Y%m%d%H%M%S", &t);
   CHECK_GT(n, 0);
-  return string(buf);
+  return buf;
 }
 
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/twitter-schema.h
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/twitter-schema.h 
b/src/kudu/twitter-demo/twitter-schema.h
index acfc851..d54d51c 100644
--- a/src/kudu/twitter-demo/twitter-schema.h
+++ b/src/kudu/twitter-demo/twitter-schema.h
@@ -24,13 +24,11 @@
 namespace kudu {
 namespace twitter_demo {
 
-using client::KuduColumnSchema;
-using client::KuduSchema;
-using client::KuduSchemaBuilder;
+inline client::KuduSchema CreateTwitterSchema() {
+  using client::KuduColumnSchema;
 
-inline KuduSchema CreateTwitterSchema() {
-  KuduSchema s;
-  KuduSchemaBuilder b;
+  client::KuduSchema s;
+  client::KuduSchemaBuilder b;
   
b.AddColumn("tweet_id")->Type(KuduColumnSchema::INT64)->NotNull()->PrimaryKey();
   b.AddColumn("text")->Type(KuduColumnSchema::STRING)->NotNull();
   b.AddColumn("source")->Type(KuduColumnSchema::STRING)->NotNull();

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/twitter_streamer.cc
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/twitter_streamer.cc 
b/src/kudu/twitter-demo/twitter_streamer.cc
index 99a1cb0..2d94515 100644
--- a/src/kudu/twitter-demo/twitter_streamer.cc
+++ b/src/kudu/twitter-demo/twitter_streamer.cc
@@ -32,6 +32,7 @@
 #include "kudu/util/status.h"
 
 using std::string;
+using std::thread;
 
 const char* kTwitterUrl = 
"https://stream.twitter.com/1.1/statuses/sample.json";;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/twitter-demo/twitter_streamer.h
----------------------------------------------------------------------
diff --git a/src/kudu/twitter-demo/twitter_streamer.h 
b/src/kudu/twitter-demo/twitter_streamer.h
index df292bd..e134e39 100644
--- a/src/kudu/twitter-demo/twitter_streamer.h
+++ b/src/kudu/twitter-demo/twitter_streamer.h
@@ -24,8 +24,6 @@
 #include "kudu/util/slice.h"
 #include "kudu/util/status.h"
 
-using std::thread;
-
 namespace kudu {
 namespace twitter_demo {
 
@@ -51,7 +49,7 @@ class TwitterStreamer {
   Status DoStreaming();
   size_t DataReceived(const Slice& data);
 
-  thread thread_;
+  std::thread thread_;
   std::mutex lock_;
   Status stream_status_;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/cache-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/cache-test.cc b/src/kudu/util/cache-test.cc
index 7319cf9..eed72ad 100644
--- a/src/kudu/util/cache-test.cc
+++ b/src/kudu/util/cache-test.cc
@@ -82,8 +82,8 @@ class CacheTest : public KuduTest,
   }
 
   void Insert(int key, int value, int charge = 1) {
-    string key_str = EncodeInt(key);
-    string val_str = EncodeInt(value);
+    std::string key_str = EncodeInt(key);
+    std::string val_str = EncodeInt(value);
     Cache::PendingHandle* handle = CHECK_NOTNULL(cache_->Allocate(key_str, 
val_str.size(), charge));
     memcpy(cache_->MutableValue(handle), val_str.data(), val_str.size());
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/cache.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/cache.cc b/src/kudu/util/cache.cc
index 4700fb3..d65d277 100644
--- a/src/kudu/util/cache.cc
+++ b/src/kudu/util/cache.cc
@@ -35,6 +35,10 @@ DEFINE_bool(cache_force_single_shard, false,
             "Override all cache implementations to use just one shard");
 TAG_FLAG(cache_force_single_shard, hidden);
 
+using std::shared_ptr;
+using std::string;
+using std::vector;
+
 namespace kudu {
 
 class MetricEntity;
@@ -44,9 +48,6 @@ Cache::~Cache() {
 
 namespace {
 
-using std::shared_ptr;
-using std::vector;
-
 typedef simple_spinlock MutexType;
 
 // LRU cache implementation

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/compression/compression_codec.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/compression/compression_codec.cc 
b/src/kudu/util/compression/compression_codec.cc
index 4995023..41dcae2 100644
--- a/src/kudu/util/compression/compression_codec.cc
+++ b/src/kudu/util/compression/compression_codec.cc
@@ -263,7 +263,7 @@ Status GetCompressionCodec(CompressionType compression,
 }
 
 CompressionType GetCompressionCodecType(const std::string& name) {
-  string uname;
+  std::string uname;
   ToUpperCase(name, &uname);
 
   if (uname == "SNAPPY")

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/crc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/crc-test.cc b/src/kudu/util/crc-test.cc
index 2c6db4b..3c46230 100644
--- a/src/kudu/util/crc-test.cc
+++ b/src/kudu/util/crc-test.cc
@@ -46,7 +46,7 @@ class CrcTest : public KuduTest {
 
 // Basic functionality test.
 TEST_F(CrcTest, TestCRC32C) {
-  const string test_data("abcdefgh");
+  const std::string test_data("abcdefgh");
   const uint64_t kExpectedCrc = 0xa9421b7; // Known value from crcutil usage 
test program.
 
   Crc* crc32c = GetCrc32cInstance();

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/debug-util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug-util.cc b/src/kudu/util/debug-util.cc
index a9e0dc6..1f2b035 100644
--- a/src/kudu/util/debug-util.cc
+++ b/src/kudu/util/debug-util.cc
@@ -35,6 +35,9 @@
 #include "kudu/util/monotime.h"
 #include "kudu/util/thread.h"
 
+using std::string;
+using std::vector;
+
 #if defined(__APPLE__)
 typedef sig_t sighandler_t;
 #endif
@@ -67,7 +70,7 @@ extern int GetStackTrace(void** result, int max_depth, int 
skip_count);
 bool Symbolize(void *pc, char *out, int out_size);
 
 namespace glog_internal_namespace_ {
-extern void DumpStackTraceToString(std::string *s);
+extern void DumpStackTraceToString(string *s);
 } // namespace glog_internal_namespace_
 } // namespace google
 
@@ -307,16 +310,16 @@ Status ListThreads(vector<pid_t> *tids) {
   return Status::OK();
 }
 
-std::string GetStackTrace() {
-  std::string s;
+string GetStackTrace() {
+  string s;
   google::glog_internal_namespace_::DumpStackTraceToString(&s);
   return s;
 }
 
-std::string GetStackTraceHex() {
+string GetStackTraceHex() {
   char buf[1024];
   HexStackTraceToString(buf, 1024);
-  return std::string(buf);
+  return buf;
 }
 
 void HexStackTraceToString(char* buf, size_t size) {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/debug/trace_event_impl.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug/trace_event_impl.cc 
b/src/kudu/util/debug/trace_event_impl.cc
index 5755e30..1d72a24 100644
--- a/src/kudu/util/debug/trace_event_impl.cc
+++ b/src/kudu/util/debug/trace_event_impl.cc
@@ -45,6 +45,7 @@ using base::SpinLockHolder;
 
 using strings::SubstituteAndAppend;
 using std::string;
+using std::vector;
 
 __thread TraceLog::PerThreadInfo* TraceLog::thread_local_info_ = nullptr;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/env-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env-test.cc b/src/kudu/util/env-test.cc
index f5bff38..4e3ed9f 100644
--- a/src/kudu/util/env-test.cc
+++ b/src/kudu/util/env-test.cc
@@ -60,6 +60,7 @@ DECLARE_string(env_inject_eio_globs);
 
 namespace kudu {
 
+using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::unique_ptr;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/env_posix.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_posix.cc b/src/kudu/util/env_posix.cc
index 588b4b3..f4a3388 100644
--- a/src/kudu/util/env_posix.cc
+++ b/src/kudu/util/env_posix.cc
@@ -69,6 +69,14 @@
 #include <sys/vfs.h>
 #endif  // defined(__APPLE__)
 
+using base::subtle::Atomic64;
+using base::subtle::Barrier_AtomicIncrement;
+using std::accumulate;
+using std::string;
+using std::unique_ptr;
+using std::vector;
+using strings::Substitute;
+
 // Copied from falloc.h. Useful for older kernels that lack support for
 // hole punching; fallocate(2) will return EOPNOTSUPP.
 #ifndef FALLOC_FL_KEEP_SIZE
@@ -178,14 +186,6 @@ DEFINE_string(env_inject_eio_globs, "*",
               "I/O will fail. By default, all files may cause a failure.");
 TAG_FLAG(env_inject_eio_globs, hidden);
 
-using base::subtle::Atomic64;
-using base::subtle::Barrier_AtomicIncrement;
-using std::accumulate;
-using std::string;
-using std::unique_ptr;
-using std::vector;
-using strings::Substitute;
-
 static __thread uint64_t thread_local_id;
 static Atomic64 cur_thread_local_id_;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/env_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_util-test.cc b/src/kudu/util/env_util-test.cc
index 78bb006..61a4e3e 100644
--- a/src/kudu/util/env_util-test.cc
+++ b/src/kudu/util/env_util-test.cc
@@ -39,6 +39,7 @@ DECLARE_int64(disk_reserved_bytes_free_for_testing);
 using std::string;
 using std::unique_ptr;
 using std::unordered_set;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/env_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_util.cc b/src/kudu/util/env_util.cc
index e9117a4..c6e0f50 100644
--- a/src/kudu/util/env_util.cc
+++ b/src/kudu/util/env_util.cc
@@ -67,6 +67,7 @@ 
TAG_FLAG(disk_reserved_override_prefix_2_bytes_free_for_testing, unsafe);
 TAG_FLAG(disk_reserved_override_prefix_1_bytes_free_for_testing, runtime);
 TAG_FLAG(disk_reserved_override_prefix_2_bytes_free_for_testing, runtime);
 
+using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::unique_ptr;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/failure_detector.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/failure_detector.cc 
b/src/kudu/util/failure_detector.cc
index baa29ed..8e2a6ae 100644
--- a/src/kudu/util/failure_detector.cc
+++ b/src/kudu/util/failure_detector.cc
@@ -29,11 +29,12 @@
 #include "kudu/util/status.h"
 #include "kudu/util/thread.h"
 
-namespace kudu {
-
+using std::string;
 using std::unordered_map;
 using strings::Substitute;
 
+namespace kudu {
+
 const int64_t RandomizedFailureMonitor::kMinWakeUpTimeMillis = 10;
 
 TimedFailureDetector::TimedFailureDetector(MonoDelta failure_period)

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/file_cache-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/file_cache-stress-test.cc 
b/src/kudu/util/file_cache-stress-test.cc
index 807d85e..0402bdc 100644
--- a/src/kudu/util/file_cache-stress-test.cc
+++ b/src/kudu/util/file_cache-stress-test.cc
@@ -71,6 +71,7 @@ DECLARE_bool(cache_force_single_shard);
 
 using std::deque;
 using std::shared_ptr;
+using std::string;
 using std::thread;
 using std::unique_ptr;
 using std::unordered_map;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/flags.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/flags.cc b/src/kudu/util/flags.cc
index 6b57f54..19d5b4f 100644
--- a/src/kudu/util/flags.cc
+++ b/src/kudu/util/flags.cc
@@ -50,6 +50,7 @@ using std::endl;
 using std::string;
 using std::stringstream;
 using std::unordered_set;
+using std::vector;
 
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/group_varint-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/group_varint-test.cc 
b/src/kudu/util/group_varint-test.cc
index c5ff410..e8f4bfa 100644
--- a/src/kudu/util/group_varint-test.cc
+++ b/src/kudu/util/group_varint-test.cc
@@ -41,7 +41,7 @@ static void DoTestRoundTripGVI32(
   // so append some extra padding data to ensure that it's not reading
   // uninitialized memory. The SSE implementation uses 128-bit reads
   // and the non-SSE one uses 32-bit reads.
-  buf.append(string(use_sse ? 16 : 4, 'x'));
+  buf.append(std::string(use_sse ? 16 : 4, 'x'));
 
   uint32_t ret[4];
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/interval_tree-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/interval_tree-test.cc 
b/src/kudu/util/interval_tree-test.cc
index 0386dab..b547595 100644
--- a/src/kudu/util/interval_tree-test.cc
+++ b/src/kudu/util/interval_tree-test.cc
@@ -32,8 +32,9 @@
 #include "kudu/util/interval_tree-inl.h"
 #include "kudu/util/test_util.h"
 
-using std::vector;
+using std::pair;
 using std::string;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/kernel_stack_watchdog.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/kernel_stack_watchdog.cc 
b/src/kudu/util/kernel_stack_watchdog.cc
index 829431f..a7097d8 100644
--- a/src/kudu/util/kernel_stack_watchdog.cc
+++ b/src/kudu/util/kernel_stack_watchdog.cc
@@ -37,6 +37,7 @@ DEFINE_int32(hung_task_check_interval_ms, 200,
 TAG_FLAG(hung_task_check_interval_ms, hidden);
 
 using std::lock_guard;
+using std::string;
 using strings::Substitute;
 
 namespace kudu {
@@ -66,13 +67,13 @@ KernelStackWatchdog::~KernelStackWatchdog() {
 void KernelStackWatchdog::SaveLogsForTests(bool save_logs) {
   lock_guard<simple_spinlock> l(log_lock_);
   if (save_logs) {
-    log_collector_.reset(new vector<string>());
+    log_collector_.reset(new std::vector<string>());
   } else {
     log_collector_.reset();
   }
 }
 
-vector<string> KernelStackWatchdog::LoggedMessagesForTests() const {
+std::vector<string> KernelStackWatchdog::LoggedMessagesForTests() const {
   lock_guard<simple_spinlock> l(log_lock_);
   CHECK(log_collector_) << "Must call SaveLogsForTests(true) first";
   return *log_collector_;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/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 787fcd1..00b04cd 100644
--- a/src/kudu/util/knapsack_solver-test.cc
+++ b/src/kudu/util/knapsack_solver-test.cc
@@ -24,6 +24,7 @@
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/test_util.h"
 
+using std::string;
 using std::vector;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/locks.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/locks.cc b/src/kudu/util/locks.cc
index bcb7201..2fe9661 100644
--- a/src/kudu/util/locks.cc
+++ b/src/kudu/util/locks.cc
@@ -21,6 +21,10 @@
 
 namespace kudu {
 
+using base::subtle::Acquire_CompareAndSwap;
+using base::subtle::NoBarrier_Load;
+using base::subtle::Release_Store;
+
 size_t percpu_rwlock::memory_footprint_excluding_this() const {
   // Because locks_ is a dynamic array of non-trivially-destructable types,
   // the returned pointer from new[] isn't guaranteed to point at the start of

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/locks.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/locks.h b/src/kudu/util/locks.h
index 36d6984..f4ab4a7 100644
--- a/src/kudu/util/locks.h
+++ b/src/kudu/util/locks.h
@@ -31,10 +31,6 @@
 
 namespace kudu {
 
-using base::subtle::Acquire_CompareAndSwap;
-using base::subtle::NoBarrier_Load;
-using base::subtle::Release_Store;
-
 // Wrapper around the Google SpinLock class to adapt it to the method names
 // expected by Boost.
 class simple_spinlock {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/maintenance_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/maintenance_manager-test.cc 
b/src/kudu/util/maintenance_manager-test.cc
index 07f7f22..9e9654e 100644
--- a/src/kudu/util/maintenance_manager-test.cc
+++ b/src/kudu/util/maintenance_manager-test.cc
@@ -32,6 +32,7 @@
 #include "kudu/util/thread.h"
 
 using std::shared_ptr;
+using std::string;
 using std::vector;
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/maintenance_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/maintenance_manager.cc 
b/src/kudu/util/maintenance_manager.cc
index 212c123..747efad 100644
--- a/src/kudu/util/maintenance_manager.cc
+++ b/src/kudu/util/maintenance_manager.cc
@@ -144,7 +144,7 @@ MaintenanceManager::~MaintenanceManager() {
   Shutdown();
 }
 
-Status MaintenanceManager::Init(string server_uuid) {
+Status MaintenanceManager::Init(std::string server_uuid) {
   server_uuid_ = std::move(server_uuid);
   RETURN_NOT_OK(Thread::Create("maintenance", "maintenance_scheduler",
       boost::bind(&MaintenanceManager::RunSchedulerThread, this),
@@ -385,7 +385,7 @@ MaintenanceOp* MaintenanceManager::FindBestOp() {
   double capacity_pct;
   if (memory_pressure_func_(&capacity_pct)) {
     if (!most_mem_anchored_op) {
-      string msg = StringPrintf("we have exceeded our soft memory limit "
+      std::string msg = StringPrintf("we have exceeded our soft memory limit "
           "(current capacity is %.2f%%).  However, there are no ops currently "
           "runnable which would free memory.", capacity_pct);
       LOG_WITH_PREFIX(INFO) << msg;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/memcmpable_varint-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/memcmpable_varint-test.cc 
b/src/kudu/util/memcmpable_varint-test.cc
index 3e5b5e0..8342937 100644
--- a/src/kudu/util/memcmpable_varint-test.cc
+++ b/src/kudu/util/memcmpable_varint-test.cc
@@ -34,6 +34,10 @@ ostream &operator <<(ostream &os, const pair<T1, T2> &pair) {
 }
 }
 
+using std::make_pair;
+using std::pair;
+using std::vector;
+
 namespace kudu {
 
 class TestMemcmpableVarint : public KuduTest {
@@ -94,12 +98,12 @@ TEST_F(TestMemcmpableVarint, TestCompositeKeys) {
     buf2.clear();
 
     pair<uint64_t, uint64_t> p1 =
-      make_pair(Rand64WithRandomBitLength(), Rand64WithRandomBitLength());
+        make_pair(Rand64WithRandomBitLength(), Rand64WithRandomBitLength());
     PutMemcmpableVarint64(&buf1, p1.first);
     PutMemcmpableVarint64(&buf1, p1.second);
 
     pair<uint64_t, uint64_t> p2 =
-      make_pair(Rand64WithRandomBitLength(), Rand64WithRandomBitLength());
+        make_pair(Rand64WithRandomBitLength(), Rand64WithRandomBitLength());
     PutMemcmpableVarint64(&buf2, p2.first);
     PutMemcmpableVarint64(&buf2, p2.second);
 
@@ -119,11 +123,13 @@ TEST_F(TestMemcmpableVarint, TestCompositeKeys) {
 // tests "interesting" values -- i.e values around the boundaries of where
 // the encoding changes its number of bytes.
 TEST_F(TestMemcmpableVarint, TestInterestingCompositeKeys) {
-  vector<uint64_t> interesting_values = { 0, 1, 240, // 1 byte
-                                          241, 2000, 2287, // 2 bytes
-                                          2288, 40000, 67823, // 3 bytes
-                                          67824, 1ULL << 23, (1ULL << 24) - 1, 
// 4 bytes
-                                          1ULL << 24, 1ULL << 30, (1ULL << 32) 
- 1 }; // 5 bytes
+  const vector<uint64_t> interesting_values = {
+    0, 1, 240, // 1 byte
+    241, 2000, 2287, // 2 bytes
+    2288, 40000, 67823, // 3 bytes
+    67824, 1ULL << 23, (1ULL << 24) - 1, // 4 bytes
+    1ULL << 24, 1ULL << 30, (1ULL << 32) - 1, // 5 bytes
+  };
 
   faststring buf1;
   faststring buf2;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/memory/arena-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/arena-test.cc 
b/src/kudu/util/memory/arena-test.cc
index fc3a64d..e476560 100644
--- a/src/kudu/util/memory/arena-test.cc
+++ b/src/kudu/util/memory/arena-test.cc
@@ -34,6 +34,7 @@ DEFINE_int32(alloc_size, 4, "number of bytes in each 
allocation");
 namespace kudu {
 
 using std::shared_ptr;
+using std::string;
 using std::thread;
 using std::vector;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/memory/arena.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/arena.h b/src/kudu/util/memory/arena.h
index 1c98564..1db5585 100644
--- a/src/kudu/util/memory/arena.h
+++ b/src/kudu/util/memory/arena.h
@@ -42,8 +42,6 @@
 #include "kudu/util/mutex.h"
 #include "kudu/util/slice.h"
 
-using std::allocator;
-
 namespace kudu {
 
 template<bool THREADSAFE> struct ArenaTraits;
@@ -184,7 +182,7 @@ class ArenaBase {
   }
 
   BufferAllocator* const buffer_allocator_;
-  vector<std::unique_ptr<Component> > arena_;
+  std::vector<std::unique_ptr<Component> > arena_;
 
   // The current component to allocate from.
   // Use AcquireLoadCurrent and ReleaseStoreCurrent to load/store.
@@ -223,7 +221,7 @@ template<class T, bool THREADSAFE> class ArenaAllocator {
 
   ~ArenaAllocator() { }
 
-  pointer allocate(size_type n, allocator<void>::const_pointer /*hint*/ = 0) {
+  pointer allocate(size_type n, std::allocator<void>::const_pointer /*hint*/ = 
0) {
     return reinterpret_cast<T*>(arena_->AllocateBytes(n * sizeof(T)));
   }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/memory/memory.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/memory.h b/src/kudu/util/memory/memory.h
index eabc142..ffe0a7c 100644
--- a/src/kudu/util/memory/memory.h
+++ b/src/kudu/util/memory/memory.h
@@ -47,15 +47,6 @@
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/singleton.h"
 
-using std::copy;
-using std::max;
-using std::min;
-using std::numeric_limits;
-using std::reverse;
-using std::sort;
-using std::swap;
-using std::vector;
-
 namespace kudu {
 
 class BufferAllocator;
@@ -184,7 +175,7 @@ class BufferAllocator {
   // For unbounded allocators (like raw HeapBufferAllocator) this is the 
highest
   // size_t value possible.
   // TODO(user): consider making pure virtual.
-  virtual size_t Available() const { return numeric_limits<size_t>::max(); }
+  virtual size_t Available() const { return 
std::numeric_limits<size_t>::max(); }
 
  protected:
   friend class Buffer;
@@ -259,7 +250,7 @@ class HeapBufferAllocator : public BufferAllocator {
   }
 
   virtual size_t Available() const OVERRIDE {
-    return numeric_limits<size_t>::max();
+    return std::numeric_limits<size_t>::max();
   }
 
  private:
@@ -335,7 +326,7 @@ class Mediator {
   virtual void Free(size_t amount) = 0;
 
   // TODO(user): consider making pure virtual.
-  virtual size_t Available() const { return numeric_limits<size_t>::max(); }
+  virtual size_t Available() const { return 
std::numeric_limits<size_t>::max(); }
 };
 
 // Optionally thread-safe skeletal implementation of a 'quota' abstraction,
@@ -449,7 +440,7 @@ class MediatingBufferAllocator : public BufferAllocator {
   virtual ~MediatingBufferAllocator() {}
 
   virtual size_t Available() const OVERRIDE {
-    return min(delegate_->Available(), mediator_->Available());
+    return std::min(delegate_->Available(), mediator_->Available());
   }
 
  private:
@@ -540,7 +531,7 @@ class SoftQuotaBypassingBufferAllocator : public 
BufferAllocator {
     const size_t usage = allocator_.GetUsage();
     size_t available = allocator_.Available();
     if (bypassed_amount_ > usage) {
-      available = max(bypassed_amount_ - usage, available);
+      available = std::max(bypassed_amount_ - usage, available);
     }
     return available;
   }
@@ -552,7 +543,7 @@ class SoftQuotaBypassingBufferAllocator : public 
BufferAllocator {
   // with increased minimal size is more likely to fail because of exceeding
   // hard quota, so we also fall back to the original minimal size.
   size_t AdjustMinimal(size_t requested, size_t minimal) const {
-    return min(requested, max(minimal, Available()));
+    return std::min(requested, std::max(minimal, Available()));
   }
   virtual Buffer* AllocateInternal(size_t requested,
                                    size_t minimal,
@@ -854,7 +845,7 @@ class OwningBufferAllocator : public BufferAllocator {
 
   // Not using PointerVector here because we want to guarantee certain order of
   // deleting elements (starting from the ones added last).
-  vector<OwnedType*> owned_;
+  std::vector<OwnedType*> owned_;
   BufferAllocator* delegate_;
 };
 
@@ -918,7 +909,7 @@ size_t Quota<thread_safe>::Allocate(const size_t requested,
   size_t allocation;
   if (usage_ > quota || minimal > quota - usage_) {
     // OOQ (Out of quota).
-    if (!enforced() && minimal <= numeric_limits<size_t>::max() - usage_) {
+    if (!enforced() && minimal <= std::numeric_limits<size_t>::max() - usage_) 
{
       // The quota is unenforced and the value of "minimal" won't cause an
       // overflow. Perform a minimal allocation.
       allocation = minimal;
@@ -934,7 +925,7 @@ size_t Quota<thread_safe>::Allocate(const size_t requested,
                  << ((allocation == 0) ? "Did not allocate any memory."
                  : "Allocated the minimal value requested.");
   } else {
-    allocation = min(requested, quota - usage_);
+    allocation = std::min(requested, quota - usage_);
   }
   usage_ += allocation;
   return allocation;
@@ -946,7 +937,7 @@ void Quota<thread_safe>::Free(size_t amount) {
   usage_ -= amount;
   // threads allocate/free memory concurrently via the same Quota object that 
is
   // not protected with a mutex (thread_safe == false).
-  if (usage_ > (numeric_limits<size_t>::max() - (1 << 28))) {
+  if (usage_ > (std::numeric_limits<size_t>::max() - (1 << 28))) {
     LOG(ERROR) << "Suspiciously big usage_ value: " << usage_
                << " (could be a result size_t wrapping around below 0, "
                << "for example as a result of race condition).";

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/mt-metrics-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/mt-metrics-test.cc b/src/kudu/util/mt-metrics-test.cc
index b4512fb..c333215 100644
--- a/src/kudu/util/mt-metrics-test.cc
+++ b/src/kudu/util/mt-metrics-test.cc
@@ -40,6 +40,7 @@ METRIC_DEFINE_entity(test_entity);
 namespace kudu {
 
 using debug::ScopedLeakCheckDisabler;
+using std::string;
 using std::vector;
 
 class MultiThreadedMetricsTest : public KuduTest {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/net/net_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/net_util-test.cc 
b/src/kudu/util/net/net_util-test.cc
index c77b054..3316316 100644
--- a/src/kudu/util/net/net_util-test.cc
+++ b/src/kudu/util/net/net_util-test.cc
@@ -29,6 +29,9 @@
 #include "kudu/util/status.h"
 #include "kudu/util/test_util.h"
 
+using std::string;
+using std::vector;
+
 namespace kudu {
 
 class NetUtilTest : public KuduTest {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/net/net_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/net_util.cc b/src/kudu/util/net/net_util.cc
index dbd1285..94dbb02 100644
--- a/src/kudu/util/net/net_util.cc
+++ b/src/kudu/util/net/net_util.cc
@@ -59,6 +59,7 @@ DEFINE_bool(fail_dns_resolution, false, "Whether to fail all 
dns resolution, for
 TAG_FLAG(fail_dns_resolution, hidden);
 
 using std::function;
+using std::string;
 using std::unordered_set;
 using std::unique_ptr;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/net/sockaddr.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/sockaddr.cc b/src/kudu/util/net/sockaddr.cc
index ed249c7..0379382 100644
--- a/src/kudu/util/net/sockaddr.cc
+++ b/src/kudu/util/net/sockaddr.cc
@@ -32,10 +32,11 @@
 #include "kudu/util/net/net_util.h"
 #include "kudu/util/stopwatch.h"
 
-namespace kudu {
-
+using std::string;
 using strings::Substitute;
 
+namespace kudu {
+
 ///
 /// Sockaddr
 ///

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/net/socket.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/socket.cc b/src/kudu/util/net/socket.cc
index ac28b64..748c773 100644
--- a/src/kudu/util/net/socket.cc
+++ b/src/kudu/util/net/socket.cc
@@ -276,7 +276,7 @@ Status Socket::GetSocketAddress(Sockaddr *cur_addr) const {
   DCHECK_GE(fd_, 0);
   if (::getsockname(fd_, (struct sockaddr *)&sin, &len) == -1) {
     int err = errno;
-    return Status::NetworkError(string("getsockname error: ") +
+    return Status::NetworkError(std::string("getsockname error: ") +
                                 ErrnoToString(err), Slice(), err);
   }
   *cur_addr = sin;
@@ -289,7 +289,7 @@ Status Socket::GetPeerAddress(Sockaddr *cur_addr) const {
   DCHECK_GE(fd_, 0);
   if (::getpeername(fd_, (struct sockaddr *)&sin, &len) == -1) {
     int err = errno;
-    return Status::NetworkError(string("getpeername error: ") +
+    return Status::NetworkError(std::string("getpeername error: ") +
                                 ErrnoToString(err), Slice(), err);
   }
   *cur_addr = sin;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/nvm_cache.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/nvm_cache.cc b/src/kudu/util/nvm_cache.cc
index 678aa87..7346f21 100644
--- a/src/kudu/util/nvm_cache.cc
+++ b/src/kudu/util/nvm_cache.cc
@@ -67,6 +67,7 @@ class MetricEntity;
 namespace {
 
 using std::shared_ptr;
+using std::string;
 using std::vector;
 
 typedef simple_spinlock MutexType;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/object_pool.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/object_pool.h b/src/kudu/util/object_pool.h
index 147363f..64d4b5c 100644
--- a/src/kudu/util/object_pool.h
+++ b/src/kudu/util/object_pool.h
@@ -27,8 +27,6 @@
 
 namespace kudu {
 
-using base::ManualConstructor;
-
 template<class T>
 class ReturnToPool;
 
@@ -72,14 +70,14 @@ class ObjectPool {
 
   // Construct a new object instance from the pool.
   T *Construct() {
-    ManualConstructor<T> *obj = GetObject();
+    base::ManualConstructor<T> *obj = GetObject();
     obj->Init();
     return obj->get();
   }
 
   template<class Arg1>
   T *Construct(Arg1 arg1) {
-    ManualConstructor<T> *obj = GetObject();
+    base::ManualConstructor<T> *obj = GetObject();
     obj->Init(arg1);
     return obj->get();
   }
@@ -89,7 +87,7 @@ class ObjectPool {
   void Destroy(T *t) {
     CHECK_NOTNULL(t);
     ListNode *node = static_cast<ListNode *>(
-      reinterpret_cast<ManualConstructor<T> *>(t));
+      reinterpret_cast<base::ManualConstructor<T> *>(t));
 
     node->Destroy();
 
@@ -108,7 +106,7 @@ class ObjectPool {
   }
 
  private:
-  class ListNode : ManualConstructor<T> {
+  class ListNode : base::ManualConstructor<T> {
     friend class ObjectPool<T>;
 
     ListNode *next_on_free_list;
@@ -118,7 +116,7 @@ class ObjectPool {
   };
 
 
-  ManualConstructor<T> *GetObject() {
+  base::ManualConstructor<T> *GetObject() {
     if (free_list_head_ != NULL) {
       ListNode *tmp = free_list_head_;
       free_list_head_ = tmp->next_on_free_list;
@@ -126,7 +124,7 @@ class ObjectPool {
       DCHECK(tmp->is_on_freelist);
       tmp->is_on_freelist = false;
 
-      return static_cast<ManualConstructor<T> *>(tmp);
+      return static_cast<base::ManualConstructor<T> *>(tmp);
     }
     auto new_node = new ListNode();
     new_node->next_on_free_list = NULL;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/oid_generator.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/oid_generator.cc b/src/kudu/util/oid_generator.cc
index 580463c..4e558bf 100644
--- a/src/kudu/util/oid_generator.cc
+++ b/src/kudu/util/oid_generator.cc
@@ -26,6 +26,7 @@
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/status.h"
 
+using std::string;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/os-util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/os-util.cc b/src/kudu/util/os-util.cc
index 9ea7e08..5fedc4d 100644
--- a/src/kudu/util/os-util.cc
+++ b/src/kudu/util/os-util.cc
@@ -40,6 +40,8 @@
 using std::ifstream;
 using std::istreambuf_iterator;
 using std::ostringstream;
+using std::string;
+using std::vector;
 using strings::Split;
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/pb_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/pb_util.h b/src/kudu/util/pb_util.h
index 8e8a65e..fc2a0a5 100644
--- a/src/kudu/util/pb_util.h
+++ b/src/kudu/util/pb_util.h
@@ -53,8 +53,6 @@ class RWFile;
 
 namespace pb_util {
 
-using google::protobuf::MessageLite;
-
 enum SyncMode {
   SYNC,
   NO_SYNC
@@ -75,28 +73,29 @@ enum class FileState {
 extern const int kPBContainerMinimumValidLength;
 
 // See MessageLite::AppendToString
-void AppendToString(const MessageLite &msg, faststring *output);
+void AppendToString(const google::protobuf::MessageLite &msg, faststring 
*output);
 
 // See MessageLite::AppendPartialToString
-void AppendPartialToString(const MessageLite &msg, faststring *output);
+void AppendPartialToString(const google::protobuf::MessageLite &msg, 
faststring *output);
 
 // See MessageLite::SerializeToString.
-void SerializeToString(const MessageLite &msg, faststring *output);
+void SerializeToString(const google::protobuf::MessageLite &msg, faststring 
*output);
 
 // See MessageLite::ParseFromZeroCopyStream
-Status ParseFromSequentialFile(MessageLite *msg, SequentialFile *rfile);
+Status ParseFromSequentialFile(google::protobuf::MessageLite *msg, 
SequentialFile *rfile);
 
 // Similar to MessageLite::ParseFromArray, with the difference that it returns
 // Status::Corruption() if the message could not be parsed.
-Status ParseFromArray(MessageLite* msg, const uint8_t* data, uint32_t length);
+Status ParseFromArray(google::protobuf::MessageLite* msg, const uint8_t* data, 
uint32_t length);
 
 // Load a protobuf from the given path.
-Status ReadPBFromPath(Env* env, const std::string& path, MessageLite* msg);
+Status ReadPBFromPath(Env* env, const std::string& path, 
google::protobuf::MessageLite* msg);
 
 // Serialize a protobuf to the given path.
 //
 // If SyncMode SYNC is provided, ensures the changes are made durable.
-Status WritePBToPath(Env* env, const std::string& path, const MessageLite& 
msg, SyncMode sync);
+Status WritePBToPath(Env* env, const std::string& path,
+                     const google::protobuf::MessageLite& msg, SyncMode sync);
 
 // Truncate any 'bytes' or 'string' fields of this message to max_len.
 // The text "<truncated>" is appended to any such truncated fields.

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/protoc-gen-insertions.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/protoc-gen-insertions.cc 
b/src/kudu/util/protoc-gen-insertions.cc
index d8769aa..cd87c87 100644
--- a/src/kudu/util/protoc-gen-insertions.cc
+++ b/src/kudu/util/protoc-gen-insertions.cc
@@ -30,6 +30,7 @@
 
 using google::protobuf::io::ZeroCopyOutputStream;
 using google::protobuf::io::Printer;
+using std::string;
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/random-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/random-test.cc b/src/kudu/util/random-test.cc
index b40e90c..0528b93 100644
--- a/src/kudu/util/random-test.cc
+++ b/src/kudu/util/random-test.cc
@@ -23,6 +23,10 @@
 #include "kudu/util/random.h"
 #include "kudu/util/test_util.h"
 
+using std::numeric_limits;
+using std::unordered_set;
+using std::vector;
+
 namespace kudu {
 
 class RandomTest : public KuduTest {
@@ -62,10 +66,10 @@ TEST_F(RandomTest, TestNormalDist) {
 // This test reflects that, and if  we change the RNG algo this test should 
also change.
 TEST_F(RandomTest, TestUseOfBits) {
   // For Next32():
-  uint32_t ones32 = std::numeric_limits<uint32_t>::max();
+  uint32_t ones32 = numeric_limits<uint32_t>::max();
   uint32_t zeroes32 = 0;
   // For Next64():
-  uint64_t ones64 = std::numeric_limits<uint64_t>::max();
+  uint64_t ones64 = numeric_limits<uint64_t>::max();
   uint64_t zeroes64 = 0;
 
   for (int i = 0; i < 10000000; i++) {
@@ -81,8 +85,8 @@ TEST_F(RandomTest, TestUseOfBits) {
   // At the end, we should have flipped 31 and 64 bits, respectively. One
   // detail of the current RNG impl is that Next32() always returns a number
   // with MSB set to 0.
-  uint32_t expected_bits_31 = std::numeric_limits<uint32_t>::max() >> 1;
-  uint64_t expected_bits_64 = std::numeric_limits<uint64_t>::max();
+  uint32_t expected_bits_31 = numeric_limits<uint32_t>::max() >> 1;
+  uint64_t expected_bits_64 = numeric_limits<uint64_t>::max();
 
   ASSERT_EQ(0, ones32);
   ASSERT_EQ(expected_bits_31, zeroes32);
@@ -110,7 +114,7 @@ TEST_F(RandomTest, TestReservoirSample) {
   // Run 1000 trials selecting 5 elements.
   vector<int> results;
   vector<int> counts(population.size());
-  std::unordered_set<int> avoid;
+  unordered_set<int> avoid;
   for (int trial = 0; trial < 1000; trial++) {
     rng_.ReservoirSample(population, 5, avoid, &results);
     for (int result : results) {
@@ -151,7 +155,7 @@ TEST_F(RandomTest, TestReservoirSamplePopulationTooSmall) {
   }
 
   vector<int> results;
-  std::unordered_set<int> avoid;
+  unordered_set<int> avoid;
   rng_.ReservoirSample(population, 20, avoid, &results);
   ASSERT_EQ(population.size(), results.size());
   ASSERT_EQ(population, results);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/spinlock_profiling-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/spinlock_profiling-test.cc 
b/src/kudu/util/spinlock_profiling-test.cc
index 4960c0f..54d8327 100644
--- a/src/kudu/util/spinlock_profiling-test.cc
+++ b/src/kudu/util/spinlock_profiling-test.cc
@@ -52,7 +52,7 @@ TEST_F(SpinLockProfilingTest, TestSpinlockProfiling) {
     ADOPT_TRACE(t.get());
     gutil::SubmitSpinLockProfileData(&lock, 4000000);
   }
-  string result = t->DumpToString();
+  std::string result = t->DumpToString();
   LOG(INFO) << "trace: " << result;
   ASSERT_STR_CONTAINS(result, "\"spinlock_wait_cycles\":4000000");
   // We can't assert more specifically because the CyclesPerSecond
@@ -71,7 +71,7 @@ TEST_F(SpinLockProfilingTest, TestStackCollection) {
   std::ostringstream str;
   int64_t dropped = 0;
   FlushSynchronizationProfile(&str, &dropped);
-  string s = str.str();
+  std::string s = str.str();
   ASSERT_STR_CONTAINS(s, "12345\t1 @ ");
   ASSERT_EQ(0, dropped);
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/stopwatch.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/stopwatch.h b/src/kudu/util/stopwatch.h
index ea9a1be..66d54d1 100644
--- a/src/kudu/util/stopwatch.h
+++ b/src/kudu/util/stopwatch.h
@@ -316,7 +316,7 @@ class LogTiming {
   const char *file_;
   const int line_;
   const google::LogSeverity severity_;
-  const string prefix_;
+  const std::string prefix_;
   const std::string description_;
   const int64_t max_expected_millis_;
   const bool should_print_;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/thread.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/thread.cc b/src/kudu/util/thread.cc
index 3e3de98..540483a 100644
--- a/src/kudu/util/thread.cc
+++ b/src/kudu/util/thread.cc
@@ -59,6 +59,8 @@ using std::endl;
 using std::map;
 using std::ostringstream;
 using std::shared_ptr;
+using std::string;
+using std::vector;
 using strings::Substitute;
 
 METRIC_DEFINE_gauge_uint64(server, threads_started,

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/threadpool.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/threadpool.cc b/src/kudu/util/threadpool.cc
index d133b4b..fb76b7d 100644
--- a/src/kudu/util/threadpool.cc
+++ b/src/kudu/util/threadpool.cc
@@ -166,7 +166,7 @@ void ThreadPoolToken::Shutdown() {
   // outside the lock, in case there are concurrent threads wanting to access
   // the ThreadPool. The task's destructors may acquire locks, etc, so this
   // also prevents lock inversions.
-  deque<ThreadPool::Task> to_release = std::move(entries_);
+  std::deque<ThreadPool::Task> to_release = std::move(entries_);
   pool_->total_queued_tasks_ -= to_release.size();
 
   switch (state()) {
@@ -319,7 +319,7 @@ ThreadPool::ThreadPool(const ThreadPoolBuilder& builder)
     total_queued_tasks_(0),
     tokenless_(NewToken(ExecutionMode::CONCURRENT)),
     metrics_(builder.metrics_) {
-  string prefix = !builder.trace_metric_prefix_.empty() ?
+  std::string prefix = !builder.trace_metric_prefix_.empty() ?
       builder.trace_metric_prefix_ : builder.name_;
 
   queue_time_trace_metric_name_ = TraceMetrics::InternName(
@@ -369,7 +369,7 @@ void ThreadPool::Shutdown() {
   // wanting to access the ThreadPool. The task's destructors may acquire
   // locks, etc, so this also prevents lock inversions.
   queue_.clear();
-  deque<deque<Task>> to_release;
+  std::deque<std::deque<Task>> to_release;
   for (auto* t : tokens_) {
     if (!t->entries_.empty()) {
       to_release.emplace_back(std::move(t->entries_));

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/util/trace.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/trace.cc b/src/kudu/util/trace.cc
index 698c915..2408736 100644
--- a/src/kudu/util/trace.cc
+++ b/src/kudu/util/trace.cc
@@ -32,10 +32,13 @@
 #include "kudu/util/memory/arena.h"
 #include "kudu/util/jsonwriter.h"
 
-namespace kudu {
-
+using std::pair;
+using std::string;
+using std::vector;
 using strings::internal::SubstituteArg;
 
+namespace kudu {
+
 __thread Trace* Trace::threadlocal_trace_;
 
 Trace::Trace()

Reply via email to