You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2019/09/12 03:33:04 UTC

[hbase] branch branch-2.1 updated: HBASE-22993 HBCK report UI showed -1 if hbck chore not running (#610)

This is an automated email from the ASF dual-hosted git repository.

zghao pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new ba95883  HBASE-22993 HBCK report UI showed -1 if hbck chore not running (#610)
ba95883 is described below

commit ba9588320d6a6113961f584838914deb7bc1c507
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Thu Sep 12 09:09:57 2019 +0800

    HBASE-22993 HBCK report UI showed -1 if hbck chore not running (#610)
    
    Signed-off-by: stack <st...@apache.org>
---
 .../src/main/resources/hbase-webapps/master/hbck.jsp      | 15 ++++++++++++---
 .../hadoop/hbase/master/assignment/TestHbckChore.java     |  4 ++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp b/hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
index 6ae5d68..7b4e164 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
@@ -86,9 +86,13 @@
       <h1>HBCK Chore Report</h1>
       <p>
         <% if (hbckChore.isDisabled()) { %>
-        <span>HBCK chore is currently disabled. Set hbase.master.hbck.chore.interval > 0 in the config & do a rolling-restart to enable it.</span>
+          <span>HBCK chore is currently disabled. Set hbase.master.hbck.chore.interval > 0 in the config & do a rolling-restart to enable it.</span>
+        <% } else if (startTimestamp == 0 && endTimestamp == 0){ %>
+          <span>No report created. Execute <i>hbck_chore_run</i> in hbase shell to generate a new sub-report.</span>
+        <% } else if (startTimestamp > 0 && endTimestamp == 0){ %>
+          <span>Checking started at <%= iso8601start %>. Please wait for checking to generate a new sub-report.</span>
         <% } else { %>
-        <span>Checking started at <%= iso8601start %> and generated report at <%= iso8601end %>. Execute <i>hbck_chore_run</i> in hbase shell to generate a new sub-report.</span>
+          <span>Checking started at <%= iso8601start %> and generated report at <%= iso8601end %>. Execute <i>hbck_chore_run</i> in hbase shell to generate a new sub-report.</span>
         <% } %>
       </p>
     </div>
@@ -192,7 +196,12 @@
   <div class="row inner_header">
     <div class="page-header">
       <h1>CatalogJanitor <em>hbase:meta</em> Consistency Issues</h1>
-      <p><span>Report created: <%= iso8601reportTime %> (now=<%= iso8601Now %>). Run <i>catalogjanitor_run</i> in hbase shell to generate a new sub-report.</span></p>
+      <p>
+        <% if (report != null) { %>
+          <span>Report created: <%= iso8601reportTime %> (now=<%= iso8601Now %>). Run <i>catalogjanitor_run</i> in hbase shell to generate a new sub-report.</span></p>
+        <% } else { %>
+          <span>No report created. Run <i>catalogjanitor_run</i> in hbase shell to generate a new sub-report.</span>
+        <% } %>
     </div>
   </div>
   <% if (report != null && !report.isEmpty()) { %>
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestHbckChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestHbckChore.java
index 32a23b8..7ade9c7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestHbckChore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestHbckChore.java
@@ -188,7 +188,7 @@ public class TestHbckChore extends TestAssignmentManagerBase {
         .setEndKey(Bytes.toBytes(1)).setSplit(true).setOffline(true).setRegionId(0).build();
     String regionName = hri.getEncodedName();
     rsDispatcher.setMockRsExecutor(new GoodRsExecutor());
-    Future<byte[]> future = submitProcedure(createAssignProcedure(hri));
+    Future<byte[]> future = submitProcedure(am.createAssignProcedure(hri));
     waitOnFuture(future);
 
     List<ServerName> serverNames = master.getServerManager().getOnlineServersList();
@@ -236,4 +236,4 @@ public class TestHbckChore extends TestAssignmentManagerBase {
     ran = lastRunTime != hbckChoreWithChangedConf.getCheckingEndTimestamp();
     assertFalse(ran);
   }
-}
\ No newline at end of file
+}