|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.fs.AbstractResourceLocalizer
org.springframework.yarn.fs.DefaultResourceLocalizer
public class DefaultResourceLocalizer
Default implementation of ResourceLocalizer which
is only capable of re-using files already in HDFS and preparing
correct parameters for created LocalResource entries.
| Constructor Summary | |
|---|---|
DefaultResourceLocalizer(Configuration configuration,
Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries,
Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
Instantiates a new default resource localizer. |
|
DefaultResourceLocalizer(Configuration configuration,
Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries,
Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries,
Path stagingDirectory)
Instantiates a new default resource localizer. |
|
| Method Summary | |
|---|---|
boolean |
AddRawContent(String key,
byte[] value)
Adds a content into a to be written entries. |
protected void |
doFileCopy(FileSystem fs)
Do file copy. |
protected Map<String,LocalResource> |
doFileTransfer(FileSystem fs)
Do file transfer. |
void |
setRawFileContents(Map<String,byte[]> rawFileContents)
Sets the raw file contents. |
| Methods inherited from class org.springframework.yarn.fs.AbstractResourceLocalizer |
|---|
clean, copy, deleteStagingEntries, distribute, getConfiguration, getLock, getResources, isCopied, isDistributed, resolve, resolveStagingDirectory, setCopied, setDistributed, setStagingDirectory, setStagingId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.yarn.fs.SmartResourceLocalizer |
|---|
clean, copy, distribute, resolve, setStagingDirectory, setStagingId |
| Methods inherited from interface org.springframework.yarn.fs.ResourceLocalizer |
|---|
getResources |
| Constructor Detail |
|---|
public DefaultResourceLocalizer(Configuration configuration,
Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries,
Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
configuration - the configurationtransferEntries - the transfer entriescopyEntries - the copy entries
public DefaultResourceLocalizer(Configuration configuration,
Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries,
Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries,
Path stagingDirectory)
configuration - the configurationtransferEntries - the transfer entriescopyEntries - the copy entriesstagingDirectory - the staging directory| Method Detail |
|---|
public boolean AddRawContent(String key,
byte[] value)
key - the key considered as a file namevalue - the content of a file to be written
public void setRawFileContents(Map<String,byte[]> rawFileContents)
rawFileContents - the raw file contents
protected void doFileCopy(FileSystem fs)
throws Exception
AbstractResourceLocalizer
doFileCopy in class AbstractResourceLocalizerfs - the fs
Exception - the exception
protected Map<String,LocalResource> doFileTransfer(FileSystem fs)
throws Exception
AbstractResourceLocalizer
doFileTransfer in class AbstractResourceLocalizerfs - the fs
Exception - the exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||