public static URI getURI(String path) throws URISyntaxException {
    if (path == null) {
      return null;
    }

    URI uri = new URI(path);
    if (uri.getScheme() == null) {
      // if no scheme in the path, we assume it's file on local fs.
      uri = new File(path).toURI();
    }

    return uri;
  }
Get the URI of the path. Assume to be local file system if no scheme.
common/src/java/org/apache/hadoop/hive/common/FileUtils.java