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 2018/11/21 03:29:39 UTC

[1/4] kudu git commit: [docs] note on unavailable tservers during rebalancing

Repository: kudu
Updated Branches:
  refs/heads/master 1eb82924a -> 66b06de7b


[docs] note on unavailable tservers during rebalancing

Change-Id: Ifa7a7590a90cee2e2d1399655621ec3618e51b25
Reviewed-on: http://gerrit.cloudera.org:8080/11966
Reviewed-by: Will Berkeley <wd...@gmail.com>
Tested-by: Alexey Serbin <as...@cloudera.com>


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

Branch: refs/heads/master
Commit: 27baa0c99a4f4f075e2a9cc70323a358081e09e5
Parents: 1eb8292
Author: Alexey Serbin <al...@apache.org>
Authored: Tue Nov 20 14:01:35 2018 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue Nov 20 23:59:44 2018 +0000

----------------------------------------------------------------------
 docs/administration.adoc | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/27baa0c9/docs/administration.adoc
----------------------------------------------------------------------
diff --git a/docs/administration.adoc b/docs/administration.adoc
index ea27478..40690b2 100644
--- a/docs/administration.adoc
+++ b/docs/administration.adoc
@@ -1235,6 +1235,14 @@ the flag `--max_moves_per_server`. See `kudu cluster rebalance --help` for more.
 It's safe to stop the rebalancer tool at any time. When restarted, the
 rebalancer will continue rebalancing the cluster.
 
+The rebalancer requires all registered tablet servers to be up and running
+to proceed with the rebalancing process. That's to avoid possible conflicts
+and races with the automatic re-replication and keep replica placement optimal
+for current configuration of the cluster. If a tablet server becomes
+unavailable during the rebalancing session, the rebalancer will exit. As noted
+above, it's safe to restart the rebalancer after resolving the issue with
+unavailable tablet servers.
+
 The rebalancing tool can rebalance Kudu clusters running older versions as well,
 with some restrictions. Consult the following table for more information. In the
 table, "RF" stands for "replication factor".


[3/4] kudu git commit: [webui] Fancy table for /mem-trackers and sortable tables

Posted by al...@apache.org.
[webui] Fancy table for /mem-trackers and sortable tables

This fancifies the table of trackers on /mem-trackers in the style of
6ae9ecbe2595090c78e7afd271aae9d04dd4d0b5. It also adds the ability to
sort some tables by some numeric columns. Namely:

- the /mem-trackers trackers table is sortable by current consumption
  and peak consumption
- the /tablets page tablets tables are sortable by on-disk size
- the /maintenance-manager "non-running op" table is sortable by RAM
  anchored, logs retained, and perf.

I tested this change out manually, verifying that ascending and
descending sort looked good. Unfortunately, the bootstrap table
library doesn't seem to use a stable sort.

Change-Id: Ibdf8e7bd82fe2b95e699b8bb238a9cf0e5a7e727
Reviewed-on: http://gerrit.cloudera.org:8080/11968
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 7437626f42b30811720d59e792bc905662efd2b3
Parents: b8595f8
Author: Will Berkeley <wd...@gmail.org>
Authored: Tue Nov 20 14:46:09 2018 -0800
Committer: Will Berkeley <wd...@gmail.com>
Committed: Wed Nov 21 01:31:15 2018 +0000

----------------------------------------------------------------------
 src/kudu/server/default_path_handlers.cc | 24 ++++++----
 src/kudu/server/webserver.cc             |  1 +
 www/kudu.js                              | 68 +++++++++++++++++++++++++++
 www/maintenance-manager.mustache         |  6 +--
 www/tablets.mustache                     |  4 +-
 5 files changed, 90 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/7437626f/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 7574def..390630c 100644
--- a/src/kudu/server/default_path_handlers.cc
+++ b/src/kudu/server/default_path_handlers.cc
@@ -28,9 +28,7 @@
 #include <vector>
 
 #include <boost/algorithm/string/predicate.hpp>
-#include <boost/algorithm/string/replace.hpp>
 #include <boost/bind.hpp> // IWYU pragma: keep
-#include <boost/iterator/iterator_traits.hpp>
 #include <gflags/gflags.h>
 #include <gflags/gflags_declare.h>
 #include <glog/logging.h>
@@ -50,7 +48,6 @@
 #include "kudu/util/array_view.h"
 #include "kudu/util/debug-util.h"
 #include "kudu/util/easy_json.h"
