virajjasani commented on a change in pull request #1771:
URL: https://github.com/apache/hbase/pull/1771#discussion_r429914409



##########
File path: hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
##########
@@ -37,9 +37,17 @@
 <%@ page import="org.apache.hadoop.hbase.util.Pair" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor.Report" %>
+<%@ page import="org.apache.hadoop.hbase.util.Threads" %>
 <%
+  final String cacheParameterValue = request.getParameter("cache");
+  boolean cache = Boolean.valueOf(cacheParameterValue);

Review comment:
       nit: Since we need `boolean`, we can directly use: 
`Boolean.parseBoolean(cacheParameterValue)`

##########
File path: hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
##########
@@ -37,9 +37,17 @@
 <%@ page import="org.apache.hadoop.hbase.util.Pair" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor.Report" %>
+<%@ page import="org.apache.hadoop.hbase.util.Threads" %>

Review comment:
       Not being used it seems.

##########
File path: hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
##########
@@ -37,9 +37,17 @@
 <%@ page import="org.apache.hadoop.hbase.util.Pair" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor" %>
 <%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor.Report" %>
+<%@ page import="org.apache.hadoop.hbase.util.Threads" %>
 <%
+  final String cacheParameterValue = request.getParameter("cache");
+  boolean cache = Boolean.valueOf(cacheParameterValue);
   final HMaster master = (HMaster) 
getServletContext().getAttribute(HMaster.MASTER);
   pageContext.setAttribute("pageTitle", "HBase Master HBCK Report: " + 
master.getServerName());
+  if (!cache) {
+    // Run the two reporters inline w/ drawing of the page. If exception, will 
show in page draw.
+    master.getMasterRpcServices().runHbckChore(null, null);
+    master.getMasterRpcServices().runCatalogScan(null, null);

Review comment:
       MasterRpcServices throw `ServiceException` for both `runHbckChore` and 
`runCatalogScan`. Maybe we can handle it and print some nice error message?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to