You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2017/08/10 00:05:09 UTC

[3/6] kudu git commit: remove 'using std::...' and other from header files

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strings/util.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/util.h b/src/kudu/gutil/strings/util.h
index 59db97d..fcd6b6d 100644
--- a/src/kudu/gutil/strings/util.h
+++ b/src/kudu/gutil/strings/util.h
@@ -35,12 +35,8 @@
 #endif
 
 #include <functional>
-using std::binary_function;
-using std::less;
 #include <string>
-using std::string;
 #include <vector>
-using std::vector;
 
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/port.h"
@@ -184,7 +180,7 @@ inline bool HasSuffixString(const StringPiece& str,
 // The backslash character (\) is an escape character for * and ?
 // We limit the patterns to having a max of 16 * or ? characters.
 // ? matches 0 or 1 character, while * matches 0 or more characters.
-bool MatchPattern(const StringPiece& string,
+bool MatchPattern(const StringPiece& str,
                   const StringPiece& pattern);
 
 // Returns where suffix begins in str, or NULL if str doesn't end with suffix.
@@ -248,7 +244,7 @@ inline ptrdiff_t strcount(const char* buf, size_t len, char c) {
   return strcount(buf, buf + len, c);
 }
 // Returns the number of times a character occurs in a string for a C++ string:
-inline ptrdiff_t strcount(const string& buf, char c) {
+inline ptrdiff_t strcount(const std::string& buf, char c) {
   return strcount(buf.c_str(), buf.size(), c);
 }
 
@@ -267,7 +263,7 @@ char* AdjustedLastPos(const char* str, char separator, int n);
 // Compares two char* strings for equality. (Works with NULL, which compares
 // equal only to another NULL). Useful in hash tables:
 //    hash_map<const char*, Value, hash<const char*>, streq> ht;
-struct streq : public binary_function<const char*, const char*, bool> {
+struct streq : public std::binary_function<const char*, const char*, bool> {
   bool operator()(const char* s1, const char* s2) const {
     return ((s1 == 0 && s2 == 0) ||
             (s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0));
@@ -277,7 +273,7 @@ struct streq : public binary_function<const char*, const char*, bool> {
 // Compares two char* strings. (Works with NULL, which compares greater than any
 // non-NULL). Useful in maps:
 //    map<const char*, Value, strlt> m;
-struct strlt : public binary_function<const char*, const char*, bool> {
+struct strlt : public std::binary_function<const char*, const char*, bool> {
   bool operator()(const char* s1, const char* s2) const {
     return (s1 != s2) && (s2 == 0 || (s1 != 0 && strcmp(s1, s2) < 0));
   }
@@ -298,7 +294,7 @@ inline bool IsAscii(const StringPiece& str) {
 //
 // Examples:
 // "a" -> "b", "aaa" -> "aab", "aa\xff" -> "ab", "\xff" -> "", "" -> ""
-string PrefixSuccessor(const StringPiece& prefix);
+std::string PrefixSuccessor(const StringPiece& prefix);
 
 // Returns the immediate lexicographically-following string. This is useful to
 // turn an inclusive range into something that can be used with Bigtable's
@@ -317,7 +313,7 @@ string PrefixSuccessor(const StringPiece& prefix);
 //
 // WARNING: Transforms "" -> "\0"; this doesn't account for Bigtable's special
 // treatment of "" as infinity.
-string ImmediateSuccessor(const StringPiece& s);
+std::string ImmediateSuccessor(const StringPiece& s);
 
 // Fills in *separator with a short string less than limit but greater than or
 // equal to start. If limit is greater than start, *separator is the common
@@ -327,7 +323,7 @@ string ImmediateSuccessor(const StringPiece& s);
 // FindShortestSeparator("abracadabra", "bacradabra", &sep) => sep == "b"
 // If limit is less than or equal to start, fills in *separator with start.
 void FindShortestSeparator(const StringPiece& start, const StringPiece& limit,
-                           string* separator);
+                           std::string* separator);
 
 // Copies at most n-1 bytes from src to dest, and returns dest. If n >=1, null
 // terminates dest; otherwise, returns dest unchanged. Unlike strncpy(), only
@@ -360,11 +356,11 @@ size_t strlcpy(char* dst, const char* src, size_t dst_size);
 // Replaces the first occurrence (if replace_all is false) or all occurrences
 // (if replace_all is true) of oldsub in s with newsub. In the second version,
 // *res must be distinct from all the other arguments.
-string StringReplace(const StringPiece& s, const StringPiece& oldsub,
+std::string StringReplace(const StringPiece& s, const StringPiece& oldsub,
                      const StringPiece& newsub, bool replace_all);
 void StringReplace(const StringPiece& s, const StringPiece& oldsub,
                    const StringPiece& newsub, bool replace_all,
-                   string* res);
+                   std::string* res);
 
 // Replaces all occurrences of substring in s with replacement. Returns the
 // number of instances replaced. s must be distinct from the other arguments.
@@ -372,12 +368,12 @@ void StringReplace(const StringPiece& s, const StringPiece& oldsub,
 // Less flexible, but faster, than RE::GlobalReplace().
 int GlobalReplaceSubstring(const StringPiece& substring,
                            const StringPiece& replacement,
-                           string* s);
+                           std::string* s);
 
 // Removes v[i] for every element i in indices. Does *not* preserve the order of
 // v. indices must be sorted in strict increasing order (no duplicates). Runs in
 // O(indices.size()).
-void RemoveStrings(vector<string>* v, const vector<int>& indices);
+void RemoveStrings(std::vector<std::string>* v, const std::vector<int>& indices);
 
 // Case-insensitive strstr(); use system strcasestr() instead.
 // WARNING: Removes const-ness of string argument!
@@ -424,7 +420,7 @@ const char* strstr_delimited(const char* haystack,
 char* gstrsep(char** stringp, const char* delim);
 
 // Appends StringPiece(data, len) to *s.
-void FastStringAppend(string* s, const char* data, int len);
+void FastStringAppend(std::string* s, const char* data, int len);
 
 // Returns a duplicate of the_string, with memory allocated by new[].
 char* strdup_with_new(const char* the_string);
@@ -478,12 +474,12 @@ bool FindTagValuePair(const char* in_str, char tag_value_separator,
 
 // Inserts separator after every interval characters in *s (but never appends to
 // the end of the original *s).
-void UniformInsertString(string* s, int interval, const char* separator);
+void UniformInsertString(std::string* s, int interval, const char* separator);
 
 // Inserts separator into s at each specified index. indices must be sorted in
 // ascending order.
 void InsertString(
-    string* s, const vector<uint32>& indices, char const* separator);
+    std::string* s, const std::vector<uint32>& indices, char const* separator);
 
 // Finds the nth occurrence of c in n; returns the index in s of that
 // occurrence, or string::npos if fewer than n occurrences.
@@ -509,6 +505,6 @@ int SafeSnprintf(char* str, size_t size, const char* format, ...)
 // Reads a line (terminated by delim) from file into *str. Reads delim from
 // file, but doesn't copy it into *str. Returns true if read a delim-terminated
 // line, or false on end-of-file or error.
-bool GetlineFromStdioFile(FILE* file, string* str, char delim);
+bool GetlineFromStdioFile(FILE* file, std::string* str, char delim);
 
 #endif  // STRINGS_UTIL_H_

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/strtoint.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strtoint.h b/src/kudu/gutil/strtoint.h
index b581385..96d4856 100644
--- a/src/kudu/gutil/strtoint.h
+++ b/src/kudu/gutil/strtoint.h
@@ -32,7 +32,6 @@
 
 #include <stdlib.h> // For strtol* functions.
 #include <string>
-using std::string;
 #include "kudu/gutil/integral_types.h"
 #include "kudu/gutil/macros.h"
 #include "kudu/gutil/port.h"
@@ -82,11 +81,11 @@ inline int64 atoi64(const char *nptr) {
 }
 
 // Convenience versions of the above that take a string argument.
-inline int32 atoi32(const string &s) {
+inline int32 atoi32(const std::string &s) {
   return atoi32(s.c_str());
 }
 
-inline int64 atoi64(const string &s) {
+inline int64 atoi64(const std::string &s) {
   return atoi64(s.c_str());
 }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/type_traits.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/type_traits.h b/src/kudu/gutil/type_traits.h
index a4e874f..2f72028 100644
--- a/src/kudu/gutil/type_traits.h
+++ b/src/kudu/gutil/type_traits.h
@@ -60,8 +60,6 @@
 #define BASE_TYPE_TRAITS_H_
 
 #include <utility>
-using std::make_pair;
-using std::pair;                  // For pair
 
 #include "kudu/gutil/template_util.h"     // For true_type and false_type
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/walltime.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/walltime.cc b/src/kudu/gutil/walltime.cc
index 89a805e..0224a53 100644
--- a/src/kudu/gutil/walltime.cc
+++ b/src/kudu/gutil/walltime.cc
@@ -57,7 +57,7 @@ static inline time_t gmktime(struct tm *tm) {
   return rt < 0 ? time_t(-1) : rt;
 }
 
-static void StringAppendStrftime(string* dst,
+static void StringAppendStrftime(std::string* dst,
                                  const char* format,
                                  const struct tm* tm) {
   char space[1024];
@@ -183,7 +183,7 @@ WallTime WallTime_Now() {
 #endif  // defined(__APPLE__)
 }
 
-void StringAppendStrftime(string* dst,
+void StringAppendStrftime(std::string* dst,
                           const char* format,
                           time_t when,
                           bool local) {
@@ -201,8 +201,8 @@ void StringAppendStrftime(string* dst,
   StringAppendStrftime(dst, format, &tm);
 }
 
-string LocalTimeAsString() {
-  string ret;
+std::string LocalTimeAsString() {
+  std::string ret;
   StringAppendStrftime(&ret, "%Y-%m-%d %H:%M:%S %Z", time(nullptr), true);
   return ret;
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/gutil/walltime.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/walltime.h b/src/kudu/gutil/walltime.h
index e6a1294..9f5a4d7 100644
--- a/src/kudu/gutil/walltime.h
+++ b/src/kudu/gutil/walltime.h
@@ -23,7 +23,6 @@
 
 #include <glog/logging.h>
 #include <string>
-using std::string;
 
 #if defined(__APPLE__)
 #include <mach/clock.h>

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/all_types-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/all_types-itest.cc b/src/kudu/integration-tests/all_types-itest.cc
index 6dd1830..2b973cf 100644
--- a/src/kudu/integration-tests/all_types-itest.cc
+++ b/src/kudu/integration-tests/all_types-itest.cc
@@ -28,6 +28,7 @@
 
 DEFINE_int32(num_rows_per_tablet, 100, "The number of rows to be inserted into each tablet");
 
+using std::string;
 using std::vector;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/alter_table-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/alter_table-test.cc b/src/kudu/integration-tests/alter_table-test.cc
index 5c63537..3b79744 100644
--- a/src/kudu/integration-tests/alter_table-test.cc
+++ b/src/kudu/integration-tests/alter_table-test.cc
@@ -80,6 +80,7 @@ using master::AlterTableResponsePB;
 using std::atomic;
 using std::map;
 using std::pair;
+using std::string;
 using std::unique_ptr;
 using std::vector;
 using tablet::TabletReplica;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/client-negotiation-failover-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-negotiation-failover-itest.cc b/src/kudu/integration-tests/client-negotiation-failover-itest.cc
index 8f5ff13..18c285a 100644
--- a/src/kudu/integration-tests/client-negotiation-failover-itest.cc
+++ b/src/kudu/integration-tests/client-negotiation-failover-itest.cc
@@ -47,8 +47,8 @@ using kudu::client::KuduTableCreator;
 using kudu::client::sp::shared_ptr;
 using std::string;
 using std::thread;
-using std::vector;
 using std::unique_ptr;
+using std::vector;
 using strings::Substitute;
 
 DECLARE_bool(rpc_reopen_outbound_connections);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/client-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-stress-test.cc b/src/kudu/integration-tests/client-stress-test.cc
index 2d7c0b7..7cc9ba4 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -36,6 +36,8 @@ METRIC_DECLARE_counter(leader_memory_pressure_rejections);
 METRIC_DECLARE_counter(follower_memory_pressure_rejections);
 
 using strings::Substitute;
+using std::set;
+using std::string;
 using std::vector;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/cluster_itest_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_itest_util.h b/src/kudu/integration-tests/cluster_itest_util.h
index 017da70..4cda935 100644
--- a/src/kudu/integration-tests/cluster_itest_util.h
+++ b/src/kudu/integration-tests/cluster_itest_util.h
@@ -218,9 +218,9 @@ Status FindTabletLeader(const TabletServerMap& tablet_servers,
 
 // Grabs list of followers using FindTabletLeader() above.
 Status FindTabletFollowers(const TabletServerMap& tablet_servers,
-                           const string& tablet_id,
+                           const std::string& tablet_id,
                            const MonoDelta& timeout,
-                           vector<TServerDetails*>* followers);
+                           std::vector<TServerDetails*>* followers);
 
 // Start an election on the specified tserver.
 // 'timeout' only refers to the RPC asking the peer to start an election. The

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/cluster_verifier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_verifier.cc b/src/kudu/integration-tests/cluster_verifier.cc
index f13a7f0..a5f0312 100644
--- a/src/kudu/integration-tests/cluster_verifier.cc
+++ b/src/kudu/integration-tests/cluster_verifier.cc
@@ -44,7 +44,7 @@ using tools::RemoteKsckMaster;
 
 ClusterVerifier::ClusterVerifier(ExternalMiniCluster* cluster)
     : cluster_(cluster),
-      checksum_options_(ChecksumOptions()),
+      checksum_options_(tools::ChecksumOptions()),
       operations_timeout_(MonoDelta::FromSeconds(60)) {
   checksum_options_.use_snapshot = false;
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/cluster_verifier.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/cluster_verifier.h b/src/kudu/integration-tests/cluster_verifier.h
index 50aa8b0..11d2656 100644
--- a/src/kudu/integration-tests/cluster_verifier.h
+++ b/src/kudu/integration-tests/cluster_verifier.h
@@ -26,8 +26,6 @@
 
 namespace kudu {
 
-using tools::ChecksumOptions;
-
 class ExternalMiniCluster;
 class MonoDelta;
 
@@ -90,7 +88,7 @@ class ClusterVerifier {
 
   ExternalMiniCluster* cluster_;
 
-  ChecksumOptions checksum_options_;
+  tools::ChecksumOptions checksum_options_;
 
   MonoDelta operations_timeout_;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/create-table-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/create-table-stress-test.cc b/src/kudu/integration-tests/create-table-stress-test.cc
index e9483d3..fbdd96c 100644
--- a/src/kudu/integration-tests/create-table-stress-test.cc
+++ b/src/kudu/integration-tests/create-table-stress-test.cc
@@ -55,8 +55,10 @@ DECLARE_bool(log_preallocate_segments);
 DEFINE_int32(num_test_tablets, 60, "Number of tablets for stress test");
 
 using std::shared_ptr;
+using std::string;
 using std::thread;
 using std::unique_ptr;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/disk_reservation-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/disk_reservation-itest.cc b/src/kudu/integration-tests/disk_reservation-itest.cc
index b5b589f..23a8ea2 100644
--- a/src/kudu/integration-tests/disk_reservation-itest.cc
+++ b/src/kudu/integration-tests/disk_reservation-itest.cc
@@ -24,6 +24,7 @@
 #include "kudu/util/metrics.h"
 
 using std::string;
+using std::vector;
 using strings::Substitute;
 
 METRIC_DECLARE_entity(server);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/exactly_once_writes-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/exactly_once_writes-itest.cc b/src/kudu/integration-tests/exactly_once_writes-itest.cc
index 03466f7..bd7f08d 100644
--- a/src/kudu/integration-tests/exactly_once_writes-itest.cc
+++ b/src/kudu/integration-tests/exactly_once_writes-itest.cc
@@ -21,6 +21,9 @@
 #include "kudu/util/logging.h"
 #include "kudu/util/pb_util.h"
 
+using std::string;
+using std::vector;
+
 namespace kudu {
 namespace tserver {
 
@@ -69,7 +72,7 @@ void ExactlyOnceSemanticsITest::WriteRowsAndCollectResponses(int thread_idx,
   Sockaddr address = cluster_.get()->tablet_server(
       thread_idx % FLAGS_num_replicas)->bound_rpc_addr();
 
-  RpcController controller;
+  rpc::RpcController controller;
 
   const Schema schema = GetSimpleTestSchema();
 
@@ -151,7 +154,7 @@ void ExactlyOnceSemanticsITest::DoTestWritesWithExactlyOnceSemantics(
 
   NO_FATALS(BuildAndStart(ts_flags, master_flags));
 
-  vector<TServerDetails*> tservers;
+  vector<itest::TServerDetails*> tservers;
   AppendValuesFromMap(tablet_servers_, &tservers);
 
   vector<scoped_refptr<kudu::Thread>> threads;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/external_mini_cluster.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.cc b/src/kudu/integration-tests/external_mini_cluster.cc
index fa7bed5..2acca30 100644
--- a/src/kudu/integration-tests/external_mini_cluster.cc
+++ b/src/kudu/integration-tests/external_mini_cluster.cc
@@ -67,6 +67,7 @@ using rapidjson::Value;
 using std::string;
 using std::unique_ptr;
 using std::unordered_set;
+using std::vector;
 using strings::Substitute;
 
 typedef ListTabletsResponsePB::StatusAndSchemaPB StatusAndSchemaPB;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/flex_partitioning-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/flex_partitioning-itest.cc b/src/kudu/integration-tests/flex_partitioning-itest.cc
index deb5831..a2888f4 100644
--- a/src/kudu/integration-tests/flex_partitioning-itest.cc
+++ b/src/kudu/integration-tests/flex_partitioning-itest.cc
@@ -56,6 +56,8 @@ using kudu::master::GetTableLocationsRequestPB;
 using kudu::master::GetTableLocationsResponsePB;
 using kudu::master::MasterErrorPB;
 using kudu::rpc::RpcController;
+using std::pair;
+using std::string;
 using std::unique_ptr;
 using std::unordered_map;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/internal_mini_cluster.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/internal_mini_cluster.cc b/src/kudu/integration-tests/internal_mini_cluster.cc
index ec8ff70..6497668 100644
--- a/src/kudu/integration-tests/internal_mini_cluster.cc
+++ b/src/kudu/integration-tests/internal_mini_cluster.cc
@@ -34,6 +34,8 @@
 #include "kudu/util/stopwatch.h"
 #include "kudu/util/test_util.h"
 
+using std::string;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {
@@ -242,7 +244,7 @@ Status InternalMiniCluster::WaitForTabletServerCount(int count) const {
 Status InternalMiniCluster::WaitForTabletServerCount(int count,
                                              MatchMode mode,
                                              vector<shared_ptr<TSDescriptor>>* descs) const {
-  unordered_set<int> masters_to_search;
+  std::unordered_set<int> masters_to_search;
   for (int i = 0; i < num_masters(); i++) {
     if (!mini_master(i)->master()->IsShutdown()) {
       masters_to_search.insert(i);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/linked_list-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test-util.h b/src/kudu/integration-tests/linked_list-test-util.h
index 97d149a..a73b65a 100644
--- a/src/kudu/integration-tests/linked_list-test-util.h
+++ b/src/kudu/integration-tests/linked_list-test-util.h
@@ -56,7 +56,7 @@ static const int64_t kSnapshotAtNow = -1;
 static const int64_t kNoParticularCountExpected = -1;
 
 // Vector of snapshot timestamp, count pairs.
-typedef vector<pair<uint64_t, int64_t> > SnapsAndCounts;
+typedef std::vector<std::pair<uint64_t, int64_t> > SnapsAndCounts;
 
 // Provides methods for writing data and reading it back in such a way that
 // facilitates checking for data integrity.
@@ -306,7 +306,7 @@ class PeriodicWebUIChecker {
                        const std::string& tablet_id, MonoDelta period)
       : period_(period), is_running_(true) {
     // List of master and ts web pages to fetch
-    vector<std::string> master_pages, ts_pages;
+    std::vector<std::string> master_pages, ts_pages;
 
     master_pages.emplace_back("/metrics");
     master_pages.emplace_back("/masters");
@@ -382,7 +382,7 @@ class PeriodicWebUIChecker {
   const MonoDelta period_;
   AtomicBool is_running_;
   scoped_refptr<Thread> checker_;
-  vector<std::string> urls_;
+  std::vector<std::string> urls_;
 };
 
 // Helper class to hold results from a linked list scan and perform the
@@ -433,7 +433,7 @@ std::vector<const KuduPartialRow*> LinkedListTester::GenerateSplitRows(
 }
 
 std::vector<int64_t> LinkedListTester::GenerateSplitInts() {
-  vector<int64_t> ret;
+  std::vector<int64_t> ret;
   ret.reserve(num_tablets_ - 1);
   int64_t increment = kint64max / num_tablets_;
   for (int64_t i = 1; i < num_tablets_; i++) {
@@ -565,7 +565,7 @@ void LinkedListTester::DumpInsertHistogram(bool print_flags) {
 // If it does, *errors will be incremented once per duplicate and the given message
 // will be logged.
 static void VerifyNoDuplicateEntries(const std::vector<int64_t>& ints, int* errors,
-                                     const string& message) {
+                                     const std::string& message) {
   for (int i = 1; i < ints.size(); i++) {
     if (ints[i] == ints[i - 1]) {
       LOG(ERROR) << message << ": " << ints[i];
@@ -581,7 +581,7 @@ Status LinkedListTester::VerifyLinkedListRemote(
   client::sp::shared_ptr<client::KuduTable> table;
   RETURN_NOT_OK(client_->OpenTable(table_name_, &table));
 
-  string snapshot_str;
+  std::string snapshot_str;
   if (snapshot_timestamp == kSnapshotAtNow) {
     snapshot_str = "NOW";
   } else {
@@ -696,8 +696,9 @@ Status LinkedListTester::WaitAndVerify(int seconds_to_run,
                                        const boost::function<Status(const std::string&)>& cb,
                                        WaitAndVerifyMode mode) {
 
-  std::list<pair<int64_t, int64_t> > samples_as_list(sampled_timestamps_and_counts_.begin(),
-                                                     sampled_timestamps_and_counts_.end());
+  std::list<std::pair<int64_t, int64_t>> samples_as_list(
+      sampled_timestamps_and_counts_.begin(),
+      sampled_timestamps_and_counts_.end());
 
   int64_t seen = 0;
   bool called = false;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/linked_list-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test.cc b/src/kudu/integration-tests/linked_list-test.cc
index 16e8d60..f9fbe9b 100644
--- a/src/kudu/integration-tests/linked_list-test.cc
+++ b/src/kudu/integration-tests/linked_list-test.cc
@@ -54,6 +54,8 @@ using kudu::client::KuduClientBuilder;
 using kudu::client::KuduSchema;
 using kudu::client::sp::shared_ptr;
 using kudu::itest::TServerDetails;
+using std::string;
+using std::vector;
 
 DEFINE_int32(seconds_to_run, 5, "Number of seconds for which to run the test");
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/master_migration-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/master_migration-itest.cc b/src/kudu/integration-tests/master_migration-itest.cc
index 338c4f7..095086a 100644
--- a/src/kudu/integration-tests/master_migration-itest.cc
+++ b/src/kudu/integration-tests/master_migration-itest.cc
@@ -42,6 +42,7 @@ using kudu::client::KuduTable;
 using kudu::client::KuduTableCreator;
 using kudu::client::sp::shared_ptr;
 using kudu::master::SysCatalogTable;
+using std::pair;
 using std::string;
 using std::vector;
 using std::unique_ptr;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/master_replication-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/master_replication-itest.cc b/src/kudu/integration-tests/master_replication-itest.cc
index 0f3e22e..affd267 100644
--- a/src/kudu/integration-tests/master_replication-itest.cc
+++ b/src/kudu/integration-tests/master_replication-itest.cc
@@ -33,6 +33,7 @@
 #include "kudu/util/pb_util.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/integration-tests/raft_consensus-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/raft_consensus-itest.cc b/src/kudu/integration-tests/raft_consensus-itest.cc
index 65684df..918ac0a 100644
--- a/src/kudu/integration-tests/raft_consensus-itest.cc
+++ b/src/kudu/integration-tests/raft_consensus-itest.cc
@@ -78,6 +78,7 @@ using consensus::ConsensusResponsePB;
 using consensus::ConsensusServiceProxy;
 using consensus::MajoritySize;
 using consensus::MakeOpId;
+using consensus::OpId;
 using consensus::RaftPeerPB;
 using consensus::ReplicateMsg;
 using itest::AddServer;
@@ -85,6 +86,8 @@ using itest::GetReplicaStatusAndCheckIfLeader;
 using itest::LeaderStepDown;
 using itest::RemoveServer;
 using itest::StartElection;
+using itest::TabletServerMap;
+using itest::TServerDetails;
 using itest::WaitUntilLeader;
 using itest::WriteSimpleTestRow;
 using master::TabletLocationsPB;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/security-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/security-itest.cc b/src/kudu/integration-tests/security-itest.cc
index bb0fd1f..13f3ac1 100644
--- a/src/kudu/integration-tests/security-itest.cc
+++ b/src/kudu/integration-tests/security-itest.cc
@@ -43,6 +43,7 @@ using kudu::client::KuduSession;
 using kudu::client::KuduTable;
 using kudu::client::KuduTableCreator;
 using kudu::rpc::Messenger;
+using std::string;
 using std::unique_ptr;
 using std::vector;
 using strings::Substitute;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/tablet_copy-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/tablet_copy-itest.cc b/src/kudu/integration-tests/tablet_copy-itest.cc
index 83c61d0..3a53687 100644
--- a/src/kudu/integration-tests/tablet_copy-itest.cc
+++ b/src/kudu/integration-tests/tablet_copy-itest.cc
@@ -470,7 +470,7 @@ TEST_F(TabletCopyITest, TestConcurrentTabletCopys) {
   vector<const KuduPartialRow*> splits;
   for (int i = 0; i < kNumTablets - 1; i++) {
     KuduPartialRow* row = client_schema.NewRow();
-    ASSERT_OK(row->SetInt32(0, numeric_limits<int32_t>::max() / kNumTablets * (i + 1)));
+    ASSERT_OK(row->SetInt32(0, std::numeric_limits<int32_t>::max() / kNumTablets * (i + 1)));
     splits.push_back(row);
   }
   gscoped_ptr<KuduTableCreator> table_creator(client_->NewTableCreator());

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/test_workload.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/test_workload.cc b/src/kudu/integration-tests/test_workload.cc
index 37959a3..0669daa 100644
--- a/src/kudu/integration-tests/test_workload.cc
+++ b/src/kudu/integration-tests/test_workload.cc
@@ -81,7 +81,7 @@ void TestWorkload::set_schema(const client::KuduSchema& schema) {
   // Do some sanity checks on the schema. They reflect how the rest of
   // TestWorkload is going to use the schema.
   CHECK_GT(schema.num_columns(), 0) << "Schema should have at least one column";
-  vector<int> key_indexes;
+  std::vector<int> key_indexes;
   schema.GetPrimaryKeyColumnIndexes(&key_indexes);
   CHECK_EQ(1, key_indexes.size()) << "Schema should have just one key column";
   CHECK_EQ(0, key_indexes[0]) << "Schema's key column should be index 0";
@@ -150,7 +150,7 @@ void TestWorkload::WriteThread() {
         tools::GenerateDataForRow(schema_, key, &rng_, row);
         if (payload_bytes_) {
           // Note: overriding payload_bytes_ requires the "simple" schema.
-          string test_payload(payload_bytes_.get(), '0');
+          std::string test_payload(payload_bytes_.get(), '0');
           CHECK_OK(row->SetStringCopy(2, test_payload));
         }
         CHECK_OK(session->Apply(insert.release()));
@@ -246,7 +246,7 @@ void TestWorkload::Setup() {
 
   if (!table_exists) {
     // Create split rows.
-    vector<const KuduPartialRow*> splits;
+    std::vector<const KuduPartialRow*> splits;
     for (int i = 1; i < num_tablets_; i++) {
       KuduPartialRow* r = schema_.NewRow();
       CHECK_OK(r->SetInt32("key", MathLimits<int32_t>::kMax / num_tablets_ * i));

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/ts_itest-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_itest-base.h b/src/kudu/integration-tests/ts_itest-base.h
index 52978c5..2a4e9f0 100644
--- a/src/kudu/integration-tests/ts_itest-base.h
+++ b/src/kudu/integration-tests/ts_itest-base.h
@@ -51,18 +51,6 @@ DEFINE_int32(num_replicas, 3, "Number of replicas per tablet server");
 namespace kudu {
 namespace tserver {
 
-using client::KuduSchemaFromSchema;
-using consensus::OpId;
-using consensus::RaftPeerPB;
-using itest::GetReplicaStatusAndCheckIfLeader;
-using itest::TabletReplicaMap;
-using itest::TabletServerMap;
-using itest::TServerDetails;
-using master::GetTableLocationsRequestPB;
-using master::GetTableLocationsResponsePB;
-using master::TabletLocationsPB;
-using rpc::RpcController;
-
 static const int kMaxRetries = 20;
 
 // A base for tablet server integration tests.
@@ -138,13 +126,13 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
   // Waits that all replicas for a all tablets of 'table_id' table are online
   // and creates the tablet_replicas_ map.
-  void WaitForReplicasAndUpdateLocations(const string& table_id = kTableId) {
+  void WaitForReplicasAndUpdateLocations(const std::string& table_id = kTableId) {
     bool replicas_missing = true;
     for (int num_retries = 0; replicas_missing && num_retries < kMaxRetries; num_retries++) {
-      std::unordered_multimap<std::string, TServerDetails*> tablet_replicas;
-      GetTableLocationsRequestPB req;
-      GetTableLocationsResponsePB resp;
-      RpcController controller;
+      std::unordered_multimap<std::string, itest::TServerDetails*> tablet_replicas;
+      master::GetTableLocationsRequestPB req;
+      master::GetTableLocationsResponsePB resp;
+      rpc::RpcController controller;
       req.mutable_table()->set_table_name(table_id);
       controller.set_timeout(MonoDelta::FromSeconds(1));
       CHECK_OK(cluster_->master_proxy()->GetTableLocations(req, &resp, &controller));
@@ -171,8 +159,10 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
       for (const master::TabletLocationsPB& location : resp.tablet_locations()) {
         for (const master::TabletLocationsPB_ReplicaPB& replica : location.replicas()) {
-          TServerDetails* server = FindOrDie(tablet_servers_, replica.ts_info().permanent_uuid());
-          tablet_replicas.insert(pair<std::string, TServerDetails*>(location.tablet_id(), server));
+          itest::TServerDetails* server =
+              FindOrDie(tablet_servers_, replica.ts_info().permanent_uuid());
+          tablet_replicas.insert(std::pair<std::string, itest::TServerDetails*>(
+              location.tablet_id(), server));
         }
 
         if (tablet_replicas.count(location.tablet_id()) < FLAGS_num_replicas) {
@@ -215,35 +205,35 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
   // Returns the last committed leader of the consensus configuration. Tries to get it from master
   // but then actually tries to the get the committed consensus configuration to make sure.
-  TServerDetails* GetLeaderReplicaOrNull(const std::string& tablet_id) {
+  itest::TServerDetails* GetLeaderReplicaOrNull(const std::string& tablet_id) {
     std::string leader_uuid;
     Status master_found_leader_result = GetTabletLeaderUUIDFromMaster(tablet_id, &leader_uuid);
 
     // See if the master is up to date. I.e. if it does report a leader and if the
     // replica it reports as leader is still alive and (at least thinks) its still
     // the leader.
-    TServerDetails* leader;
+    itest::TServerDetails* leader;
     if (master_found_leader_result.ok()) {
       leader = GetReplicaWithUuidOrNull(tablet_id, leader_uuid);
-      if (leader && GetReplicaStatusAndCheckIfLeader(leader, tablet_id,
-                                                     MonoDelta::FromMilliseconds(100)).ok()) {
+      if (leader && itest::GetReplicaStatusAndCheckIfLeader(
+            leader, tablet_id, MonoDelta::FromMilliseconds(100)).ok()) {
         return leader;
       }
     }
 
     // The replica we got from the master (if any) is either dead or not the leader.
     // Find the actual leader.
-    pair<TabletReplicaMap::iterator, TabletReplicaMap::iterator> range =
+    std::pair<itest::TabletReplicaMap::iterator, itest::TabletReplicaMap::iterator> range =
         tablet_replicas_.equal_range(tablet_id);
-    std::vector<TServerDetails*> replicas_copy;
+    std::vector<itest::TServerDetails*> replicas_copy;
     for (;range.first != range.second; ++range.first) {
       replicas_copy.push_back((*range.first).second);
     }
 
     std::random_shuffle(replicas_copy.begin(), replicas_copy.end());
-    for (TServerDetails* replica : replicas_copy) {
-      if (GetReplicaStatusAndCheckIfLeader(replica, tablet_id,
-                                           MonoDelta::FromMilliseconds(100)).ok()) {
+    for (itest::TServerDetails* replica : replicas_copy) {
+      if (itest::GetReplicaStatusAndCheckIfLeader(
+            replica, tablet_id, MonoDelta::FromMilliseconds(100)).ok()) {
         return replica;
       }
     }
@@ -253,22 +243,22 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   // For the last committed consensus configuration, return the last committed
   // leader of the consensus configuration and its followers.
   Status GetTabletLeaderAndFollowers(const std::string& tablet_id,
-                                     TServerDetails** leader,
-                                     vector<TServerDetails*>* followers) {
-    pair<TabletReplicaMap::iterator, TabletReplicaMap::iterator> range =
+                                     itest::TServerDetails** leader,
+                                     std::vector<itest::TServerDetails*>* followers) {
+    std::pair<itest::TabletReplicaMap::iterator, itest::TabletReplicaMap::iterator> range =
         tablet_replicas_.equal_range(tablet_id);
-    std::vector<TServerDetails*> replicas;
+    std::vector<itest::TServerDetails*> replicas;
     for (; range.first != range.second; ++range.first) {
       replicas.push_back((*range.first).second);
     }
 
-    TServerDetails* leader_replica = nullptr;
+    itest::TServerDetails* leader_replica = nullptr;
     auto it = replicas.begin();
     for (; it != replicas.end(); ++it) {
-      TServerDetails* replica = *it;
+      itest::TServerDetails* replica = *it;
       bool found_leader_replica = false;
       for (auto i = 0; i < kMaxRetries; ++i) {
-        if (GetReplicaStatusAndCheckIfLeader(
+        if (itest::GetReplicaStatusAndCheckIfLeader(
               replica, tablet_id, MonoDelta::FromMilliseconds(100)).ok()) {
           leader_replica = replica;
           found_leader_replica = true;
@@ -295,7 +285,7 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   }
 
   Status GetLeaderReplicaWithRetries(const std::string& tablet_id,
-                                     TServerDetails** leader,
+                                     itest::TServerDetails** leader,
                                      int max_attempts = 100) {
     int attempts = 0;
     while (attempts < max_attempts) {
@@ -310,17 +300,17 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   }
 
   Status GetTabletLeaderUUIDFromMaster(const std::string& tablet_id, std::string* leader_uuid) {
-    GetTableLocationsRequestPB req;
-    GetTableLocationsResponsePB resp;
-    RpcController controller;
+    master::GetTableLocationsRequestPB req;
+    master::GetTableLocationsResponsePB resp;
+    rpc::RpcController controller;
     controller.set_timeout(MonoDelta::FromMilliseconds(100));
     req.mutable_table()->set_table_name(kTableId);
 
     RETURN_NOT_OK(cluster_->master_proxy()->GetTableLocations(req, &resp, &controller));
-    for (const TabletLocationsPB& loc : resp.tablet_locations()) {
+    for (const master::TabletLocationsPB& loc : resp.tablet_locations()) {
       if (loc.tablet_id() == tablet_id) {
-        for (const TabletLocationsPB::ReplicaPB& replica : loc.replicas()) {
-          if (replica.role() == RaftPeerPB::LEADER) {
+        for (const master::TabletLocationsPB::ReplicaPB& replica : loc.replicas()) {
+          if (replica.role() == consensus::RaftPeerPB::LEADER) {
             *leader_uuid = replica.ts_info().permanent_uuid();
             return Status::OK();
           }
@@ -330,9 +320,9 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
     return Status::NotFound("Unable to find leader for tablet", tablet_id);
   }
 
-  TServerDetails* GetReplicaWithUuidOrNull(const std::string& tablet_id,
+  itest::TServerDetails* GetReplicaWithUuidOrNull(const std::string& tablet_id,
                                            const std::string& uuid) {
-    pair<TabletReplicaMap::iterator, TabletReplicaMap::iterator> range =
+    std::pair<itest::TabletReplicaMap::iterator, itest::TabletReplicaMap::iterator> range =
         tablet_replicas_.equal_range(tablet_id);
     for (;range.first != range.second; ++range.first) {
       if ((*range.first).second->instance_id.permanent_uuid() == uuid) {
@@ -344,7 +334,7 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
   // Gets the the locations of the consensus configuration and waits until all replicas
   // are available for all tablets.
-  void WaitForTSAndReplicas(const string& table_id = kTableId) {
+  void WaitForTSAndReplicas(const std::string& table_id = kTableId) {
     int num_retries = 0;
     // make sure the replicas are up and find the leader
     while (true) {
@@ -366,7 +356,7 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
   // Removes a set of servers from the replicas_ list.
   // Handy for controlling who to validate against after killing servers.
-  void PruneFromReplicas(const unordered_set<std::string>& uuids) {
+  void PruneFromReplicas(const std::unordered_set<std::string>& uuids) {
     auto iter = tablet_replicas_.begin();
     while (iter != tablet_replicas_.end()) {
       if (uuids.count((*iter).second->instance_id.permanent_uuid()) != 0) {
@@ -382,25 +372,25 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   }
 
   void GetOnlyLiveFollowerReplicas(const std::string& tablet_id,
-                                   std::vector<TServerDetails*>* followers) {
+                                   std::vector<itest::TServerDetails*>* followers) {
     followers->clear();
-    TServerDetails* leader;
+    itest::TServerDetails* leader;
     CHECK_OK(GetLeaderReplicaWithRetries(tablet_id, &leader));
 
-    std::vector<TServerDetails*> replicas;
-    pair<TabletReplicaMap::iterator, TabletReplicaMap::iterator> range =
+    std::vector<itest::TServerDetails*> replicas;
+    std::pair<itest::TabletReplicaMap::iterator, itest::TabletReplicaMap::iterator> range =
         tablet_replicas_.equal_range(tablet_id);
     for (;range.first != range.second; ++range.first) {
       replicas.push_back((*range.first).second);
     }
 
-    for (TServerDetails* replica : replicas) {
+    for (itest::TServerDetails* replica : replicas) {
       if (leader != NULL &&
           replica->instance_id.permanent_uuid() == leader->instance_id.permanent_uuid()) {
         continue;
       }
-      Status s = GetReplicaStatusAndCheckIfLeader(replica, tablet_id,
-                                                  MonoDelta::FromMilliseconds(100));
+      Status s = itest::GetReplicaStatusAndCheckIfLeader(
+          replica, tablet_id, MonoDelta::FromMilliseconds(100));
       if (s.IsIllegalState()) {
         followers->push_back(replica);
       }
@@ -409,8 +399,8 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
 
   // Return the index within 'replicas' for the replica which is farthest ahead.
   int64_t GetFurthestAheadReplicaIdx(const std::string& tablet_id,
-                                     const std::vector<TServerDetails*>& replicas) {
-    std::vector<OpId> op_ids;
+                                     const std::vector<itest::TServerDetails*>& replicas) {
+    std::vector<consensus::OpId> op_ids;
     CHECK_OK(GetLastOpIdForEachReplica(tablet_id, replicas, consensus::RECEIVED_OPID,
                                        MonoDelta::FromSeconds(10), &op_ids));
 
@@ -460,8 +450,8 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
     int live_count = 0;
     std::string error = strings::Substitute("Fewer than $0 TabletServers were alive. Dead TSs: ",
                                             num_tablet_servers);
-    RpcController controller;
-    for (const TabletServerMap::value_type& entry : tablet_servers_) {
+    rpc::RpcController controller;
+    for (const itest::TabletServerMap::value_type& entry : tablet_servers_) {
       controller.Reset();
       controller.set_timeout(MonoDelta::FromSeconds(10));
       PingRequestPB req;
@@ -491,10 +481,10 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   }
 
   // Create a table with a single tablet, with 'num_replicas'.
-  void CreateTable(const string& table_id = kTableId) {
+  void CreateTable(const std::string& table_id = kTableId) {
     // The tests here make extensive use of server schemas, but we need
     // a client schema to create the table.
-    client::KuduSchema client_schema(KuduSchemaFromSchema(schema_));
+    client::KuduSchema client_schema(client::KuduSchemaFromSchema(schema_));
     gscoped_ptr<client::KuduTableCreator> table_creator(client_->NewTableCreator());
     ASSERT_OK(table_creator->table_name(table_id)
              .schema(&client_schema)
@@ -554,9 +544,9 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
   gscoped_ptr<itest::ExternalMiniClusterFsInspector> inspect_;
 
   // Maps server uuid to TServerDetails
-  TabletServerMap tablet_servers_;
+  itest::TabletServerMap tablet_servers_;
   // Maps tablet to all replicas.
-  TabletReplicaMap tablet_replicas_;
+  itest::TabletReplicaMap tablet_replicas_;
 
   client::sp::shared_ptr<client::KuduClient> client_;
   client::sp::shared_ptr<client::KuduTable> table_;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/ts_recovery-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_recovery-itest.cc b/src/kudu/integration-tests/ts_recovery-itest.cc
index e674884..3a44820 100644
--- a/src/kudu/integration-tests/ts_recovery-itest.cc
+++ b/src/kudu/integration-tests/ts_recovery-itest.cc
@@ -42,6 +42,7 @@
 
 using std::string;
 using std::unique_ptr;
+using std::vector;
 
 namespace kudu {
 
@@ -390,7 +391,7 @@ TEST_P(TsRecoveryITestDeathTest, TestRecoverFromOpIdOverflow) {
     vector<string> wal_children;
     ASSERT_OK(fs_manager->env()->GetChildren(wal_dir, &wal_children));
     // Skip '.', '..', and index files.
-    unordered_set<string> wal_segments;
+    std::unordered_set<string> wal_segments;
     for (const auto& filename : wal_children) {
       if (HasPrefixString(filename, FsManager::kWalFileNamePrefix)) {
         wal_segments.insert(filename);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/ts_tablet_manager-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_tablet_manager-itest.cc b/src/kudu/integration-tests/ts_tablet_manager-itest.cc
index ab16b03..fcda144 100644
--- a/src/kudu/integration-tests/ts_tablet_manager-itest.cc
+++ b/src/kudu/integration-tests/ts_tablet_manager-itest.cc
@@ -66,6 +66,8 @@ using master::TabletReportPB;
 using rpc::Messenger;
 using rpc::MessengerBuilder;
 using std::shared_ptr;
+using std::string;
+using std::vector;
 using strings::Substitute;
 using tablet::TabletReplica;
 using tserver::MiniTabletServer;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/integration-tests/update_scan_delta_compact-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/update_scan_delta_compact-test.cc b/src/kudu/integration-tests/update_scan_delta_compact-test.cc
index 783ee56..ff25e84 100644
--- a/src/kudu/integration-tests/update_scan_delta_compact-test.cc
+++ b/src/kudu/integration-tests/update_scan_delta_compact-test.cc
@@ -42,6 +42,9 @@ DEFINE_int32(row_count, 2000, "How many rows will be used in this test for the b
 DEFINE_int32(seconds_to_run, 4,
              "How long this test runs for, after inserting the base data, in seconds");
 
+using std::string;
+using std::vector;
+
 namespace kudu {
 namespace tablet {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/catalog_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager-test.cc b/src/kudu/master/catalog_manager-test.cc
index 0c7fb8a..062301e 100644
--- a/src/kudu/master/catalog_manager-test.cc
+++ b/src/kudu/master/catalog_manager-test.cc
@@ -21,11 +21,13 @@
 #include "kudu/master/ts_descriptor.h"
 #include "kudu/util/test_util.h"
 
+using std::string;
+using std::vector;
+using strings::Substitute;
+
 namespace kudu {
 namespace master {
 
-using strings::Substitute;
-
 // Test of the tablet assignment algo for splits done at table creation time.
 // This tests that when we define a split, the tablet lands on the expected
 // side of the split, i.e. it's a closed interval on the start key and an open

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/catalog_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.cc b/src/kudu/master/catalog_manager.cc
index 5b7c0d5..e8612b5 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -209,6 +209,7 @@ DEFINE_int32(catalog_manager_inject_latency_prior_tsk_write_ms, 0,
 TAG_FLAG(catalog_manager_inject_latency_prior_tsk_write_ms, hidden);
 TAG_FLAG(catalog_manager_inject_latency_prior_tsk_write_ms, unsafe);
 
+using std::map;
 using std::pair;
 using std::set;
 using std::shared_ptr;
@@ -2621,7 +2622,7 @@ Status CatalogManager::HandleRaftConfigChanged(
   *tablet_lock->mutable_data()->pb.mutable_consensus_state() = cstate;
 
   if (FLAGS_master_tombstone_evicted_tablet_replicas) {
-    unordered_set<string> current_member_uuids;
+    std::unordered_set<string> current_member_uuids;
     for (const consensus::RaftPeerPB& peer : cstate.committed_config().peers()) {
       InsertOrDie(&current_member_uuids, peer.permanent_uuid());
     }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/catalog_manager.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.h b/src/kudu/master/catalog_manager.h
index 72401b0..e5986ba 100644
--- a/src/kudu/master/catalog_manager.h
+++ b/src/kudu/master/catalog_manager.h
@@ -210,8 +210,8 @@ class TableInfo : public RefCountedThreadSafe<TableInfo> {
   void AddTablets(const std::vector<TabletInfo*>& tablets);
 
   // Atomically add and remove multiple tablets from this table.
-  void AddRemoveTablets(const vector<scoped_refptr<TabletInfo>>& tablets_to_add,
-                        const vector<scoped_refptr<TabletInfo>>& tablets_to_drop);
+  void AddRemoveTablets(const std::vector<scoped_refptr<TabletInfo>>& tablets_to_add,
+                        const std::vector<scoped_refptr<TabletInfo>>& tablets_to_drop);
 
   // Return true if tablet with 'partition_key_start' has been
   // removed from 'tablet_map_' below.

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/master-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master-path-handlers.cc b/src/kudu/master/master-path-handlers.cc
index 80668b1..26c7a5e 100644
--- a/src/kudu/master/master-path-handlers.cc
+++ b/src/kudu/master/master-path-handlers.cc
@@ -111,7 +111,7 @@ void MasterPathHandlers::HandleTabletServers(const Webserver::WebRequest& req,
   *output << "<h3>" << "Registrations" << "</h3>\n";
   auto generate_table = [](const vector<string>& rows,
                            const string& header,
-                           ostream* output) {
+                           std::ostream* output) {
     if (!rows.empty()) {
       *output << "<h4>" << header << "</h4>\n";
       *output << "<table class='table table-striped'>\n";

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/master-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/master-test-util.h b/src/kudu/master/master-test-util.h
index 7e7f021..efb9dbf 100644
--- a/src/kudu/master/master-test-util.h
+++ b/src/kudu/master/master-test-util.h
@@ -35,7 +35,7 @@ namespace kudu {
 namespace master {
 
 Status WaitForRunningTabletCount(MiniMaster* mini_master,
-                                 const string& table_name,
+                                 const std::string& table_name,
                                  int expected_count,
                                  GetTableLocationsResponsePB* resp) {
   int wait_time = 1000;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/master-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master-test.cc b/src/kudu/master/master-test.cc
index a3585f1..e1fcff7 100644
--- a/src/kudu/master/master-test.cc
+++ b/src/kudu/master/master-test.cc
@@ -49,10 +49,15 @@
 using kudu::rpc::Messenger;
 using kudu::rpc::MessengerBuilder;
 using kudu::rpc::RpcController;
+using std::map;
+using std::multiset;
 using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::thread;
+using std::unordered_map;
+using std::unordered_set;
+using std::vector;
 using strings::Substitute;
 
 DECLARE_bool(catalog_manager_check_ts_count_for_create_table);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/master.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master.cc b/src/kudu/master/master.cc
index 5fe077c..175f7be 100644
--- a/src/kudu/master/master.cc
+++ b/src/kudu/master/master.cc
@@ -68,6 +68,7 @@ TAG_FLAG(authn_token_validity_seconds, experimental);
 
 using std::min;
 using std::shared_ptr;
+using std::string;
 using std::vector;
 
 using kudu::consensus::RaftPeerPB;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/sys_catalog-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog-test.cc b/src/kudu/master/sys_catalog-test.cc
index b00339d..524f64a 100644
--- a/src/kudu/master/sys_catalog-test.cc
+++ b/src/kudu/master/sys_catalog-test.cc
@@ -42,6 +42,7 @@
 
 using std::string;
 using std::shared_ptr;
+using std::vector;
 using kudu::rpc::Messenger;
 using kudu::rpc::MessengerBuilder;
 using kudu::security::Cert;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/sys_catalog.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog.cc b/src/kudu/master/sys_catalog.cc
index ad7e785..a9ef482 100644
--- a/src/kudu/master/sys_catalog.cc
+++ b/src/kudu/master/sys_catalog.cc
@@ -78,9 +78,10 @@ using kudu::tablet::TabletReplica;
 using kudu::tserver::WriteRequestPB;
 using kudu::tserver::WriteResponsePB;
 using std::function;
+using std::set;
 using std::shared_ptr;
-using std::unique_ptr;
 using std::string;
+using std::unique_ptr;
 using std::vector;
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/sys_catalog.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog.h b/src/kudu/master/sys_catalog.h
index 25e320d..2359737 100644
--- a/src/kudu/master/sys_catalog.h
+++ b/src/kudu/master/sys_catalog.h
@@ -234,7 +234,7 @@ class SysCatalogTable {
   void ReqDeleteTablets(tserver::WriteRequestPB* req,
                         const std::vector<TabletInfo*>& tablets);
 
-  static string TskSeqNumberToEntryId(int64_t seq_number);
+  static std::string TskSeqNumberToEntryId(int64_t seq_number);
 
   // Special string injected into SyncWrite() random failures (if enabled).
   //

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/master/ts_descriptor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/ts_descriptor.cc b/src/kudu/master/ts_descriptor.cc
index 82c4961..5f78ba6 100644
--- a/src/kudu/master/ts_descriptor.cc
+++ b/src/kudu/master/ts_descriptor.cc
@@ -39,6 +39,8 @@ TAG_FLAG(tserver_unresponsive_timeout_ms, advanced);
 
 using std::make_shared;
 using std::shared_ptr;
+using std::string;
+using std::vector;
 
 namespace kudu {
 namespace master {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/exactly_once_rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/exactly_once_rpc-test.cc b/src/kudu/rpc/exactly_once_rpc-test.cc
index 388919d..66eabf6 100644
--- a/src/kudu/rpc/exactly_once_rpc-test.cc
+++ b/src/kudu/rpc/exactly_once_rpc-test.cc
@@ -27,6 +27,7 @@ DECLARE_int64(result_tracker_gc_interval_ms);
 using std::atomic_int;
 using std::shared_ptr;
 using std::unique_ptr;
+using std::vector;
 
 namespace kudu {
 namespace rpc {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/inbound_call.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/inbound_call.cc b/src/kudu/rpc/inbound_call.cc
index d1c27b7..9350d21 100644
--- a/src/kudu/rpc/inbound_call.cc
+++ b/src/kudu/rpc/inbound_call.cc
@@ -34,6 +34,7 @@
 using google::protobuf::FieldDescriptor;
 using google::protobuf::io::CodedOutputStream;
 using google::protobuf::MessageLite;
+using std::string;
 using std::unique_ptr;
 using std::vector;
 using strings::Substitute;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/mt-rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/mt-rpc-test.cc b/src/kudu/rpc/mt-rpc-test.cc
index 73e3a13..0fa11e5 100644
--- a/src/kudu/rpc/mt-rpc-test.cc
+++ b/src/kudu/rpc/mt-rpc-test.cc
@@ -33,6 +33,7 @@ METRIC_DECLARE_counter(rpcs_queue_overflow);
 
 using std::string;
 using std::shared_ptr;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/negotiation-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/negotiation-test.cc b/src/kudu/rpc/negotiation-test.cc
index 68185bb..901475b 100644
--- a/src/kudu/rpc/negotiation-test.cc
+++ b/src/kudu/rpc/negotiation-test.cc
@@ -75,6 +75,7 @@ DECLARE_bool(rpc_trace_negotiation);
 using std::string;
 using std::thread;
 using std::unique_ptr;
+using std::vector;
 
 using kudu::security::Cert;
 using kudu::security::PkiConfig;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/negotiation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/negotiation.cc b/src/kudu/rpc/negotiation.cc
index 66a0112..591258f 100644
--- a/src/kudu/rpc/negotiation.cc
+++ b/src/kudu/rpc/negotiation.cc
@@ -66,6 +66,7 @@ DEFINE_bool(rpc_encrypt_loopback_connections, false,
             "an attacker.");
 TAG_FLAG(rpc_encrypt_loopback_connections, advanced);
 
+using std::string;
 using std::unique_ptr;
 using strings::Substitute;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/outbound_call.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/outbound_call.cc b/src/kudu/rpc/outbound_call.cc
index bcc39c3..00c3808 100644
--- a/src/kudu/rpc/outbound_call.cc
+++ b/src/kudu/rpc/outbound_call.cc
@@ -52,7 +52,9 @@ DEFINE_int32(rpc_inject_cancellation_state, -1,
              "will be injected. Should use values in OutboundCall::State only");
 TAG_FLAG(rpc_inject_cancellation_state, unsafe);
 
+using std::string;
 using std::unique_ptr;
+using std::vector;
 
 namespace kudu {
 namespace rpc {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/remote_method.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/remote_method.cc b/src/kudu/rpc/remote_method.cc
index 32ec40d..35020bc 100644
--- a/src/kudu/rpc/remote_method.cc
+++ b/src/kudu/rpc/remote_method.cc
@@ -41,7 +41,7 @@ void RemoteMethod::ToPB(RemoteMethodPB* pb) const {
   pb->set_method_name(method_name_);
 }
 
-string RemoteMethod::ToString() const {
+std::string RemoteMethod::ToString() const {
   return Substitute("$0.$1", service_name_, method_name_);
 }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/request_tracker.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/request_tracker.cc b/src/kudu/rpc/request_tracker.cc
index 0a3dc27..07806f8 100644
--- a/src/kudu/rpc/request_tracker.cc
+++ b/src/kudu/rpc/request_tracker.cc
@@ -18,6 +18,7 @@
 #include "kudu/rpc/request_tracker.h"
 
 #include <mutex>
+#include <string>
 #include <utility>
 
 #include "kudu/gutil/map-util.h"
@@ -27,7 +28,7 @@ namespace rpc {
 
 const RequestTracker::SequenceNumber RequestTracker::kNoSeqNo = -1;
 
-RequestTracker::RequestTracker(string client_id)
+RequestTracker::RequestTracker(std::string client_id)
     : client_id_(std::move(client_id)),
       next_(0) {}
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/result_tracker.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/result_tracker.cc b/src/kudu/rpc/result_tracker.cc
index 11ff8d2..9378451 100644
--- a/src/kudu/rpc/result_tracker.cc
+++ b/src/kudu/rpc/result_tracker.cc
@@ -55,11 +55,14 @@ namespace rpc {
 using google::protobuf::Message;
 using kudu::MemTracker;
 using rpc::InboundCall;
+using std::make_pair;
 using std::move;
 using std::lock_guard;
+using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::unique_ptr;
+using std::vector;
 using strings::Substitute;
 using strings::SubstituteAndAppend;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/result_tracker.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/result_tracker.h b/src/kudu/rpc/result_tracker.h
index f629d7a..4e808d1 100644
--- a/src/kudu/rpc/result_tracker.h
+++ b/src/kudu/rpc/result_tracker.h
@@ -240,7 +240,7 @@ class ResultTracker : public RefCountedThreadSafe<ResultTracker> {
   // Typically this is invoked from an internal thread started by 'StartGCThread()'.
   void GCResults();
 
-  string ToString();
+  std::string ToString();
 
  private:
   // Information about client originated ongoing RPCs.

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/retriable_rpc.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/retriable_rpc.h b/src/kudu/rpc/retriable_rpc.h
index 897d7a7..1facf0e 100644
--- a/src/kudu/rpc/retriable_rpc.h
+++ b/src/kudu/rpc/retriable_rpc.h
@@ -281,7 +281,7 @@ void RetriableRpc<Server, RequestPB, ResponsePB>::SendRpcCb(const Status& status
   // failure.
   Status final_status = result.status;
   if (!final_status.ok()) {
-    string error_string;
+    std::string error_string;
     if (current_) {
       error_string = strings::Substitute("Failed to write to server: $0", current_->ToString());
     } else {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/rpc-test-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc-test-base.h b/src/kudu/rpc/rpc-test-base.h
index c8c84ca..968e0a0 100644
--- a/src/kudu/rpc/rpc-test-base.h
+++ b/src/kudu/rpc/rpc-test-base.h
@@ -427,7 +427,7 @@ class RpcTestBase : public KuduTest {
   }
 
  protected:
-  std::shared_ptr<Messenger> CreateMessenger(const string &name,
+  std::shared_ptr<Messenger> CreateMessenger(const std::string &name,
                                              int n_reactors = 1,
                                              bool enable_ssl = false) {
     MessengerBuilder bld(name);
@@ -498,11 +498,11 @@ class RpcTestBase : public KuduTest {
     RpcController controller;
 
     int idx1;
-    string s1(size1, 'a');
+    std::string s1(size1, 'a');
     CHECK_OK(controller.AddOutboundSidecar(RpcSidecar::FromSlice(Slice(s1)), &idx1));
 
     int idx2;
-    string s2(size2, 'b');
+    std::string s2(size2, 'b');
     CHECK_OK(controller.AddOutboundSidecar(RpcSidecar::FromSlice(Slice(s2)), &idx2));
 
     request.set_sidecar1_idx(idx1);
@@ -613,7 +613,7 @@ class RpcTestBase : public KuduTest {
   }
 
  protected:
-  string service_name_;
+  std::string service_name_;
   std::shared_ptr<Messenger> server_messenger_;
   scoped_refptr<ServicePool> service_pool_;
   std::shared_ptr<kudu::MemTracker> mem_tracker_;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/rpc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc.cc b/src/kudu/rpc/rpc.cc
index 685da13..d4c8b60 100644
--- a/src/kudu/rpc/rpc.cc
+++ b/src/kudu/rpc/rpc.cc
@@ -25,6 +25,7 @@
 #include "kudu/rpc/rpc_header.pb.h"
 
 using std::shared_ptr;
+using std::string;
 using strings::Substitute;
 using strings::SubstituteAndAppend;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/rpc_context.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_context.cc b/src/kudu/rpc/rpc_context.cc
index 06fd8c5..2ee88f5 100644
--- a/src/kudu/rpc/rpc_context.cc
+++ b/src/kudu/rpc/rpc_context.cc
@@ -33,6 +33,7 @@
 #include "kudu/util/trace.h"
 
 using google::protobuf::Message;
+using std::string;
 using std::unique_ptr;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/rpc_stub-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_stub-test.cc b/src/kudu/rpc/rpc_stub-test.cc
index 9ee59b0..ecbb261 100644
--- a/src/kudu/rpc/rpc_stub-test.cc
+++ b/src/kudu/rpc/rpc_stub-test.cc
@@ -42,8 +42,10 @@ DEFINE_bool(is_panic_test_child, false, "Used by TestRpcPanic");
 DECLARE_bool(socket_inject_short_recvs);
 
 using std::shared_ptr;
+using std::string;
 using std::unique_ptr;
 using std::vector;
+using base::subtle::NoBarrier_Load;
 
 namespace kudu {
 namespace rpc {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/rpcz_store.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpcz_store.cc b/src/kudu/rpc/rpcz_store.cc
index 66c23d0..9f56d3d 100644
--- a/src/kudu/rpc/rpcz_store.cc
+++ b/src/kudu/rpc/rpcz_store.cc
@@ -41,6 +41,7 @@ TAG_FLAG(rpc_dump_all_traces, advanced);
 TAG_FLAG(rpc_dump_all_traces, runtime);
 
 using std::pair;
+using std::string;
 using std::vector;
 using std::unique_ptr;
 
@@ -74,7 +75,7 @@ class MethodSampler {
   // This function recurses through the parent-child relationship graph,
   // keeping the current tree path in 'child_path' (empty at the root).
   static void GetTraceMetrics(const Trace& t,
-                              const std::string& child_path,
+                              const string& child_path,
                               RpczSamplePB* sample_pb);
 
   // An individual recorded sample.
@@ -233,7 +234,7 @@ void RpczStore::LogTrace(InboundCall* call) {
       // The traces may also be too large to fit in a log message.
       LOG(WARNING) << call->ToString() << " took " << duration_ms << "ms (client timeout "
                    << call->header_.timeout_millis() << ").";
-      std::string s = call->trace()->DumpToString();
+      string s = call->trace()->DumpToString();
       if (!s.empty()) {
         LOG(WARNING) << "Trace:\n" << s;
       }

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/sasl_common.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_common.cc b/src/kudu/rpc/sasl_common.cc
index 9f14413..ffeb1b2 100644
--- a/src/kudu/rpc/sasl_common.cc
+++ b/src/kudu/rpc/sasl_common.cc
@@ -42,6 +42,7 @@
 #include "kudu/security/init.h"
 
 using std::set;
+using std::string;
 
 DECLARE_string(keytab_file);
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/sasl_common.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_common.h b/src/kudu/rpc/sasl_common.h
index 6022f9e..437c9cd 100644
--- a/src/kudu/rpc/sasl_common.h
+++ b/src/kudu/rpc/sasl_common.h
@@ -33,8 +33,6 @@ class Sockaddr;
 
 namespace rpc {
 
-using std::string;
-
 // Constants
 extern const char* const kSaslMechPlain;
 extern const char* const kSaslMechGSSAPI;
@@ -83,7 +81,7 @@ Status DisableSaslInitialization() WARN_UNUSED_RESULT;
 Status WrapSaslCall(sasl_conn_t* conn, const std::function<int()>& call) WARN_UNUSED_RESULT;
 
 // Return <ip>;<port> string formatted for SASL library use.
-string SaslIpPortString(const Sockaddr& addr);
+std::string SaslIpPortString(const Sockaddr& addr);
 
 // Return available plugin mechanisms for the given connection.
 std::set<SaslMechanism::Type> SaslListAvailableMechs();

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/server_negotiation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/server_negotiation.cc b/src/kudu/rpc/server_negotiation.cc
index 4f0ed5f..741310e 100644
--- a/src/kudu/rpc/server_negotiation.cc
+++ b/src/kudu/rpc/server_negotiation.cc
@@ -55,6 +55,7 @@
 using std::set;
 using std::string;
 using std::unique_ptr;
+using std::vector;
 
 // Fault injection flags.
 DEFINE_double(rpc_inject_invalid_authn_token_ratio, 0,

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/rpc/service_pool.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/service_pool.cc b/src/kudu/rpc/service_pool.cc
index 1a23ca9..82a3ad4 100644
--- a/src/kudu/rpc/service_pool.cc
+++ b/src/kudu/rpc/service_pool.cc
@@ -37,6 +37,8 @@
 #include "kudu/util/trace.h"
 
 using std::shared_ptr;
+using std::string;
+using std::vector;
 using strings::Substitute;
 
 METRIC_DEFINE_histogram(server, rpc_incoming_queue_time,

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/cert-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/cert-test.cc b/src/kudu/security/cert-test.cc
index acd0f74..ff5d51a 100644
--- a/src/kudu/security/cert-test.cc
+++ b/src/kudu/security/cert-test.cc
@@ -33,6 +33,7 @@
 #include "kudu/util/test_util.h"
 
 using std::pair;
+using std::string;
 using std::thread;
 using std::vector;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/cert.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/cert.cc b/src/kudu/security/cert.cc
index dabf2d3..e1a2666 100644
--- a/src/kudu/security/cert.cc
+++ b/src/kudu/security/cert.cc
@@ -34,6 +34,7 @@
 #include "kudu/util/status.h"
 
 using std::string;
+using std::vector;
 
 namespace kudu {
 namespace security {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/openssl_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/openssl_util.cc b/src/kudu/security/openssl_util.cc
index dce93fc..b0b690c 100644
--- a/src/kudu/security/openssl_util.cc
+++ b/src/kudu/security/openssl_util.cc
@@ -40,6 +40,7 @@
 
 using std::ostringstream;
 using std::string;
+using std::vector;
 
 namespace kudu {
 namespace security {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/openssl_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/security/openssl_util.h b/src/kudu/security/openssl_util.h
index f5cd817..aa493ff 100644
--- a/src/kudu/security/openssl_util.h
+++ b/src/kudu/security/openssl_util.h
@@ -69,7 +69,7 @@ typedef struct x509_st X509;
 namespace kudu {
 namespace security {
 
-using PasswordCallback = std::function<string(void)>;
+using PasswordCallback = std::function<std::string(void)>;
 
 // Disable initialization of OpenSSL. Must be called before
 // any call to InitializeOpenSSL().

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/openssl_util_bio.h
----------------------------------------------------------------------
diff --git a/src/kudu/security/openssl_util_bio.h b/src/kudu/security/openssl_util_bio.h
index c4053a1..c935b0b 100644
--- a/src/kudu/security/openssl_util_bio.h
+++ b/src/kudu/security/openssl_util_bio.h
@@ -57,7 +57,7 @@ Status ToBIO(BIO* bio, DataFormat format, TYPE* obj) {
 // a password protected private key.
 inline int TLSPasswordCB(char* buf, int size, int /* rwflag */, void* userdata) {
   const auto* cb = reinterpret_cast<const PasswordCallback*>(userdata);
-  string pw = (*cb)();
+  std::string pw = (*cb)();
   if (pw.size() >= size) {
     LOG(ERROR) << "Provided key password is longer than maximum length "
                << size;
@@ -87,7 +87,7 @@ Status FromBIO(BIO* bio, DataFormat format, c_unique_ptr<TYPE>* ret,
 }
 
 template<typename Type, typename Traits = SslTypeTraits<Type>>
-Status FromString(const string& data, DataFormat format,
+Status FromString(const std::string& data, DataFormat format,
                   c_unique_ptr<Type>* ret) {
   const void* mdata = reinterpret_cast<const void*>(data.data());
   auto bio = ssl_make_unique(BIO_new_mem_buf(
@@ -115,7 +115,7 @@ Status ToString(std::string* data, DataFormat format, Type* obj) {
 }
 
 template<typename Type, typename Traits = SslTypeTraits<Type>>
-Status FromFile(const string& fpath, DataFormat format,
+Status FromFile(const std::string& fpath, DataFormat format,
                 c_unique_ptr<Type>* ret, const PasswordCallback& cb = PasswordCallback()) {
   auto bio = ssl_make_unique(BIO_new(BIO_s_file()));
   OPENSSL_RET_NOT_OK(BIO_read_filename(bio.get(), fpath.c_str()),

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/simple_acl.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/simple_acl.cc b/src/kudu/security/simple_acl.cc
index 75b06a2..f7d0b14 100644
--- a/src/kudu/security/simple_acl.cc
+++ b/src/kudu/security/simple_acl.cc
@@ -26,6 +26,7 @@
 #include "kudu/gutil/strings/stringpiece.h"
 #include "kudu/util/status.h"
 
+using std::set;
 using std::string;
 using std::vector;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/test/mini_kdc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/test/mini_kdc.cc b/src/kudu/security/test/mini_kdc.cc
index bae2278..1b082c3 100644
--- a/src/kudu/security/test/mini_kdc.cc
+++ b/src/kudu/security/test/mini_kdc.cc
@@ -39,6 +39,7 @@
 using std::map;
 using std::string;
 using std::unique_ptr;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/tls_context.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/tls_context.cc b/src/kudu/security/tls_context.cc
index 353d1ed..5c7a7fc 100644
--- a/src/kudu/security/tls_context.cc
+++ b/src/kudu/security/tls_context.cc
@@ -44,6 +44,7 @@
 using strings::Substitute;
 using std::string;
 using std::unique_lock;
+using std::vector;
 
 DEFINE_int32(ipki_server_key_size, 2048,
              "the number of bits for server cert's private key. The server cert "

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/security/token-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/token-test.cc b/src/kudu/security/token-test.cc
index 81bc8b9..564587e 100644
--- a/src/kudu/security/token-test.cc
+++ b/src/kudu/security/token-test.cc
@@ -31,8 +31,10 @@
 
 DECLARE_int32(tsk_num_rsa_bits);
 
+using std::string;
 using std::make_shared;
 using std::unique_ptr;
+using std::vector;
 
 namespace kudu {
 namespace security {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/default-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/default-path-handlers.cc b/src/kudu/server/default-path-handlers.cc
index 645b362..5090d84 100644
--- a/src/kudu/server/default-path-handlers.cc
+++ b/src/kudu/server/default-path-handlers.cc
@@ -48,6 +48,7 @@
 
 using std::ifstream;
 using std::string;
+using std::vector;
 using strings::Substitute;
 
 DEFINE_int64(web_log_bytes, 1024 * 1024,

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/pprof-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/pprof-path-handlers.cc b/src/kudu/server/pprof-path-handlers.cc
index f7ae362..7b479af 100644
--- a/src/kudu/server/pprof-path-handlers.cc
+++ b/src/kudu/server/pprof-path-handlers.cc
@@ -49,6 +49,7 @@ using std::endl;
 using std::ifstream;
 using std::ostringstream;
 using std::string;
+using std::vector;
 
 // GLog already implements symbolization. Just import their hidden symbol.
 namespace google {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/rpc_server-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/rpc_server-test.cc b/src/kudu/server/rpc_server-test.cc
index bf97c72..2d26791 100644
--- a/src/kudu/server/rpc_server-test.cc
+++ b/src/kudu/server/rpc_server-test.cc
@@ -29,6 +29,7 @@
 using std::shared_ptr;
 using std::string;
 using std::unique_ptr;
+using std::vector;
 
 DECLARE_bool(rpc_server_allow_ephemeral_ports);
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/rpcz-path-handler.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/rpcz-path-handler.cc b/src/kudu/server/rpcz-path-handler.cc
index f0eddba..373d3e8 100644
--- a/src/kudu/server/rpcz-path-handler.cc
+++ b/src/kudu/server/rpcz-path-handler.cc
@@ -37,6 +37,7 @@ using kudu::rpc::DumpRpczStoreResponsePB;
 using kudu::rpc::Messenger;
 using std::ostringstream;
 using std::shared_ptr;
+using std::string;
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/tracing-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/tracing-path-handlers.cc b/src/kudu/server/tracing-path-handlers.cc
index 0cbeb2c..d8ada6d 100644
--- a/src/kudu/server/tracing-path-handlers.cc
+++ b/src/kudu/server/tracing-path-handlers.cc
@@ -36,6 +36,7 @@
 
 using std::map;
 using std::ostringstream;
+using std::pair;
 using std::string;
 using std::unique_ptr;
 using std::vector;

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/webserver-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver-test.cc b/src/kudu/server/webserver-test.cc
index 68fac44..5ea1da9 100644
--- a/src/kudu/server/webserver-test.cc
+++ b/src/kudu/server/webserver-test.cc
@@ -35,6 +35,7 @@
 #include "kudu/util/test_util.h"
 
 using std::string;
+using std::vector;
 using std::unique_ptr;
 
 DECLARE_int32(webserver_max_post_length_bytes);

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/server/webui_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webui_util.cc b/src/kudu/server/webui_util.cc
index 6be5486..8d5b44a 100644
--- a/src/kudu/server/webui_util.cc
+++ b/src/kudu/server/webui_util.cc
@@ -27,6 +27,7 @@
 #include "kudu/server/monitored_task.h"
 #include "kudu/util/url-coding.h"
 
+using std::string;
 using strings::Substitute;
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/all_types-scan-correctness-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/all_types-scan-correctness-test.cc b/src/kudu/tablet/all_types-scan-correctness-test.cc
index 73ebd45..49c17e7 100644
--- a/src/kudu/tablet/all_types-scan-correctness-test.cc
+++ b/src/kudu/tablet/all_types-scan-correctness-test.cc
@@ -22,6 +22,8 @@
 #include "kudu/common/schema.h"
 #include "kudu/tablet/tablet-test-base.h"
 
+using strings::Substitute;
+
 namespace kudu {
 namespace tablet {
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/cbtree-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cbtree-test.cc b/src/kudu/tablet/cbtree-test.cc
index b60161a..db5243f 100644
--- a/src/kudu/tablet/cbtree-test.cc
+++ b/src/kudu/tablet/cbtree-test.cc
@@ -31,14 +31,15 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
-namespace kudu {
-namespace tablet {
-namespace btree {
-
+using std::string;
 using std::thread;
 using std::unordered_set;
 using std::vector;
 
+namespace kudu {
+namespace tablet {
+namespace btree {
+
 class TestCBTree : public KuduTest {
  protected:
   template<class T>

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/cfile_set-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set-test.cc b/src/kudu/tablet/cfile_set-test.cc
index 686d70a..4cb3923 100644
--- a/src/kudu/tablet/cfile_set-test.cc
+++ b/src/kudu/tablet/cfile_set-test.cc
@@ -29,6 +29,8 @@
 DECLARE_int32(cfile_default_block_size);
 
 using std::shared_ptr;
+using std::string;
+using std::vector;
 
 namespace kudu {
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/cfile_set.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.cc b/src/kudu/tablet/cfile_set.cc
index 5ba509c..d3715fc 100644
--- a/src/kudu/tablet/cfile_set.cc
+++ b/src/kudu/tablet/cfile_set.cc
@@ -40,11 +40,17 @@ TAG_FLAG(consult_bloom_filters, hidden);
 namespace kudu {
 namespace tablet {
 
+using cfile::BloomFileReader;
+using cfile::CFileIterator;
+using cfile::CFileReader;
+using cfile::ColumnIterator;
 using cfile::ReaderOptions;
 using cfile::DefaultColumnValueIterator;
 using fs::ReadableBlock;
 using std::shared_ptr;
+using std::string;
 using std::unique_ptr;
+using std::vector;
 using strings::Substitute;
 
 ////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/cfile_set.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.h b/src/kudu/tablet/cfile_set.h
index 34b8c3c..394054e 100644
--- a/src/kudu/tablet/cfile_set.h
+++ b/src/kudu/tablet/cfile_set.h
@@ -41,11 +41,6 @@ namespace kudu {
 
 namespace tablet {
 
-using kudu::cfile::BloomFileReader;
-using kudu::cfile::CFileIterator;
-using kudu::cfile::CFileReader;
-using kudu::cfile::ColumnIterator;
-
 // Set of CFiles which make up the base data for a single rowset
 //
 // All of these files have the same number of rows, and thus the positional
@@ -81,8 +76,8 @@ class CFileSet : public std::enable_shared_from_this<CFileSet> {
                  boost::optional<rowid_t>* idx,
                  ProbeStats* stats) const;
 
-  string ToString() const {
-    return string("CFile base data in ") + rowset_metadata_->ToString();
+  std::string ToString() const {
+    return std::string("CFile base data in ") + rowset_metadata_->ToString();
   }
 
   // Check if the given row is present. If it is, sets *rowid to the
@@ -111,13 +106,14 @@ class CFileSet : public std::enable_shared_from_this<CFileSet> {
   Status OpenAdHocIndexReader();
   Status LoadMinMaxKeys();
 
-  Status NewColumnIterator(ColumnId col_id, CFileReader::CacheControl cache_blocks,
-                           CFileIterator **iter) const;
-  Status NewKeyIterator(CFileIterator** key_iter) const;
+  Status NewColumnIterator(ColumnId col_id,
+                           cfile::CFileReader::CacheControl cache_blocks,
+                           cfile::CFileIterator **iter) const;
+  Status NewKeyIterator(cfile::CFileIterator** key_iter) const;
 
   // Return the CFileReader responsible for reading the key index.
   // (the ad-hoc reader for composite keys, otherwise the key column reader)
-  CFileReader* key_index_reader() const;
+  cfile::CFileReader* key_index_reader() const;
 
   const Schema &tablet_schema() const { return rowset_metadata_->tablet_schema(); }
 
@@ -130,14 +126,14 @@ class CFileSet : public std::enable_shared_from_this<CFileSet> {
   // Map of column ID to reader. These are lazily initialized as needed.
   // We use flat_map here since it's the most memory-compact while
   // still having good performance for small maps.
-  typedef boost::container::flat_map<int, std::unique_ptr<CFileReader>> ReaderMap;
+  typedef boost::container::flat_map<int, std::unique_ptr<cfile::CFileReader>> ReaderMap;
   ReaderMap readers_by_col_id_;
 
   // A file reader for an ad-hoc index, i.e. an index that sits in its own file
   // and is not embedded with the column's data blocks. This is used when the
   // index pertains to more than one column, as in the case of composite keys.
-  std::unique_ptr<CFileReader> ad_hoc_idx_reader_;
-  gscoped_ptr<BloomFileReader> bloom_reader_;
+  std::unique_ptr<cfile::CFileReader> ad_hoc_idx_reader_;
+  gscoped_ptr<cfile::BloomFileReader> bloom_reader_;
 };
 
 
@@ -165,8 +161,8 @@ class CFileSet::Iterator : public ColumnwiseIterator {
     return cur_idx_ < upper_bound_idx_;
   }
 
-  virtual string ToString() const OVERRIDE {
-    return string("rowset iterator for ") + base_data_->ToString();
+  virtual std::string ToString() const OVERRIDE {
+    return std::string("rowset iterator for ") + base_data_->ToString();
   }
 
   const Schema &schema() const OVERRIDE {
@@ -180,7 +176,7 @@ class CFileSet::Iterator : public ColumnwiseIterator {
   }
 
   // Collect the IO statistics for each of the underlying columns.
-  virtual void GetIteratorStats(vector<IteratorStats> *stats) const OVERRIDE;
+  virtual void GetIteratorStats(std::vector<IteratorStats> *stats) const OVERRIDE;
 
   virtual ~Iterator();
  private:
@@ -215,8 +211,8 @@ class CFileSet::Iterator : public ColumnwiseIterator {
   const Schema* projection_;
 
   // Iterator for the key column in the underlying data.
-  gscoped_ptr<CFileIterator> key_iter_;
-  std::vector<std::unique_ptr<ColumnIterator>> col_iters_;
+  gscoped_ptr<cfile::CFileIterator> key_iter_;
+  std::vector<std::unique_ptr<cfile::ColumnIterator>> col_iters_;
 
   bool initted_;
 
@@ -236,7 +232,7 @@ class CFileSet::Iterator : public ColumnwiseIterator {
 
   // The underlying columns are prepared lazily, so that if a column is never
   // materialized, it doesn't need to be read off disk.
-  vector<bool> cols_prepared_;
+  std::vector<bool> cols_prepared_;
 
 };
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction-test.cc b/src/kudu/tablet/compaction-test.cc
index e2d389c..fd9ae83 100644
--- a/src/kudu/tablet/compaction-test.cc
+++ b/src/kudu/tablet/compaction-test.cc
@@ -51,6 +51,8 @@ DEFINE_int32(merge_benchmark_num_rows_per_rowset, 500000,
 DECLARE_string(block_manager);
 
 using std::shared_ptr;
+using std::string;
+using std::vector;
 
 namespace kudu {
 namespace tablet {

http://git-wip-us.apache.org/repos/asf/kudu/blob/154b07de/src/kudu/tablet/compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index a39e17c..8619c8d 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -40,9 +40,12 @@
 #include "kudu/util/debug/trace_event.h"
 
 using kudu::clock::HybridClock;
+using std::deque;
 using std::shared_ptr;
+using std::string;
 using std::unique_ptr;
 using std::unordered_set;
+using std::vector;
 using strings::Substitute;
 
 namespace kudu {