-#include "kudu/util/faststring.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/flags.h"
 #include "kudu/util/jsonwriter.h"
@@ -203,7 +200,7 @@ static void MemUsageHandler(const Webserver::WebRequest& req,
 #endif
 }
 
-// Registered to handle "/mem-trackers", and prints out to handle memory tracker information.
+// Registered to handle "/mem-trackers", and prints out memory tracker information.
 static void MemTrackersHandler(const Webserver::WebRequest& /*req*/,
                                Webserver::PrerenderedWebResponse* resp) {
   std::ostringstream* output = resp->output;
@@ -231,9 +228,20 @@ static void MemTrackersHandler(const Webserver::WebRequest& /*req*/,
 #endif
 
   *output << "<h1>Memory usage by subsystem</h1>\n";
-  *output << "<table class='table table-striped'>\n";
-  *output << "  <thead><tr><th>Id</th><th>Parent</th><th>Limit</th><th>Current Consumption</th>"
-      "<th>Peak consumption</th></tr></thead>\n";
+  *output << "<table data-toggle='table' "
+             "       data-pagination='true' "
+             "       data-search='true' "
+             "       class='table table-striped'>\n";
+  *output << "<thead><tr>"
+             "<th>Id</th>"
+             "<th>Parent</th>"
+             "<th>Limit</th>"
+             "<th data-sorter='bytesSorter' "
+             "    data-sortable='true' "
+             "'>Current Consumption</th>"
+             "<th data-sorter='bytesSorter' "
+             "    data-sortable='true' "
+             ">Peak Consumption</th>";
   *output << "<tbody>\n";
 
   vector<shared_ptr<MemTracker> > trackers;
@@ -244,7 +252,7 @@ static void MemTrackersHandler(const Webserver::WebRequest& /*req*/,
                        HumanReadableNumBytes::ToString(tracker->limit());
     string current_consumption_str = HumanReadableNumBytes::ToString(tracker->consumption());
     string peak_consumption_str = HumanReadableNumBytes::ToString(tracker->peak_consumption());
-    (*output) << Substitute("  <tr><td>$0</td><td>$1</td><td>$2</td>" // id, parent, limit
+    (*output) << Substitute("<tr><td>$0</td><td>$1</td><td>$2</td>" // id, parent, limit
                             "<td>$3</td><td>$4</td></tr>\n", // current, peak
                             tracker->id(), parent, limit_str, current_consumption_str,
                             peak_consumption_str);

http://git-wip-us.apache.org/repos/asf/kudu/blob/7437626f/src/kudu/server/webserver.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver.cc b/src/kudu/server/webserver.cc
index 0fc0aec..d0fde6b 100644
--- a/src/kudu/server/webserver.cc
+++ b/src/kudu/server/webserver.cc
@@ -566,6 +566,7 @@ static const char* const kMainTemplate = R"(
     <script src='/jquery-3.2.1.min.js' defer></script>
     <script src='/bootstrap/js/bootstrap.min.js' defer></script>
     <script src='/bootstrap/js/bootstrap-table.min.js' defer></script>
+    <script src='/kudu.js' defer></script>
     <link href='/kudu.css' rel='stylesheet' />
   </head>
   <body>

http://git-wip-us.apache.org/repos/asf/kudu/blob/7437626f/www/kudu.js
----------------------------------------------------------------------
diff --git a/www/kudu.js b/www/kudu.js
new file mode 100644
index 0000000..0933ca2
--- /dev/null
+++ b/www/kudu.js
@@ -0,0 +1,68 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+// Converts a human-readable bytes value like '1.23B' or '985.32M' to a number
+// of bytes. The suffix must be present: '1.23' is not valid but '1.23B' is.
+// Returns -1 if there's some failure.
+function toNumBytes(humanReadableBytes) {
+  len = humanReadableBytes.length;
+  if (len <= 1) {
+    return -1;
+  }
+  unit = humanReadableBytes[len - 1];
+  val = parseFloat(humanReadableBytes.substring(0, len - 1));
+  if (isNaN(val)) {
+    return -1;
+  }
+  // Fallthrough intended throughout.
+  switch (unit) {
+    case 'Y': val *= 1024.0; // Enough bytes to handle any double.
+    case 'Z': val *= 1024.0;
+    case 'E': val *= 1024.0;
+    case 'P': val *= 1024.0;
+    case 'T': val *= 1024.0;
+    case 'G': val *= 1024.0;
+    case 'M': val *= 1024.0;
+    case 'K': val *= 1024.0;
+    case 'B': break;
+    default:
+      return -1;
+  }
+  return val;
+}
+
+// A comparison function for human-readable byte strings.
+function bytesSorter(left, right) {
+  if (right.length == 0 && left.length == 0) {
+    return 0;
+  }
+  if (left.length == 0) {
+    return -1;
+  }
+  if (right.length == 0) {
+    return 1;
+  }
+  left_bytes = toNumBytes(left.trim());
+  right_bytes = toNumBytes(right.trim());
+  if (left_bytes < right_bytes) {
+    return -1;
+  }
+  if (left_bytes > right_bytes) {
+    return 1;
+  }
+  return 0;
+}

http://git-wip-us.apache.org/repos/asf/kudu/blob/7437626f/www/maintenance-manager.mustache
----------------------------------------------------------------------
diff --git a/www/maintenance-manager.mustache b/www/maintenance-manager.mustache
index 269a7d2..81d5247 100644
--- a/www/maintenance-manager.mustache
+++ b/www/maintenance-manager.mustache
@@ -63,9 +63,9 @@ under the License.
     <tr>
       <th>Name</th>
       <th>Runnable</th>
-      <th>RAM anchored</th>
-      <th>Logs retained</th>
-      <th>Perf</th>
+      <th data-sorter="bytesSorter" data-sortable="true">RAM anchored</th>
+      <th data-sorter="bytesSorter" data-sortable="true">Logs retained</th>
+      <th data-sortable="true">Perf</th>
     </tr>
   </thead>
   <tbody>

http://git-wip-us.apache.org/repos/asf/kudu/blob/7437626f/www/tablets.mustache
----------------------------------------------------------------------
diff --git a/www/tablets.mustache b/www/tablets.mustache
index ea1f94a..7a3f904 100644
--- a/www/tablets.mustache
+++ b/www/tablets.mustache
@@ -39,7 +39,7 @@ There are no tablet replicas.
         <th>Tablet ID</th>
         <th>Partition</th>
         <th>State</th>
-        <th>On-disk size</th>
+        <th data-sorter="bytesSorter" data-sortable="true">On-disk size</th>
         <th>RaftConfig</th>
       </tr>
     </thead>
@@ -83,7 +83,7 @@ There are no tablet replicas.
         <th>Tablet ID</th>
         <th>Partition</th>
         <th>State</th>
-        <th>On-disk size</th>
+        <th data-sorter="bytesSorter" data-sortable="true">On-disk size</th>
         <th>Last status</th>
       </tr>
     </thead>


[2/4] kudu git commit: build: explicitly declare decimal Set/Get<>s

Posted by al...@apache.org.
build: explicitly declare decimal Set/Get<>s

Some compilers aren't clever enough to pick up on implicit instantiation
of templates based on usage in a given compilation unit, and instead we
need to explicitly instantiate them. This surfaced as the following
build error:

Undefined symbols for architecture x86_64:
  "kudu::Status kudu::KuduPartialRow::Set<kudu::TypeTraits<(kudu::DataType)15> >(int, kudu::TypeTraits<(kudu::DataType)15>::cpp_type const&, bool)", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)15> >::GenerateSplitRows(kudu::client::KuduSchema const&) const in all_types-itest.cc.o
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)15> >::GenerateRowKey(kudu::client::KuduInsert*, int, int) const in all_types-itest.cc.o
  "kudu::Status kudu::KuduPartialRow::Set<kudu::TypeTraits<(kudu::DataType)16> >(int, kudu::TypeTraits<(kudu::DataType)16>::cpp_type const&, bool)", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)16> >::GenerateSplitRows(kudu::client::KuduSchema const&) const in all_types-itest.cc.o
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)16> >::GenerateRowKey(kudu::client::KuduInsert*, int, int) const in all_types-itest.cc.o
  "kudu::Status kudu::KuduPartialRow::Set<kudu::TypeTraits<(kudu::DataType)17> >(int, kudu::TypeTraits<(kudu::DataType)17>::cpp_type const&, bool)", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)17> >::GenerateSplitRows(kudu::client::KuduSchema const&) const in all_types-itest.cc.o
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)17> >::GenerateRowKey(kudu::client::KuduInsert*, int, int) const in all_types-itest.cc.o
  "kudu::Status kudu::client::KuduScanBatch::RowPtr::Get<kudu::TypeTraits<(kudu::DataType)15> >(int, kudu::TypeTraits<(kudu::DataType)15>::cpp_type*) const", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)15> >::VerifyRowKey(kudu::client::KuduScanBatch::RowPtr const&, int, int) const in all_types-itest.cc.o
  "kudu::Status kudu::client::KuduScanBatch::RowPtr::Get<kudu::TypeTraits<(kudu::DataType)16> >(int, kudu::TypeTraits<(kudu::DataType)16>::cpp_type*) const", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)16> >::VerifyRowKey(kudu::client::KuduScanBatch::RowPtr const&, int, int) const in all_types-itest.cc.o
  "kudu::Status kudu::client::KuduScanBatch::RowPtr::Get<kudu::TypeTraits<(kudu::DataType)17> >(int, kudu::TypeTraits<(kudu::DataType)17>::cpp_type*) const", referenced from:
      kudu::client::IntKeysTestSetup<kudu::client::KeyTypeWrapper<(kudu::DataType)17> >::VerifyRowKey(kudu::client::KuduScanBatch::RowPtr const&, int, int) const in all_types-itest.cc.o

