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/27 03:48:34 UTC

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

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



##########
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:
       Yeah. Was thinking about it. Though the rare SE not the end of the world. Added something at your prompting.... it looks like this when generated...
   
   ```
      if (!Boolean.parseBoolean(cacheParameterValue)) {
        // Run the two reporters inline w/ drawing of the page. If exception, will show in page draw.
        try {
          master.getMasterRpcServices().runHbckChore(null, null);
        } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) {
          out.write("Failed generating a new hbck_chore report; using cache; try again or run hbck_chore_run in the shell: " + se.getMessage() + "\n");
        }
        try {
          master.getMasterRpcServices().runCatalogScan(null, null);
        } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) {
          out.write("Failed generating a new catalogjanitor report; using cache; try again or run catalogjanitor_run in the shell: " + se.getMessage() + "\n");
        }
      }
   ```




----------------------------------------------------------------
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