|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.fs.HdfsResourceLoader
public class HdfsResourceLoader
Spring ResourceLoader over Hadoop FileSystem.
Field Summary |
---|
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
HdfsResourceLoader(Configuration config)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(Configuration config,
URI uri)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(Configuration config,
URI uri,
String user)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(FileSystem fs)
Constructs a new HdfsResourceLoader instance. |
Method Summary | |
---|---|
void |
close()
|
void |
destroy()
|
protected String |
determineRootDir(String location)
|
protected Resource[] |
findPathMatchingResources(String locationPattern)
|
ClassLoader |
getClassLoader()
|
FileSystem |
getFileSystem()
Returns the Hadoop file system used by this resource loader. |
int |
getOrder()
|
Resource |
getResource(String location)
|
Resource[] |
getResources(String locationPattern)
|
void |
setUseCodecs(boolean useCodecs)
Indicates whether to use (or not) the codecs found inside the Hadoop configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HdfsResourceLoader(Configuration config)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.public HdfsResourceLoader(Configuration config, URI uri, String user)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.uri
- Hadoop file system URI.user
- Hadoop user for accessing the file system.public HdfsResourceLoader(Configuration config, URI uri)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.uri
- Hadoop file system URI.public HdfsResourceLoader(FileSystem fs)
HdfsResourceLoader
instance.
fs
- Hadoop file system to use.Method Detail |
---|
public FileSystem getFileSystem()
public ClassLoader getClassLoader()
getClassLoader
in interface ResourceLoader
public Resource getResource(String location)
getResource
in interface ResourceLoader
public Resource[] getResources(String locationPattern) throws IOException
getResources
in interface ResourcePatternResolver
IOException
protected Resource[] findPathMatchingResources(String locationPattern) throws IOException
IOException
protected String determineRootDir(String location)
public int getOrder()
getOrder
in interface Ordered
public void destroy() throws IOException
destroy
in interface DisposableBean
IOException
public void close() throws IOException
close
in interface Closeable
IOException
public void setUseCodecs(boolean useCodecs)
useCodecs
- whether to use any codecs defined in the Hadoop configuration
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |