private void verifyRegions(SnapshotManifest manifest, boolean verifyRegions) throws IOException {
    List<RegionInfo> regions = services.getAssignmentManager().getTableRegions(tableName, false);
    // Remove the non-default regions
    RegionReplicaUtil.removeNonDefaultRegions(regions);

    Map<String, SnapshotRegionManifest> regionManifests = manifest.getRegionManifestsMap();
    if (regionManifests == null) {
      String msg = "Snapshot " + ClientSnapshotDescriptionUtils.toString(snapshot) + " looks empty";
      LOG.error(msg);
      throw new CorruptedSnapshotException(msg);
    }

    String errorMsg = "";
    boolean hasMobStore = false;
    // the mob region is a dummy region, it's not a real region in HBase.
    // the mob region has a special name, it could be found by the region name.
    if (regionManifests.get(MobUtils.getMobRegionInfo(tableName).getEncodedName()) != null) {
      hasMobStore = true;
    }
    int realRegionCount = hasMobStore ? regionManifests.size() - 1 : regionManifests.size();
    if (realRegionCount != regions.size()) {
      errorMsg =
        "Regions moved during the snapshot '" + ClientSnapshotDescriptionUtils.toString(snapshot)
          + "'. expected=" + regions.size() + " snapshotted=" + realRegionCount + ".";
      LOG.error(errorMsg);
    }

    // Verify RegionInfo
    if (verifyRegions) {
      for (RegionInfo region : regions) {
        SnapshotRegionManifest regionManifest = regionManifests.get(region.getEncodedName());
        if (regionManifest == null) {
          // could happen due to a move or split race.
          String mesg = " No snapshot region directory found for region:" + region;
          if (errorMsg.isEmpty()) {
            errorMsg = mesg;
          }
          LOG.error(mesg);
          continue;
        }

        verifyRegionInfo(region, regionManifest);
      }
      if (!errorMsg.isEmpty()) {
        throw new CorruptedSnapshotException(errorMsg);
      }

      // Verify Snapshot HFiles
      // Requires the root directory file system as HFiles are stored in the root directory
      SnapshotReferenceUtil.verifySnapshot(services.getConfiguration(),
        CommonFSUtils.getRootDirFileSystem(services.getConfiguration()), manifest);
    }
  }
Check that all the regions in the snapshot are valid, and accounted for.
@param manifest snapshot manifest to inspect
@throws IOException if we can't reach hbase:meta or read the files from the FS
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/MasterSnapshotVerifier.java