if (!wlPath.isAbsoluteAndSchemeAuthorityNull()) { String wlPathScheme = wlPath.toUri().getScheme(); String coprocPathScheme = coprocPath.toUri().getScheme();
if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) { throw new IOException("ViewFs: Non absolute mount name in config:" + src);
private Path makeAbsolute(Path path) { if (path == null) { return null; } if (path.isAbsolute() && !path.isAbsoluteAndSchemeAuthorityNull()) { return path; } Path newPath = new Path(workingDir, path); return newPath; }
allocPath = new Path(url.getProtocol(), null, url.getPath()); } else if (allocPath.isAbsoluteAndSchemeAuthorityNull()){ allocPath = new Path("file", null, allocFilePath);
if (inputList.toString().equals("-")) { in = System.in; } else if (inputList.isAbsoluteAndSchemeAuthorityNull()) { in = new BufferedInputStream(new FileInputStream(inputList.toString())); } else {
if (inputList.toString().equals("-")) { in = System.in; } else if (inputList.isAbsoluteAndSchemeAuthorityNull()) { in = new BufferedInputStream(new FileInputStream(inputList.toString())); } else {
if (inputList.toString().equals("-")) { in = System.in; } else if (inputList.isAbsoluteAndSchemeAuthorityNull()) { in = new BufferedInputStream(new FileInputStream(inputList.toString())); } else {
/** * Parse a URI which can be HDFS, S3, SWIFT, WEBHDFS,etc. In either case it * should be on the same fs as the warehouse directory. */ public static String parseURI(String warehouseDir, String uri, boolean isLocal) throws URISyntaxException { Path warehouseDirPath = new Path(warehouseDir); Path uriPath = new Path(uri); if (uriPath.isAbsolute()) { // Merge warehouseDir and uri only when there is no scheme and authority // in uri. if (uriPath.isAbsoluteAndSchemeAuthorityNull()) { uriPath = uriPath.makeQualified(warehouseDirPath.toUri(), warehouseDirPath); } String uriScheme = uriPath.toUri().getScheme(); String uriAuthority = uriPath.toUri().getAuthority(); if (StringUtils.isEmpty(uriScheme) || isLocal) { uriScheme = LOCAL_FILE_SCHEMA; uriAuthority = ""; } uriPath = new Path(uriScheme + AUTHORITY_PREFIX + StringUtils.trimToEmpty(uriAuthority) + Path.getPathWithoutSchemeAndAuthority(uriPath)); } else { // don't support relative path throw new IllegalArgumentException("Invalid URI " + uri + "."); } return uriPath.toUri().toString(); }
@VisibleForTesting protected static AccessURI parseURI(String uri, boolean isLocal) throws SemanticException { try { HiveConf conf = SessionState.get().getConf(); String warehouseDir = conf.getVar(ConfVars.METASTOREWAREHOUSE); Path warehousePath = new Path(warehouseDir); if (warehousePath.isAbsoluteAndSchemeAuthorityNull()) { FileSystem fs = FileSystem.get(conf); warehouseDir = fs.makeQualified(warehousePath).toUri().toString(); } return new AccessURI(PathUtils.parseURI(warehouseDir, uri, isLocal)); } catch (Exception e) { throw new SemanticException("Error parsing URI " + uri + ": " + e.getMessage(), e); } }
if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) { throw new IOException("ViewFs:Non absolute mount name in config:" + src);
if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) { throw new IOException("ViewFs:Non absolute mount name in config:" + src);
if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) { throw new IOException("ViewFs:Non absolute mount name in config:" + src);
if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) { throw new IOException("ViewFs:Non absolute mount name in config:" + src);
if (!rawPath.isAbsoluteAndSchemeAuthorityNull()) { return null;