|
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.yarn.fs.AbstractLocalResourcesSelector
public abstract class AbstractLocalResourcesSelector
Base implementation for LocalResourcesSelector
supporting simple
use cases where user needs to localise properties, zip and jar files.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.springframework.yarn.fs.LocalResourcesSelector |
---|
LocalResourcesSelector.Entry |
Constructor Summary | |
---|---|
AbstractLocalResourcesSelector()
|
Method Summary | |
---|---|
void |
addPattern(java.lang.String pattern)
Adds a pattern to be returned selected. |
void |
addPatterns(java.util.List<java.lang.String> patterns)
Adds a patterns to be returned as selected. |
void |
addPatterns(java.lang.String... patterns)
Adds a patterns to be returned as selected. |
java.util.List<java.lang.String> |
getPatterns()
Gets the patterns. |
java.lang.String[] |
getPropertiesNames()
Gets the properties fiels base names. |
java.lang.String[] |
getPropertiesSuffixes()
Gets the properties files suffixes. |
java.lang.String |
getZipArchivePattern()
Gets the current zip archive pattern. |
protected boolean |
isZipArchive(java.lang.String name)
Matching if argument is determined to be a zip archive. |
java.util.List<LocalResourcesSelector.Entry> |
select(java.lang.String dir)
Select a List of LocalResourcesSelector.Entry s. |
protected java.util.List<LocalResourcesSelector.Entry> |
selectInternal(java.lang.String dir)
Select internal. |
void |
setPropertiesNames(java.util.List<java.lang.String> propertiesNames)
Sets the properties names. |
void |
setPropertiesNames(java.lang.String... propertiesNames)
Sets the properties names. |
void |
setPropertiesSuffixes(java.util.List<java.lang.String> propertiesSuffixes)
Sets the properties suffixes. |
void |
setPropertiesSuffixes(java.lang.String... propertiesSuffixes)
Sets the properties suffixes. |
void |
setZipArchivePattern(java.lang.String zipArchivePattern)
Sets the zip archive pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLocalResourcesSelector()
Method Detail |
---|
public final java.util.List<LocalResourcesSelector.Entry> select(java.lang.String dir)
LocalResourcesSelector
List
of LocalResourcesSelector.Entry
s.
This method cannot not return NULL
.
select
in interface LocalResourcesSelector
dir
- the base directory
public void addPattern(java.lang.String pattern)
pattern
- the patternpublic void addPatterns(java.lang.String... patterns)
patterns
- the patternsaddPattern(String)
public void addPatterns(java.util.List<java.lang.String> patterns)
patterns
- the patternsaddPattern(String)
public java.util.List<java.lang.String> getPatterns()
public void setZipArchivePattern(java.lang.String zipArchivePattern)
DEFAULT_PATTERN_ZIP_ARCHIVE
. Setting this
pattern as NULL
effectively disables
zip matching.
zipArchivePattern
- the new zip archive patternpublic java.lang.String getZipArchivePattern()
public void setPropertiesNames(java.lang.String... propertiesNames)
getPropertiesSuffixes()
.
propertiesNames
- the new properties namespublic void setPropertiesNames(java.util.List<java.lang.String> propertiesNames)
propertiesNames
- the new properties namessetPropertiesNames(String...)
public java.lang.String[] getPropertiesNames()
public void setPropertiesSuffixes(java.lang.String... propertiesSuffixes)
getPropertiesNames()
.
propertiesSuffixes
- the new properties suffixespublic void setPropertiesSuffixes(java.util.List<java.lang.String> propertiesSuffixes)
propertiesSuffixes
- the new properties suffixessetPropertiesSuffixes(String...)
public java.lang.String[] getPropertiesSuffixes()
protected java.util.List<LocalResourcesSelector.Entry> selectInternal(java.lang.String dir)
dir
- the dir
select(String)
protected boolean isZipArchive(java.lang.String name)
PatternMatchUtils.simpleMatch(String, String)
for actual matching. Match pattern is defined in variable
zipArchivePattern
and can be altered using method
setZipArchivePattern(String)
.
name
- the name to match
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |