code: private void verifyFile(String[] args, int startIndex) {
      Path root = null;
      if (args.length <= startIndex) {
        throw new IllegalArgumentException("too few arguments");
      }
      String arg = args[startIndex];
      root = new Path(arg);
      try {
        FileSystem fs = root.getFileSystem(conf);
        // Make sure default uri is the same as root  
        conf.set(FileSystem.FS_DEFAULT_NAME_KEY, fs.getUri().toString());
        FileVerifier fv = new FileVerifier(conf);
        fv.verifyFile(root, System.out);
      } catch (IOException ex) {
        System.err.println("verifyFile: " + ex);
      }
    }
docs: Scan file and verify the checksums match the checksum store if have
  args[] contains the root where we need to check