private List<URI> resolveAndDownloadInternal(URI source, String subDir,
      boolean isLocalAllowed) throws URISyntaxException, IOException {
    switch (getURLType(source)) {
    case FILE: return isLocalAllowed ? Collections.singletonList(source) : null;
    case IVY: return dependencyResolver.downloadDependencies(source);
    case HDFS:
    case OTHER:
      return Collections.singletonList(createURI(downloadResource(source, subDir)));
    default: throw new AssertionError(getURLType(source));
    }
  }
@param path
@return URI corresponding to the path.
ql/src/java/org/apache/hadoop/hive/ql/util/ResourceDownloader.java