@Override
  public int run(String[] args) throws Exception {
    if (args.length == 0) {
      printUsage();
      return AbstractHBaseTool.EXIT_FAILURE;
    }

    Tool tool;

    switch (args[0]) {
      case VALIDATE_CP_NAME:
        tool = new CoprocessorValidator();
        break;
      case VALIDATE_DBE_NAME:
        tool = new DataBlockEncodingValidator();
        break;
      case VALIDATE_HFILE:
        tool = new HFileContentValidator();
        break;
      case "-h":
        printUsage();
        return AbstractHBaseTool.EXIT_FAILURE;
      default:
        System.err.println("Unknown command: " + args[0]);
        printUsage();
        return AbstractHBaseTool.EXIT_FAILURE;
    }

    tool.setConf(getConf());
    return tool.run(Arrays.copyOfRange(args, 1, args.length));
  }
Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
<p>
Available validations:
<ul>
<li>validate-cp: Validates Co-processors compatibility</li>
<li>validate-dbe: Check Data Block Encoding for column families</li>
<li>validate-hfile: Check for corrupted HFiles</li>
</ul>
</p>
hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java