kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject incubator-kudu git commit: KUDU-1406: Fix empty kudu.master_addresses in TBLPROPERTIES via Web UI
Date Mon, 11 Apr 2016 00:30:43 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 637b2e62c -> 0bab4ac1c


KUDU-1406: Fix empty kudu.master_addresses in TBLPROPERTIES via Web UI

- all_addresses is a vector<string> that is defined but never initialized.
The empty all_addresses is then assigned incorrectly to master_addresses.
This patch correctly initializes and sets the values for all_addresses.

Change-Id: I5a8930330dce2b255ec49a1ab95e1caf37f5bf00
Reviewed-on: http://gerrit.cloudera.org:8080/2744
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 0bab4ac1cd1511b3a80b3f53612aabf5533241b5
Parents: 637b2e6
Author: Sameer Abhyankar <sameer@cloudera.com>
Authored: Sun Apr 10 19:40:59 2016 -0400
Committer: Todd Lipcon <todd@apache.org>
Committed: Mon Apr 11 00:30:04 2016 +0000

----------------------------------------------------------------------
 src/kudu/master/master-path-handlers.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/0bab4ac1/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 e71c5ce..11eb5f2 100644
--- a/src/kudu/master/master-path-handlers.cc
+++ b/src/kudu/master/master-path-handlers.cc
@@ -195,8 +195,9 @@ void MasterPathHandlers::HandleTablePage(const Webserver::WebRequest&
req,
   string master_addresses;
   if (master_->opts().IsDistributed()) {
     vector<string> all_addresses;
+    all_addresses.reserve(master_->opts().master_addresses.size());
     for (const HostPort& hp : master_->opts().master_addresses) {
-      master_addresses.append(hp.ToString());
+      all_addresses.push_back(hp.ToString());
     }
     master_addresses = JoinElements(all_addresses, ",");
   } else {


Mime
View raw message