public class FileSystemFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.apache.hadoop.fs.FileSystem>
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.| Constructor and Description | 
|---|
FileSystemFactoryBean()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
afterPropertiesSet()  | 
void | 
destroy()  | 
org.apache.hadoop.fs.FileSystem | 
getObject()  | 
java.lang.Class<?> | 
getObjectType()  | 
boolean | 
isSingleton()  | 
void | 
setClose(boolean close)
Indicates whether the Hadoop file systems should be closed once this factory is destroyed. 
 | 
void | 
setCloseAll(boolean closeAll)
Indicates whether all the Hadoop file systems should be closed once this factory is destroyed. 
 | 
void | 
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Hadoop configuration for this file system. 
 | 
void | 
setUri(java.net.URI uri)
Sets the URI (if available) for this file system. 
 | 
void | 
setUser(java.lang.String user)
Sets the user impersonation (optional) for creating this file-system. 
 | 
public void afterPropertiesSet()
                        throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void destroy()
             throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic org.apache.hadoop.fs.FileSystem getObject()
                                          throws java.lang.Exception
getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.fs.FileSystem>java.lang.Exceptionpublic java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.fs.FileSystem>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.fs.FileSystem>public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - The configuration to set.public void setUri(java.net.URI uri)
uri - The uri to set.public void setUser(java.lang.String user)
user - user/group informationpublic void setCloseAll(boolean closeAll)
closeAll - the close allFileSystem.closeAll()public void setClose(boolean close)
close - closeFileSystem.close()