[ 
https://issues.apache.org/jira/browse/HBASE-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103837#comment-13103837
 ] 

Jonathan Hsieh commented on HBASE-4375:
---------------------------------------

In most other places in hbck, it prints out via System.out.println.  I just 
tried to stay consistent with it. 

Some examples:

{code}
   public synchronized void reportError(ERROR_CODE errorCode, String message) {
      errorList.add(errorCode);
      if (!summary) {
        System.out.println("ERROR: " + message);
      }
      errorCount++;
      showProgress = 0;
    }
{code}

{code}
   public synchronized int summarize() {
      System.out.println(Integer.toString(errorCount) +
                         " inconsistencies detected.");
      if (errorCount == 0) {
        System.out.println("Status: OK");
        return 0;
      } else {
        System.out.println("Status: INCONSISTENT");
        return -1;
      }
    }
{code}

{code}
 /**
   * Prints summary of all tables found on the system.
   */
  private void printTableSummary() {
    System.out.println("Summary:");
    for (TInfo tInfo : tablesInfo.values()) {
      if (errors.tableHasErrors(tInfo)) {
        System.out.println("Table " + tInfo.getName() + " is inconsistent.");
      } else {
        System.out.println("  " + tInfo.getName() + " is okay.");
      }
      System.out.println("    Number of regions: " + tInfo.getNumRegions());
      System.out.print("    Deployed on: ");
      for (HServerAddress server : tInfo.deployedOn) {
        System.out.print(" " + server.toString());
      }
      System.out.println();
    }
  }
{code}

> [hbck] Add region coverage visualization to hbck
> ------------------------------------------------
>
>                 Key: HBASE-4375
>                 URL: https://issues.apache.org/jira/browse/HBASE-4375
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.94.0, 0.90.5
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>         Attachments: 
> 0001-HBASE-4375-Add-region-coverage-visualization-to-hbck.patch
>
>
> After HBASE-4322 and HBASE-4321, we now have an accurate region splits / 
> coverage map for properly identifying holes, overlaps, backwards regions and 
> other kinds of problems in the .META. table.  hbck should display this 
> information so that someone can fix this.
> A simple version for a table with regions [,A], [A,B], [A,C], [C,] and would 
> dump out something like this (showing an overlap in [A,B])
> :  ['table,,..', 'table,A,..']
> A: ['table,A,..', 'B'] ['table,A,..', 'C']
> B: ['table,A,..', 'C']  
> C: ['table,C', '']
> null:
> My first thought is '-details' should this dump the full region map including 
> all good and bad regions.  Without -details, any errors should dump info with 
> some context -- dump one region before problems, problem regions, and then 
> one post problem region.
> Alternately we could add a new option or options to dump the region split map.
> What is the preferred way to toggle display of this information in hbck?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to