Package org.apache.flink.core.fs
Class PluginFileSystemFactory
- java.lang.Object
-
- org.apache.flink.core.fs.PluginFileSystemFactory
-
- All Implemented Interfaces:
FileSystemFactory,Plugin
public class PluginFileSystemFactory extends Object implements FileSystemFactory
A wrapper aroundFileSystemFactorythat ensures the plugin classloader is used for allFileSystemoperations.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration config)Optional method for plugins to pick up settings from the configuration.FileSystemcreate(URI fsUri)Creates a new file system for the given file system URI.ClassLoadergetClassLoader()Helper method to get the class loader used to load the plugin.StringgetScheme()Gets the scheme of the file system created by this factory.static PluginFileSystemFactoryof(FileSystemFactory inner)StringtoString()
-
-
-
Method Detail
-
of
public static PluginFileSystemFactory of(FileSystemFactory inner)
-
getScheme
public String getScheme()
Description copied from interface:FileSystemFactoryGets the scheme of the file system created by this factory.- Specified by:
getSchemein interfaceFileSystemFactory
-
getClassLoader
public ClassLoader getClassLoader()
Description copied from interface:PluginHelper method to get the class loader used to load the plugin. This may be needed for some plugins that use dynamic class loading afterwards the plugin was loaded.- Specified by:
getClassLoaderin interfacePlugin- Returns:
- the class loader used to load the plugin.
-
configure
public void configure(Configuration config)
Description copied from interface:PluginOptional method for plugins to pick up settings from the configuration.
-
create
public FileSystem create(URI fsUri) throws IOException
Description copied from interface:FileSystemFactoryCreates a new file system for the given file system URI. The URI describes the type of file system (via its scheme) and optionally the authority (for example the host) of the file system.- Specified by:
createin interfaceFileSystemFactory- Parameters:
fsUri- The URI that describes the file system.- Returns:
- A new instance of the specified file system.
- Throws:
IOException- Thrown if the file system could not be instantiated.
-
-