code: public static boolean checkFile(Configuration conf,
        FileSystem srcFs, FileSystem parityFs,
        Path srcPath, Path parityPath, Codec codec, 
        Progressable reporter,
        boolean sourceOnly) 
            throws IOException, InterruptedException {
      FileStatus stat = srcFs.getFileStatus(srcPath);
      long blockSize = stat.getBlockSize();
      long len = stat.getLen();
      
      List<Long> offsets = new ArrayList<Long>();
      // check a small part of each stripe.
      for (int i = 0; i * blockSize < len; i += codec.stripeLength) {
        offsets.add(i * blockSize);
      }
      
      for (long blockOffset : offsets) {
        if (sourceOnly) {
          if (!verifySourceFile(conf, srcFs,stat,
              codec, blockOffset, reporter)) {
            return false;
          }
        }
        else {
          if (!verifyFile(conf, srcFs, parityFs, stat,
              parityPath, codec, blockOffset, reporter)) {
            return false;
          }
        }
      }
      
      return true;
    }
docs: Check a file.