From f5351e2dbd29ab32dbd4044844feb6a94d9fea98 Mon Sep 17 00:00:00 2001 From: chenheng Date: Sun, 25 Sep 2016 09:49:50 +0800 Subject: [PATCH] HBASE-16677 Add table size (total store file size) to table page --- .../resources/hbase-webapps/master/table.jsp | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp index 27388e78210..86b70c7aa72 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -73,6 +73,25 @@ } String action = request.getParameter("action"); String key = request.getParameter("key"); + long totalStoreFileSizeMB = 0; + + final String numRegionsParam = request.getParameter("numRegions"); + // By default, the page render up to 10000 regions to improve the page load time + int numRegionsToRender = 10000; + if (numRegionsParam != null) { + // either 'all' or a number + if (numRegionsParam.equals("all")) { + numRegionsToRender = -1; + } else { + try { + numRegionsToRender = Integer.parseInt(numRegionsParam); + } catch (NumberFormatException ex) { + // ignore + } + } + } + int numRegions = 0; + %>