public void parse(File file) {
    Pattern p = Pattern.compile(" *--! ?qt:([a-z]+):?(.*)");

    try (BufferedReader br = new BufferedReader(new FileReader(file))) {
      for (String line = br.readLine(); line != null; line = br.readLine()) {
        String l = line.trim();
        Matcher m = p.matcher(l);
        if (m.matches()) {
          String sub = m.group(1);
          String arguments = m.group(2);
          if (!handlers.containsKey(sub)) {
            throw new IOException("Don't know how to handle " + sub + "  line: " + l);
          }
          handlers.get(sub).processArguments(arguments);
        }
      }
    } catch (IOException e) {
      throw new RuntimeException("Error while processing file: " + file, e);
    }
  }
Provides facilities to invoke {@link QTestOptionHandler}-s.

Enables to dispatch option arguments to a specific option handler.
The option invocation format is '--! qt:&lt;optionName&gt;:&lt;optionArgs&gt;

Please refer to specific implementations of {@link QTestOptionHandler} for more detailed information about them.
itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestOptionDispatcher.java