private boolean skipIfErrorOrTransient()

in hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java [2890:2922]


  private boolean skipIfErrorOrTransient(HbckInfo hbi) throws IOException {
    // Check whether this is an actual error, or just transient state where parent
    // is not cleaned
    if (hbi.metaEntry.splitA != null && hbi.metaEntry.splitB != null) {
      // check that split daughters are there
      HbckInfo infoA = this.regionInfoMap.get(hbi.metaEntry.splitA.getEncodedName());
      HbckInfo infoB = this.regionInfoMap.get(hbi.metaEntry.splitB.getEncodedName());
      if (infoA != null && infoB != null) {
        // We already processed or will process daughters. Move on, nothing to see here.
        hbi.setSkipChecks(true);
        return true;
      }
    }

    // For Replica region, we need to do a similar check. If replica is not split successfully,
    // error is going to be reported against primary daughter region.
    if (hbi.getReplicaId() != RegionInfo.DEFAULT_REPLICA_ID) {
      LOG.info("Region " + hbi + " is a split parent in META, in HDFS, "
          + "and not deployed on any region server. This may be transient.");
      hbi.setSkipChecks(true);
      return true;
    }

    errors.reportError(ErrorReporter.ERROR_CODE.LINGERING_SPLIT_PARENT, "Region "
        + hbi + " is a split parent in META, in HDFS, "
        + "and not deployed on any region server. This could be transient, "
        + "consider to run the catalog janitor first!");
    if (shouldFixSplitParents()) {
      setShouldRerun();
      resetSplitParent(hbi);
    }
    return false;
  }