private void runCheckWithRetry()
    throws IOException, ClassNotFoundException, InterruptedException {
    try {
      runCheck();
    } catch (Throwable t) {
      LOG.warn("Received " + StringUtils.stringifyException(t));
      LOG.warn("Running the check MR Job again to see whether an ephemeral problem or not");
      runCheck();
      throw t; // we should still fail the test even if second retry succeeds
    }
    // everything green
  }
Class that does the actual checking of the links. All links in the chain should be grouped and
sorted when sent to this class. Then the chain will be traversed making sure that no link is
missing and that the chain is the correct length. This will throw an exception if anything is
not correct. That causes the job to fail if any data is corrupt.
hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java