@Override public Path matchingFileSystem(Path source, String[] options) { try { if (ViewFSUtils.isViewFS(source, hadoopConf)) { return ViewFSUtils.matchingFileSystem(source, options, hadoopConf); } } catch (IOException e) { throw new RuntimeException(e); } URI uri1 = source.toUri(); for (String option : options) { URI uri3 = URI.create(option); if (uri1.getScheme().equals(uri3.getScheme())) { String a1 = uri1.getAuthority(); String a2 = uri3.getAuthority(); if ((a1 == null && a2 == null) || (a1 != null && a1.equals(a2))) return new Path(option); } } return null; }
public static boolean isViewFS(Path source, Configuration conf) throws IOException { return isViewFS(source.getFileSystem(conf)); }
public static Path matchingFileSystem(Path source, String[] options, Configuration conf) throws IOException { if (!isViewFS(source, conf)) throw new IllegalArgumentException("source " + source + " is not view fs"); if (isViewFS(optionPath, conf)) { String optionUriPath = optionPath.toUri().getPath();
@Override public Path matchingFileSystem(Path source, String[] options) { try { if (ViewFSUtils.isViewFS(source, CachedConfiguration.getInstance())) { return ViewFSUtils.matchingFileSystem(source, options, CachedConfiguration.getInstance()); } } catch (IOException e) { throw new RuntimeException(e); } URI uri1 = source.toUri(); for (String option : options) { URI uri3 = URI.create(option); if (uri1.getScheme().equals(uri3.getScheme())) { String a1 = uri1.getAuthority(); String a2 = uri3.getAuthority(); if ((a1 == null && a2 == null) || (a1 != null && a1.equals(a2))) return new Path(option); } } return null; }
if (ViewFSUtils.isViewFS(ns)) { Path newSource = ns.resolvePath(source); if (!newSource.equals(source) && newSource.toUri().getScheme() != null) {
public static boolean isViewFS(Path source, Configuration conf) throws IOException { return isViewFS(source.getFileSystem(conf)); }
public static Path matchingFileSystem(Path source, String[] options, Configuration conf) throws IOException { if (!isViewFS(source, conf)) throw new IllegalArgumentException("source " + source + " is not view fs"); if (isViewFS(optionPath, conf)) { String optionUriPath = optionPath.toUri().getPath();
if (ViewFSUtils.isViewFS(ns)) { Path newSource = ns.resolvePath(source); if (!newSource.equals(source) && newSource.toUri().getScheme() != null) {