@Override public void initialize(URI name, Configuration conf) throws IOException { // create a proxy for the local filesystem // the scheme/authority serving as the proxy is derived // from the supplied URI this.scheme = name.getScheme(); String nameUriString = name.toString(); String authority = name.getAuthority() != null ? name.getAuthority() : ""; String proxyUriString = scheme + "://" + authority + "/"; fs = ShimLoader.getHadoopShims().createProxyFileSystem(localFs, URI.create(proxyUriString)); fs.initialize(name, conf); }
@Override public void initialize(URI name, Configuration conf) throws IOException { // create a proxy for the local filesystem // the scheme/authority serving as the proxy is derived // from the supplied URI this.scheme = name.getScheme(); String nameUriString = name.toString(); String authority = name.getAuthority() != null ? name.getAuthority() : ""; String proxyUriString = scheme + "://" + authority + "/"; fs = ShimLoader.getHadoopShims().createProxyFileSystem(localFs, URI.create(proxyUriString)); fs.initialize(name, conf); }
@Override public void initialize(URI name, Configuration conf) throws IOException { // create a proxy for the local filesystem // the scheme/authority serving as the proxy is derived // from the supplied URI String scheme = name.getScheme(); String nameUriString = name.toString(); if (Shell.WINDOWS) { // Replace the encoded backward slash with forward slash // Remove the windows drive letter nameUriString = nameUriString.replaceAll("%5C", "/") .replaceFirst("/[c-zC-Z]:", "/") .replaceFirst("^[c-zC-Z]:", ""); name = URI.create(nameUriString); } String authority = name.getAuthority() != null ? name.getAuthority() : ""; String proxyUriString = nameUriString + "://" + authority + "/"; fs = ShimLoader.getHadoopShims().createProxyFileSystem( localFs, URI.create(proxyUriString)); fs.initialize(name, conf); } }
@Override public void initialize(URI name, Configuration conf) throws IOException { // create a proxy for the local filesystem // the scheme/authority serving as the proxy is derived // from the supplied URI String scheme = name.getScheme(); String nameUriString = name.toString(); if (Shell.WINDOWS) { // Replace the encoded backward slash with forward slash // Remove the windows drive letter nameUriString = nameUriString.replaceAll("%5C", "/") .replaceFirst("/[c-zC-Z]:", "/") .replaceFirst("^[c-zC-Z]:", ""); name = URI.create(nameUriString); } String authority = name.getAuthority() != null ? name.getAuthority() : ""; String proxyUriString = nameUriString + "://" + authority + "/"; fs = ShimLoader.getHadoopShims().createProxyFileSystem( localFs, URI.create(proxyUriString)); fs.initialize(name, conf); } }