Change-Id: If280f69b5736737a55862486c98f434cfb8e8072
Reviewed-on: http://gerrit.cloudera.org:8080/11969
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: b8595f8fcb34e42c649b9f90dd5ddec527747d44
Parents: 27baa0c
Author: Andrew Wong <aw...@cloudera.com>
Authored: Tue Nov 20 16:36:01 2018 -0800
Committer: Andrew Wong <aw...@cloudera.com>
Committed: Wed Nov 21 01:21:50 2018 +0000

----------------------------------------------------------------------
 src/kudu/client/scan_batch.cc  |  9 +++++++++
 src/kudu/common/partial_row.cc | 31 +++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/b8595f8f/src/kudu/client/scan_batch.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/scan_batch.cc b/src/kudu/client/scan_batch.cc
index 410d125..ac63c1f 100644
--- a/src/kudu/client/scan_batch.cc
+++ b/src/kudu/client/scan_batch.cc
@@ -311,6 +311,15 @@ Status KuduScanBatch::RowPtr::Get<TypeTraits<STRING> >(int col_idx, Slice* val)
 template
 Status KuduScanBatch::RowPtr::Get<TypeTraits<BINARY> >(int col_idx, Slice* val) const;
 
+template
+Status KuduScanBatch::RowPtr::Get<TypeTraits<DECIMAL32> >(int col_idx, int32_t* val) const;
+
+template
+Status KuduScanBatch::RowPtr::Get<TypeTraits<DECIMAL64> >(int col_idx, int64_t* val) const;
+
+template
+Status KuduScanBatch::RowPtr::Get<TypeTraits<DECIMAL128> >(int col_idx, int128_t* val) const;
+
 Status KuduScanBatch::RowPtr::GetUnscaledDecimal(int col_idx, int128_t* val) const {
   const ColumnSchema& col = schema_->column(col_idx);
   const DataType col_type = col.type_info()->type();

http://git-wip-us.apache.org/repos/asf/kudu/blob/b8595f8f/src/kudu/common/partial_row.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/partial_row.cc b/src/kudu/common/partial_row.cc
index de7d52a..b20ce33 100644
--- a/src/kudu/common/partial_row.cc
+++ b/src/kudu/common/partial_row.cc
@@ -499,6 +499,22 @@ Status KuduPartialRow::Set<TypeTraits<BOOL> >(int col_idx,
                                               bool owned);
 
 template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL32> >(int col_idx,
+                                                   const TypeTraits<DECIMAL32>::cpp_type& val,
+                                                   bool owned);
+
+template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL64> >(int col_idx,
+                                                   const TypeTraits<DECIMAL64>::cpp_type& val,
+                                                   bool owned);
+
+template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL128> >(int col_idx,
+                                                    const TypeTraits<DECIMAL128>::cpp_type& val,
+                                                    bool owned);
+
+
+template
 Status KuduPartialRow::Set<TypeTraits<INT8> >(const Slice& col_name,
                                               const TypeTraits<INT8>::cpp_type& val,
                                               bool owned);
@@ -554,6 +570,21 @@ Status KuduPartialRow::Set<TypeTraits<BINARY> >(const Slice& col_name,
                                                 const TypeTraits<BINARY>::cpp_type& val,
                                                 bool owned);
 
+template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL32> >(const Slice& col_name,
+                                                   const TypeTraits<DECIMAL32>::cpp_type& val,
+                                                   bool owned);
+
+template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL64> >(const Slice& col_name,
+                                                   const TypeTraits<DECIMAL64>::cpp_type& val,
+                                                   bool owned);
+
+template
+Status KuduPartialRow::Set<TypeTraits<DECIMAL128> >(const Slice& col_name,
+                                                    const TypeTraits<DECIMAL128>::cpp_type& val,
+                                                    bool owned);
+
 //------------------------------------------------------------
 // Getters
 //------------------------------------------------------------


[4/4] kudu git commit: build: don't use constexpr lambdas

Posted by al...@apache.org.
build: don't use constexpr lambdas

We use constexpr lambdas, and some compilers are fine with it.
Officially, they aren't supported until C++17, so this patch replaces
such instances with const lambdas.

This would yield a build failure in some environments.

See https://en.cppreference.com/w/cpp/language/lambda for more details
about constexpr lambdas in C++17.

Change-Id: I9d1bdb84d9e6ee5c6a4a920d46f5daee68975208
Reviewed-on: http://gerrit.cloudera.org:8080/11970
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 66b06de7b14621f821141ac7f9ec4ba96cad5af1
Parents: 7437626
Author: Andrew Wong <aw...@cloudera.com>
Authored: Tue Nov 20 16:37:30 2018 -0800
Committer: Andrew Wong <aw...@cloudera.com>
Committed: Wed Nov 21 01:41:57 2018 +0000

----------------------------------------------------------------------
 src/kudu/tablet/compaction_policy.cc   | 2 +-
 src/kudu/tools/rebalance_algo-test.cc  | 4 ++--
 src/kudu/tserver/tablet_server-test.cc | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/66b06de7/src/kudu/tablet/compaction_policy.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction_policy.cc b/src/kudu/tablet/compaction_policy.cc
index 54350eb..6dee57c 100644
--- a/src/kudu/tablet/compaction_policy.cc
+++ b/src/kudu/tablet/compaction_policy.cc
@@ -158,7 +158,7 @@ class BoundCalculator {
       return;
     }
 
-    constexpr auto compareByDescendingDensity =
+    const auto compareByDescendingDensity =
         [](const RowSetInfo* a, const RowSetInfo* b) {
           return a->density() > b->density();
         };

http://git-wip-us.apache.org/repos/asf/kudu/blob/66b06de7/src/kudu/tools/rebalance_algo-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/rebalance_algo-test.cc b/src/kudu/tools/rebalance_algo-test.cc
index 6a5e5a8..092ac4d 100644
--- a/src/kudu/tools/rebalance_algo-test.cc
+++ b/src/kudu/tools/rebalance_algo-test.cc
@@ -235,8 +235,8 @@ void VerifyLocationRebalancingMoves(const TestClusterConfig& cfg) {
         // Here it's necessary to normalize both the reference and the actual
         // results before performing element-to-element comparison.
         vector<TableReplicaMove> ref_moves(cfg.expected_moves);
-        constexpr auto kMovesComparator = [](const TableReplicaMove& lhs,
-                                             const TableReplicaMove& rhs) {
+        const auto kMovesComparator = [](const TableReplicaMove& lhs,
+                                         const TableReplicaMove& rhs) {
           if (lhs.table_id != rhs.table_id) {
             return lhs.table_id < rhs.table_id;
           }

http://git-wip-us.apache.org/repos/asf/kudu/blob/66b06de7/src/kudu/tserver/tablet_server-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server-test.cc b/src/kudu/tserver/tablet_server-test.cc
index a12e99b..bfdd7ab 100644
--- a/src/kudu/tserver/tablet_server-test.cc
+++ b/src/kudu/tserver/tablet_server-test.cc
@@ -3434,7 +3434,7 @@ TEST_F(TabletServerTest, TestScannerCheckMatchingUser) {
     checksum_val = checksum_resp.checksum();
   }
 
-  constexpr auto verify_authz_error = [] (const Status& s) {
+  const auto verify_authz_error = [] (const Status& s) {
     EXPECT_TRUE(s.IsRemoteError()) << s.ToString();
     ASSERT_STR_CONTAINS(s.ToString(), "Not authorized");
   };