public FileStatus[] listStatus(Path f) throws java.io.FileNotFoundException, java.io.IOException { return replaceScheme( this.underlyingFs.listStatus(replaceScheme(f, this.replacementScheme, this.underlyingScheme)), this.underlyingScheme, this.replacementScheme); }
public FileStatus[] listStatus(Path f, PathFilter filter) throws IOException { return replaceScheme( this.underlyingFs.listStatus(replaceScheme(f, this.replacementScheme, this.underlyingScheme), filter), this.underlyingScheme, this.replacementScheme); }
public FileStatus[] listStatus(Path[] files, PathFilter filter) throws IOException { return replaceScheme( this.underlyingFs.listStatus(replaceScheme(files, this.replacementScheme, this.underlyingScheme), filter), this.underlyingScheme, this.replacementScheme); }
public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws java.io.IOException { return replaceScheme( this.underlyingFs.globStatus(replaceScheme(pathPattern, this.replacementScheme, this.underlyingScheme), filter), this.underlyingScheme, this.replacementScheme); } }
public FileStatus[] globStatus(Path pathPattern) throws IOException { return replaceScheme( this.underlyingFs.globStatus(replaceScheme(pathPattern, this.replacementScheme, this.underlyingScheme)), this.underlyingScheme, this.replacementScheme); }
public FileStatus[] listStatus(Path[] files) throws IOException { return replaceScheme( this.underlyingFs.listStatus(replaceScheme(files, this.replacementScheme, this.underlyingScheme)), this.underlyingScheme, this.replacementScheme); }
public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), overwrite, bufferSize, progress); }
public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), overwrite, bufferSize, replication, blockSize, progress); }
public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), overwrite, bufferSize, replication, blockSize); }
public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), permission, flags, bufferSize, replication, blockSize, progress); }
public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), permission, overwrite, bufferSize, replication, blockSize, progress); }
public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt) throws java.io.IOException { return this.underlyingFs.create(replaceScheme(f, this.replacementScheme, this.underlyingScheme), permission, flags, bufferSize, replication, blockSize, progress, checksumOpt); }
public void createSymlink(Path target, Path link, boolean createParent) throws IOException { this.underlyingFs.createSymlink(replaceScheme(target, this.replacementScheme, this.underlyingScheme), replaceScheme(link, this.replacementScheme, this.underlyingScheme), createParent); }
/** * Replace the scheme of the input {@link Path} if it matches the string to replace. */ public static Path replaceScheme(Path path, String replace, String replacement) { return new Path(replaceScheme(path.toUri(), replace, replacement)); }
public void copyToLocalFile(boolean delSrc, Path src, Path dst, boolean useRawLocalFileSystem) throws java.io.IOException { this.underlyingFs.copyToLocalFile(delSrc, replaceScheme(src, this.replacementScheme, this.underlyingScheme), replaceScheme(dst, this.replacementScheme, this.underlyingScheme), useRawLocalFileSystem); }
@Override public void initialize(URI uri, Configuration conf) throws IOException { if (this.underlyingFs == null) { throw new IllegalStateException("Underlying fs has not been defined."); } this.underlyingFs.initialize(replaceScheme(uri, this.replacementScheme, this.underlyingScheme), conf); }
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.createNonRecursive(replaceScheme(f, this.replacementScheme, this.underlyingScheme), permission, flags, bufferSize, replication, blockSize, progress); }
public FSDataOutputStream createNonRecursive(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.createNonRecursive(replaceScheme(f, this.replacementScheme, this.underlyingScheme), overwrite, bufferSize, replication, blockSize, progress); }
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException { return this.underlyingFs.createNonRecursive(replaceScheme(f, this.replacementScheme, this.underlyingScheme), permission, overwrite, bufferSize, replication, blockSize, progress); }
@Override public void initialize(URI uri, Configuration conf) throws IOException { this.replacementScheme = uri.getScheme(); Configuration actualConfiguration = new Configuration(conf); String key = "fs." + this.underlyingScheme + ".impl"; actualConfiguration.set(key, this.underlyingFs.getClass().getName()); this.underlyingFs = FileSystemFactory.get(replaceScheme(uri, this.replacementScheme, this.underlyingScheme), actualConfiguration, SharedResourcesBrokerFactory.getImplicitBroker()); } }