public void printDispersionScores(
     TableName table,
     SnapshotOfRegionAssignmentFromMeta snapshot,
     int numRegions,
     FavoredNodesPlan newPlan,
     boolean simplePrint) {
   if (!this.targetTableSet.isEmpty() && !this.targetTableSet.contains(table)) {
     return;
   }
   AssignmentVerificationReport report = new AssignmentVerificationReport();
   report.fillUpDispersion(table, snapshot, newPlan);
   List<Float> dispersion = report.getDispersionInformation();
   if (simplePrint) {
     DecimalFormat df = new java.text.DecimalFormat("#.##");
     System.out.println(
         "\tAvg dispersion score: "
             + df.format(dispersion.get(0))
             + " hosts;\tMax dispersion score: "
             + df.format(dispersion.get(1))
             + " hosts;\tMin dispersion score: "
             + df.format(dispersion.get(2))
             + " hosts;");
   } else {
     LOG.info(
         "For Table: "
             + table
             + " ; #Total Regions: "
             + numRegions
             + " ; The average dispersion score is "
             + dispersion.get(0));
   }
 }
  /**
   * Verify the region placement is consistent with the assignment plan
   *
   * @param isDetailMode
   * @return reports
   * @throws IOException
   */
  public List<AssignmentVerificationReport> verifyRegionPlacement(boolean isDetailMode)
      throws IOException {
    System.out.println(
        "Start to verify the region assignment and " + "generate the verification report");
    // Get the region assignment snapshot
    SnapshotOfRegionAssignmentFromMeta snapshot = this.getRegionAssignmentSnapshot();

    // Get all the tables
    Set<TableName> tables = snapshot.getTableSet();

    // Get the region locality map
    Map<String, Map<String, Float>> regionLocalityMap = null;
    if (this.enforceLocality == true) {
      regionLocalityMap = FSUtils.getRegionDegreeLocalityMappingFromFS(conf);
    }
    List<AssignmentVerificationReport> reports = new ArrayList<AssignmentVerificationReport>();
    // Iterate all the tables to fill up the verification report
    for (TableName table : tables) {
      if (!this.targetTableSet.isEmpty() && !this.targetTableSet.contains(table)) {
        continue;
      }
      AssignmentVerificationReport report = new AssignmentVerificationReport();
      report.fillUp(table, snapshot, regionLocalityMap);
      report.print(isDetailMode);
      reports.add(report);
    }
    return reports;
  }