org.springframework.data.hadoop.fs
Class FileSystemFactoryBean
java.lang.Object
org.springframework.data.hadoop.fs.FileSystemFactoryBean
- All Implemented Interfaces:
- DisposableBean, FactoryBean<FileSystem>, InitializingBean
public class FileSystemFactoryBean
- extends Object
- implements InitializingBean, DisposableBean, FactoryBean<FileSystem>
FactoryBean for creating Hadoop FileSystem
instances. Useful for interacting with
HDFS from outside a Map Reduce job. If no parameter is given, a file system using the installed
Hadoop defaults will be created.
- Author:
- Costin Leau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSystemFactoryBean
public FileSystemFactoryBean()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface DisposableBean
- Throws:
Exception
getObject
public FileSystem getObject()
throws Exception
- Specified by:
getObject
in interface FactoryBean<FileSystem>
- Throws:
Exception
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interface FactoryBean<FileSystem>
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface FactoryBean<FileSystem>
setConfiguration
public void setConfiguration(Configuration configuration)
- Sets the Hadoop configuration for this file system.
- Parameters:
configuration
- The configuration to set.
setUri
public void setUri(URI uri)
- Sets the URI (if available) for this file system.
- Parameters:
uri
- The uri to set.