From d6f9eab4be16dee0dd45ea9f1e0dd17ef8a74b7b Mon Sep 17 00:00:00 2001 From: chenheng Date: Sun, 25 Sep 2016 10:48:01 +0800 Subject: [PATCH] HBASE-16677 Add table size (total store file size) to table page (Guang Yang) --- .../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 2c749ffb727..37209c7c263 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -72,6 +72,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; + %>