Class HdfsFileSystemConfigBuilder
- Since:
- 2.1
- 
Method SummaryModifier and TypeMethodDescriptionprotected Class<? extends FileSystem> org.apache.hadoop.conf.ConfigurationGets the alternate configuration object.Gets the alternate configuration input stream.String[]Gets the names of alternate configuration resources.org.apache.hadoop.fs.Path[]Gets the paths of alternate configuration file system files.URL[]Gets URLs of alternate configurations.static HdfsFileSystemConfigBuilderGets the singleton instance.voidsetConfigConfiguration(FileSystemOptions opts, org.apache.hadoop.conf.Configuration configuration) Sets the configuration object to be loaded after the defaults.voidsetConfigInputStream(FileSystemOptions opts, InputStream inputStream) Sets the input stream of configuration file to be loaded after the defaults.voidsetConfigName(FileSystemOptions opts, String name) Sets the name of configuration resource to be loaded after the defaults.voidsetConfigPath(FileSystemOptions opts, org.apache.hadoop.fs.Path path) Sets the full path of configuration file to be loaded after the defaults.voidsetConfigURL(FileSystemOptions opts, URL url) Sets the URL of configuration file to be loaded after the defaults.Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuildergetBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getDuration, getDuration, getDurationInteger, getDurationInteger, getEnum, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getParamOrDefault, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI, toBooleanObject
- 
Method Details- 
getInstanceGets the singleton instance.- Returns:
- HdfsFileSystemConfigBuilder instance
 
- 
getConfigClass- Specified by:
- getConfigClassin class- FileSystemConfigBuilder
- Returns:
- HDFSFileSystem
 
- 
getConfigConfigurationGets the alternate configuration object.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- alternate configuration object or null.
- See Also:
 
- 
getConfigInputStreamGets the alternate configuration input stream.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- alternate configuration input stream or null.
- See Also:
 
- 
getConfigNamesGets the names of alternate configuration resources.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- resource name list of alternate configurations or null.
- See Also:
 
- 
getConfigPathsGets the paths of alternate configuration file system files.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- list of full paths of alternate configuration files or null.
- See Also:
 
- 
getConfigURLsGets URLs of alternate configurations.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- list of alternate configuration URLs or null.
- See Also:
 
- 
setConfigConfigurationpublic void setConfigConfiguration(FileSystemOptions opts, org.apache.hadoop.conf.Configuration configuration) Sets the configuration object to be loaded after the defaults.Specifies an already initialized configuration object to override any specific HDFS settings. The property will be passed on to org.apache.hadoop.conf.Configuration#addResource(Configuration)after the URL was set as the default name with:Configuration#set(FileSystem.FS_DEFAULT_NAME_KEY, url).One use for this is to set a different value for the dfs.client.use.datanode.hostnameproperty in order to access HDFS files stored in an AWS installation (from outside their firewall). There are other possible uses too.- Parameters:
- opts- The FileSystemOptions to modify.
- configuration- additional configuration object or- nullto unset any configuration object previously set.
 
- 
setConfigInputStreamSets the input stream of configuration file to be loaded after the defaults.Specifies an input stream connected to a config file to override any specific HDFS settings. The property will be passed on to org.apache.hadoop.conf.Configuration#addResource(InputStream)after the URL was set as the default name with:Configuration#set(FileSystem.FS_DEFAULT_NAME_KEY, url).One use for this is to set a different value for the dfs.client.use.datanode.hostnameproperty in order to access HDFS files stored in an AWS installation (from outside their firewall). There are other possible uses too.- Parameters:
- opts- The FileSystemOptions to modify.
- inputStream- input stream of additional configuration file or- nullto unset the configuration input stream previously set up.
 
- 
setConfigNameSets the name of configuration resource to be loaded after the defaults.Specifies the name of a config resource to override any specific HDFS settings. The property will be passed on to org.apache.hadoop.conf.Configuration#addResource(String)after the URL was set as the default name with:Configuration#set(FileSystem.FS_DEFAULT_NAME_KEY, url).One use for this is to set a different value for the dfs.client.use.datanode.hostnameproperty in order to access HDFS files stored in an AWS installation (from outside their firewall). There are other possible uses too.This method may be called multiple times and all the specified resources will be loaded in the order they were specified. Note also, that if a list of names is provided, separated by commas ( ","), that this will work the same as calling this method a number of times with just one name each.- Parameters:
- opts- The FileSystemOptions to modify.
- name- resource name of additional configuration or- nullto unset all the values set so far.
- See Also:
 
- 
setConfigPathSets the full path of configuration file to be loaded after the defaults.Specifies the path of a local file system config file to override any specific HDFS settings. The property will be passed on to org.apache.hadoop.conf.Configuration#addResource(Path)after the URL was set as the default name with:Configuration#set(FileSystem.FS_DEFAULT_NAME_KEY, url).One use for this is to set a different value for the dfs.client.use.datanode.hostnameproperty in order to access HDFS files stored in an AWS installation (from outside their firewall). There are other possible uses too.This method may be called multiple times and all the specified resources will be loaded in the order they were specified. - Parameters:
- opts- The FileSystemOptions to modify.
- path- full path of additional configuration file (local file system) or- nullto unset all the path values set so far.
 
- 
setConfigURLSets the URL of configuration file to be loaded after the defaults.Specifies the URL of a config file to override any specific HDFS settings. The property will be passed on to org.apache.hadoop.conf.Configuration#addResource(URL)after the URL was set as the default name with:Configuration#set(FileSystem.FS_DEFAULT_NAME_KEY, url).One use for this is to set a different value for the dfs.client.use.datanode.hostnameproperty in order to access HDFS files stored in an AWS installation (from outside their firewall). There are other possible uses too.This method may be called multiple times and all the specified resources will be loaded in the order they were specified. - Parameters:
- opts- The FileSystemOptions to modify.
- url- URL of additional configuration file or- nullto unset all the URL values set so far.
 
 
-