You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2018/08/23 22:51:21 UTC

[2/6] kudu git commit: [webui] Add partition and on-disk size to /tablet

[webui] Add partition and on-disk size to /tablet

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


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

Branch: refs/heads/master
Commit: ec419c64e74834082a894bb3e87975bc86478f6d
Parents: a6baa72
Author: Will Berkeley <wd...@gmail.org>
Authored: Tue Aug 21 13:03:49 2018 -0700
Committer: Will Berkeley <wd...@gmail.com>
Committed: Wed Aug 22 22:13:00 2018 +0000

----------------------------------------------------------------------
 src/kudu/tserver/tserver_path_handlers.cc | 7 ++++++-
 www/tablet.mustache                       | 5 +++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/ec419c64/src/kudu/tserver/tserver_path_handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tserver_path_handlers.cc b/src/kudu/tserver/tserver_path_handlers.cc
index ddaa3c1..2f6c4b5 100644
--- a/src/kudu/tserver/tserver_path_handlers.cc
+++ b/src/kudu/tserver/tserver_path_handlers.cc
@@ -412,7 +412,12 @@ void TabletServerPathHandlers::HandleTabletPage(const Webserver::WebRequest& req
   output->Set("role", RaftPeerPB::Role_Name(role));
   output->Set("table_name", table_name);
 
-  const Schema& schema = replica->tablet_metadata()->schema();
+  const auto& tmeta = replica->tablet_metadata();
+  const Schema& schema = tmeta->schema();
+  output->Set("partition",
+              tmeta->partition_schema().PartitionDebugString(tmeta->partition(), schema));
+  output->Set("on_disk_size", HumanReadableNumBytes::ToString(replica->OnDiskSize()));
+
   SchemaToJson(schema, output);
 }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/ec419c64/www/tablet.mustache
----------------------------------------------------------------------
diff --git a/www/tablet.mustache b/www/tablet.mustache
index 8f80581..aa83558 100644
--- a/www/tablet.mustache
+++ b/www/tablet.mustache
@@ -23,6 +23,11 @@ under the License.
   <h1>Tablet {{tablet_id}} ({{state}}/{{role}})</h1>
   <h3>Table {{table_name}}</h3>
 
+  <table class='table'>
+    <tr><td>Partition</td><td>{{partition}}</td></tr>
+    <tr><td>On-disk Size</td><td>{{on_disk_size}}</td></tr>
+  </table>
+
   <h2>Schema</h2>
   <table class='table table-striped'>
     <thead><tr>