public abstract class AbstractFileSystemFactory extends Object implements FileSystemFactory
Modifier | Constructor and Description |
---|---|
protected |
AbstractFileSystemFactory(String name,
HadoopConfigLoader hadoopConfigLoader) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration config)
Applies the given configuration to this factory.
|
FileSystem |
create(URI fsUri)
Creates a new file system for the given file system URI.
|
protected abstract org.apache.hadoop.fs.FileSystem |
createHadoopFileSystem() |
protected abstract URI |
getInitURI(URI fsUri,
Configuration hadoopConfig) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getScheme
protected AbstractFileSystemFactory(String name, HadoopConfigLoader hadoopConfigLoader)
public void configure(Configuration config)
FileSystemFactory
FileSystemFactory.create(URI)
should take the configuration into
account.configure
in interface FileSystemFactory
config
- The configuration to apply.public FileSystem create(URI fsUri) throws IOException
FileSystemFactory
create
in interface FileSystemFactory
fsUri
- The URI that describes the file system.IOException
- Thrown if the file system could not be instantiated.protected abstract org.apache.hadoop.fs.FileSystem createHadoopFileSystem()
protected abstract URI getInitURI(URI fsUri, Configuration hadoopConfig)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.