public class RuntimeResourceManager
extends org.apache.hadoop.conf.Configured
RuntimeResource objects.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIGURATION_FILE_NAME
The standard name of the framework configuration file.
|
static String |
CONFIGURATION_FILE_PATH
The path to configuration file (relative from $ASAKUSA_HOME).
|
| Constructor and Description |
|---|
RuntimeResourceManager(org.apache.hadoop.conf.Configuration configuration)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Finalizes and releases the managed resources.
|
protected List<RuntimeResource> |
load()
Loads the available resources.
|
void |
setup()
Initializes the managed resources.
|
public static final String CONFIGURATION_FILE_NAME
public static final String CONFIGURATION_FILE_PATH
public RuntimeResourceManager(org.apache.hadoop.conf.Configuration configuration)
configuration - the current configurationIllegalArgumentException - if the parameter is nullpublic void setup()
throws IOException,
InterruptedException
IOException - if failed to initialize resourcesInterruptedException - if interrupted while initializing resourcesIllegalArgumentException - if the configuration is something wrongIllegalStateException - if the current lifecycle is something wrongpublic void cleanup()
throws IOException,
InterruptedException
IOException - if failed to finalize resourcesInterruptedException - if interrupted while initializing resourcesIllegalArgumentException - if the configuration is something wrongIllegalStateException - if the current lifecycle is something wrongprotected List<RuntimeResource> load() throws IOException
META-INF/services/com.asakusafw.runtime.core.RuntimeResource
and creates RuntimeResource implementations on them via SPI.IOException - if failed to load the resourcesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.