java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service@Public
@Unstable
public class AllocationFileLoaderService
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
AllocationFileLoaderService.Listener |
| Modifier and Type | Field | Description |
|---|---|---|
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.slf4j.Logger |
LOG |
|
static long |
THREAD_JOIN_TIMEOUT_MS |
| Constructor | Description |
|---|---|
AllocationFileLoaderService(FairScheduler scheduler) |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.fs.Path |
getAllocationFile(org.apache.hadoop.conf.Configuration conf) |
Path to XML file containing allocations.
|
protected java.util.List<org.apache.hadoop.yarn.security.Permission> |
getDefaultPermissions() |
Returns the list of default permissions.
|
void |
reloadAllocations() |
Updates the allocation list from the allocation config file.
|
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
void |
serviceStart() |
|
void |
serviceStop() |
|
void |
setReloadListener(AllocationFileLoaderService.Listener reloadListener) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final org.slf4j.Logger LOG
public static final long ALLOC_RELOAD_INTERVAL_MS
public static final long ALLOC_RELOAD_WAIT_MS
public static final long THREAD_JOIN_TIMEOUT_MS
public AllocationFileLoaderService(FairScheduler scheduler)
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exception@VisibleForTesting
public org.apache.hadoop.fs.Path getAllocationFile(org.apache.hadoop.conf.Configuration conf)
throws org.apache.hadoop.fs.UnsupportedFileSystemException
conf - configuration.org.apache.hadoop.fs.UnsupportedFileSystemException - File system for a given file system name/scheme is not supported.public void setReloadListener(AllocationFileLoaderService.Listener reloadListener)
public void reloadAllocations()
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
AllocationConfigurationException
java.io.IOException - if the config file cannot be read.AllocationConfigurationException - if allocations are invalid.javax.xml.parsers.ParserConfigurationException - if XML parser is misconfigured.org.xml.sax.SAXException - if config file is malformed.protected java.util.List<org.apache.hadoop.yarn.security.Permission> getDefaultPermissions()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.