code: private void findMissingParityFiles(String[] args, int startIndex) {
      boolean restoreReplication = false;
      Path root = null;
      for (int i = startIndex; i < args.length; i++) {
        String arg = args[i];
        if (arg.equals("-r")) {
          restoreReplication = true;
        } else {
          root = new Path(arg);
        }
      }
      if (root == null) {
        throw new IllegalArgumentException("Too few arguments");
      }
      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());
        MissingParityFiles mParFiles = new MissingParityFiles(conf, restoreReplication);
        mParFiles.findMissingParityFiles(root, System.out);
      } catch (IOException ex) {
        System.err.println("findMissingParityFiles: " + ex);
      }
    }
docs: Find the files that do not have a corresponding parity file and have replication
  factor less that 3
  args[] contains the root where we need to check