private FileStatus[] verifyFilePathExists(URI fromURI) throws SemanticException {

    FileStatus[] srcs;

    // local mode implies that scheme should be "file"
    // we can change this going forward
    if (isLocal && !fromURI.getScheme().equals("file")) {
      throw new SemanticException(ASTErrorUtils.getMsg(
          ErrorMsg.ILLEGAL_PATH.getMsg(), fromTree,
          "Source file system should be \"file\" if \"local\" is specified"));
    }
    try {
      FileSystem fileSystem = FileSystem.get(fromURI, conf);
      srcs = matchFilesOrDir(fileSystem, new Path(fromURI));
      if (srcs == null || srcs.length == 0) {
        throw new SemanticException(ASTErrorUtils.getMsg(
            ErrorMsg.INVALID_PATH.getMsg(), fromTree,
            "No files matching path " + fromURI));
      }
    } catch (IOException e) {
      throw new SemanticException(ASTErrorUtils.getMsg(
              ErrorMsg.INVALID_PATH.getMsg(), fromTree), e);
    }
    return srcs;
  }
Verifies the file path existence. If the path is a directory, then it is
verified to not be a glob pattern. If the path is a file, then it is
verified to be a valid file name.
ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java