|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationFileLoaderService
@InterfaceAudience.Public @InterfaceStability.Unstable public class AllocationFileLoaderService
| Nested Class Summary | |
|---|---|
static interface |
AllocationFileLoaderService.Listener
|
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
|---|
org.apache.hadoop.service.Service.STATE |
| Field Summary | |
|---|---|
static long |
ALLOC_RELOAD_INTERVAL_MS
Time to wait between checks of the allocation file |
static long |
ALLOC_RELOAD_WAIT_MS
Time to wait after the allocation has been modified before reloading it (this is done to prevent loading a file that hasn't been fully written). |
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
AllocationFileLoaderService()
|
|
AllocationFileLoaderService(org.apache.hadoop.yarn.util.Clock clock)
|
|
| Method Summary | |
|---|---|
File |
getAllocationFile(org.apache.hadoop.conf.Configuration conf)
Path to XML file containing allocations. |
void |
init(org.apache.hadoop.conf.Configuration conf)
|
void |
reloadAllocations()
Updates the allocation list from the allocation config file. |
void |
setReloadListener(AllocationFileLoaderService.Listener reloadListener)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class org.apache.hadoop.service.AbstractService |
|---|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
public static final long ALLOC_RELOAD_INTERVAL_MS
public static final long ALLOC_RELOAD_WAIT_MS
| Constructor Detail |
|---|
public AllocationFileLoaderService()
public AllocationFileLoaderService(org.apache.hadoop.yarn.util.Clock clock)
| Method Detail |
|---|
public void init(org.apache.hadoop.conf.Configuration conf)
init in interface org.apache.hadoop.service.Serviceinit in class org.apache.hadoop.service.AbstractServicepublic void start()
start in interface org.apache.hadoop.service.Servicestart in class org.apache.hadoop.service.AbstractServicepublic void stop()
stop in interface org.apache.hadoop.service.Servicestop in class org.apache.hadoop.service.AbstractServicepublic File getAllocationFile(org.apache.hadoop.conf.Configuration conf)
public void setReloadListener(AllocationFileLoaderService.Listener reloadListener)
public void reloadAllocations()
throws IOException,
ParserConfigurationException,
SAXException,
AllocationConfigurationException
IOException - if the config file cannot be read.
AllocationConfigurationException - if allocations are invalid.
ParserConfigurationException - if XML parser is misconfigured.
SAXException - if config file is malformed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||