Package org.apache.flink.state.forst.fs
Class ForStFlinkFileSystem
- java.lang.Object
-
- org.apache.flink.core.fs.FileSystem
-
- org.apache.flink.state.forst.fs.ForStFlinkFileSystem
-
@Experimental public class ForStFlinkFileSystem extends org.apache.flink.core.fs.FileSystemAFileSystemdelegates some requests to file system loaded by Flink FileSystem mechanism.All methods in this class maybe used by ForSt, please start a discussion firstly if it has to be modified.
-
-
Constructor Summary
Constructors Constructor Description ForStFlinkFileSystem(org.apache.flink.core.fs.FileSystem delegateFS)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferWritableFSDataOutputStreamcreate(org.apache.flink.core.fs.Path path)Create ByteBufferWritableFSDataOutputStream from specific path which supports to write data to ByteBuffer withFileSystem.WriteMode.OVERWRITEmode.ByteBufferWritableFSDataOutputStreamcreate(org.apache.flink.core.fs.Path path, org.apache.flink.core.fs.FileSystem.WriteMode overwriteMode)booleandelete(org.apache.flink.core.fs.Path path, boolean recursive)static org.apache.flink.core.fs.FileSystemget(URI uri)Returns a reference to theFileSysteminstance for accessing the file system identified by the givenURI.org.apache.flink.core.fs.BlockLocation[]getFileBlockLocations(org.apache.flink.core.fs.FileStatus file, long start, long len)org.apache.flink.core.fs.FileStatusgetFileStatus(org.apache.flink.core.fs.Path path)org.apache.flink.core.fs.PathgetHomeDirectory()org.apache.flink.core.fs.FileSystemKindgetKind()URIgetUri()org.apache.flink.core.fs.PathgetWorkingDirectory()booleanisDistributedFS()org.apache.flink.core.fs.FileStatus[]listStatus(org.apache.flink.core.fs.Path path)booleanmkdirs(org.apache.flink.core.fs.Path path)ByteBufferReadableFSDataInputStreamopen(org.apache.flink.core.fs.Path path)ByteBufferReadableFSDataInputStreamopen(org.apache.flink.core.fs.Path path, int bufferSize)booleanrename(org.apache.flink.core.fs.Path src, org.apache.flink.core.fs.Path dst)
-
-
-
Method Detail
-
get
public static org.apache.flink.core.fs.FileSystem get(URI uri) throws IOException
Returns a reference to theFileSysteminstance for accessing the file system identified by the givenURI.- Parameters:
uri- theURIidentifying the file system.- Returns:
- a reference to the
FileSysteminstance for accessing the file system identified by the givenURI. - Throws:
IOException- thrown if a reference to the file system instance could not be obtained.
-
create
public ByteBufferWritableFSDataOutputStream create(org.apache.flink.core.fs.Path path) throws IOException
Create ByteBufferWritableFSDataOutputStream from specific path which supports to write data to ByteBuffer withFileSystem.WriteMode.OVERWRITEmode.- Parameters:
path- The file path to write to.- Returns:
- The stream to the new file at the target path.
- Throws:
IOException- Thrown, if the stream could not be opened because of an I/O, or because a file already exists at that path and the write mode indicates to not overwrite the file.
-
create
public ByteBufferWritableFSDataOutputStream create(org.apache.flink.core.fs.Path path, org.apache.flink.core.fs.FileSystem.WriteMode overwriteMode) throws IOException
- Specified by:
createin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
open
public ByteBufferReadableFSDataInputStream open(org.apache.flink.core.fs.Path path, int bufferSize) throws IOException
- Specified by:
openin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
open
public ByteBufferReadableFSDataInputStream open(org.apache.flink.core.fs.Path path) throws IOException
- Specified by:
openin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
rename
public boolean rename(org.apache.flink.core.fs.Path src, org.apache.flink.core.fs.Path dst) throws IOException- Specified by:
renamein classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
getWorkingDirectory
public org.apache.flink.core.fs.Path getWorkingDirectory()
- Specified by:
getWorkingDirectoryin classorg.apache.flink.core.fs.FileSystem
-
getHomeDirectory
public org.apache.flink.core.fs.Path getHomeDirectory()
- Specified by:
getHomeDirectoryin classorg.apache.flink.core.fs.FileSystem
-
getUri
public URI getUri()
- Specified by:
getUriin classorg.apache.flink.core.fs.FileSystem
-
getFileStatus
public org.apache.flink.core.fs.FileStatus getFileStatus(org.apache.flink.core.fs.Path path) throws IOException- Specified by:
getFileStatusin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
getFileBlockLocations
public org.apache.flink.core.fs.BlockLocation[] getFileBlockLocations(org.apache.flink.core.fs.FileStatus file, long start, long len) throws IOException- Specified by:
getFileBlockLocationsin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
listStatus
public org.apache.flink.core.fs.FileStatus[] listStatus(org.apache.flink.core.fs.Path path) throws IOException- Specified by:
listStatusin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
delete
public boolean delete(org.apache.flink.core.fs.Path path, boolean recursive) throws IOException- Specified by:
deletein classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
mkdirs
public boolean mkdirs(org.apache.flink.core.fs.Path path) throws IOException- Specified by:
mkdirsin classorg.apache.flink.core.fs.FileSystem- Throws:
IOException
-
isDistributedFS
public boolean isDistributedFS()
- Specified by:
isDistributedFSin classorg.apache.flink.core.fs.FileSystem
-
getKind
public org.apache.flink.core.fs.FileSystemKind getKind()
- Specified by:
getKindin classorg.apache.flink.core.fs.FileSystem
-
-