You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/05/25 12:46:34 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #1771: HBASE-24425 Run hbck_chore_run and catalogjanitor_run on draw of 'HBC…

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:
users@infra.apache.org