|
Spring for Apache Hadoop | ||||||||
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(org.apache.hadoop.conf.Configuration config)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(org.apache.hadoop.conf.Configuration config,
java.net.URI uri)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(org.apache.hadoop.conf.Configuration config,
java.net.URI uri,
java.lang.String user)
Constructs a new HdfsResourceLoader instance. |
|
HdfsResourceLoader(org.apache.hadoop.fs.FileSystem fs)
Constructs a new HdfsResourceLoader instance. |
Method Summary | |
---|---|
void |
close()
|
void |
destroy()
|
protected java.lang.String |
determineRootDir(java.lang.String location)
|
protected org.springframework.core.io.Resource[] |
findPathMatchingResources(java.lang.String locationPattern)
|
java.lang.ClassLoader |
getClassLoader()
|
org.apache.hadoop.fs.FileSystem |
getFileSystem()
Returns the Hadoop file system used by this resource loader. |
int |
getOrder()
|
org.springframework.core.io.Resource |
getResource(java.lang.String location)
|
org.springframework.core.io.Resource[] |
getResources(java.lang.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(org.apache.hadoop.conf.Configuration config)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.public HdfsResourceLoader(org.apache.hadoop.conf.Configuration config, java.net.URI uri, java.lang.String user)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.uri
- Hadoop file system URI.user
- Hadoop user for accessing the file system.public HdfsResourceLoader(org.apache.hadoop.conf.Configuration config, java.net.URI uri)
HdfsResourceLoader
instance.
config
- Hadoop configuration to use.uri
- Hadoop file system URI.public HdfsResourceLoader(org.apache.hadoop.fs.FileSystem fs)
HdfsResourceLoader
instance.
fs
- Hadoop file system to use.Method Detail |
---|
public org.apache.hadoop.fs.FileSystem getFileSystem()
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface org.springframework.core.io.ResourceLoader
public org.springframework.core.io.Resource getResource(java.lang.String location)
getResource
in interface org.springframework.core.io.ResourceLoader
public org.springframework.core.io.Resource[] getResources(java.lang.String locationPattern) throws java.io.IOException
getResources
in interface org.springframework.core.io.support.ResourcePatternResolver
java.io.IOException
protected org.springframework.core.io.Resource[] findPathMatchingResources(java.lang.String locationPattern) throws java.io.IOException
java.io.IOException
protected java.lang.String determineRootDir(java.lang.String location)
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public void destroy() throws java.io.IOException
destroy
in interface org.springframework.beans.factory.DisposableBean
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
public void setUseCodecs(boolean useCodecs)
useCodecs
- whether to use any codecs defined in the Hadoop configuration
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |