public interface ProviderService extends ProviderCore, org.apache.hadoop.service.Service, RMOperationHandlerActions, ExitCodeProvider
| Modifier and Type | Method and Description |
|---|---|
void |
applyInitialRegistryDefinitions(URL amWebURI,
URL agentOpsURI,
URL agentStatusURI,
org.apache.hadoop.registry.client.types.ServiceRecord serviceRecord)
Prior to going live -register the initial service registry data
|
void |
bind(StateAccessForProviders stateAccessor,
QueueAccess queueAccess,
List<org.apache.hadoop.yarn.api.records.Container> liveContainers) |
void |
bindToYarnRegistry(YarnRegistryViewForProviders yarnRegistry)
Bind to the YARN registry
|
void |
buildContainerLaunchContext(ContainerLauncher containerLauncher,
AggregateConf instanceDefinition,
org.apache.hadoop.yarn.api.records.Container container,
String role,
SliderFileSystem sliderFileSystem,
org.apache.hadoop.fs.Path generatedConfPath,
MapOperations resourceComponent,
MapOperations appComponent,
org.apache.hadoop.fs.Path containerTmpDirPath)
Set up the entire container launch context
|
void |
buildEndpointDetails(Map<String,String> details)
Build up the endpoint details for this service
|
Map<String,String> |
buildMonitorDetails(ClusterDescription clusterSpec)
Build a map of data intended for the AM webapp that is specific
about this provider.
|
Map<String,String> |
buildProviderStatus() |
ContainerReleaseSelector |
createContainerReleaseSelector()
Create the container release selector for this provider...any policy
can be implemented
|
boolean |
exec(AggregateConf instanceDefinition,
File confDir,
Map<String,String> env,
ProviderCompleted execInProgress)
Execute a process in the AM
|
AgentRestOperations |
getAgentRestOperations()
Returns the agent rest operations interface.
|
String |
getHumanName()
Get a human friendly name for web UIs and messages
|
void |
initializeApplicationConfiguration(AggregateConf instanceDefinition,
SliderFileSystem fileSystem)
The application configuration should be initialized here
|
boolean |
isSupportedRole(String role)
Scan through the roles and see if it is supported.
|
org.apache.hadoop.conf.Configuration |
loadProviderConfigurationInformation(File confDir)
Load a specific XML configuration file for the provider config
|
void |
notifyContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Notify the providers of container completion
|
void |
rebuildContainerDetails(List<org.apache.hadoop.yarn.api.records.Container> liveContainers,
String applicationId,
Map<Integer,ProviderRole> providerRoles)
On AM restart (for whatever reason) this API is required to rebuild the AM
internal state with the containers which were already assigned and running
|
void |
validateApplicationConfiguration(AggregateConf instanceDefinition,
File confDir,
boolean secure)
This is a validation of the application configuration on the AM.
|
getConf, getName, getRoles, validateInstanceDefinitionclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStopaddContainerRequest, cancelContainerRequests, cancelSingleRequest, execute, releaseAssignedContainergetExitCodevoid buildContainerLaunchContext(ContainerLauncher containerLauncher, AggregateConf instanceDefinition, org.apache.hadoop.yarn.api.records.Container container, String role, SliderFileSystem sliderFileSystem, org.apache.hadoop.fs.Path generatedConfPath, MapOperations resourceComponent, MapOperations appComponent, org.apache.hadoop.fs.Path containerTmpDirPath) throws IOException, SliderException
containerLauncher - instanceDefinition - container - role - sliderFileSystem - generatedConfPath - appComponent - containerTmpDirPath - IOExceptionSliderExceptionvoid notifyContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId - container that has completedboolean exec(AggregateConf instanceDefinition, File confDir, Map<String,String> env, ProviderCompleted execInProgress) throws IOException, SliderException
instanceDefinition - cluster descriptionconfDir - configuration directoryenv - environmentexecInProgress - the callback for the exec eventsIOExceptionSliderExceptionboolean isSupportedRole(String role)
role - role to look fororg.apache.hadoop.conf.Configuration loadProviderConfigurationInformation(File confDir) throws BadCommandArgumentsException, IOException
confDir - configuration directoryBadCommandArgumentsExceptionIOExceptionvoid initializeApplicationConfiguration(AggregateConf instanceDefinition, SliderFileSystem fileSystem) throws IOException, SliderException
instanceDefinition - fileSystem - IOExceptionSliderExceptionvoid validateApplicationConfiguration(AggregateConf instanceDefinition, File confDir, boolean secure) throws IOException, SliderException
instanceDefinition - clusterSpecificationconfDir - configuration directorysecure - flag to indicate that secure mode checks must existIOException - IO problemsnSliderException - any failureMap<String,String> buildMonitorDetails(ClusterDescription clusterSpec)
String getHumanName()
void bind(StateAccessForProviders stateAccessor, QueueAccess queueAccess, List<org.apache.hadoop.yarn.api.records.Container> liveContainers)
void bindToYarnRegistry(YarnRegistryViewForProviders yarnRegistry)
yarnRegistry - YARN registryAgentRestOperations getAgentRestOperations()
void buildEndpointDetails(Map<String,String> details)
details - void applyInitialRegistryDefinitions(URL amWebURI, URL agentOpsURI, URL agentStatusURI, org.apache.hadoop.registry.client.types.ServiceRecord serviceRecord) throws IOException
amWebURI - URL to the AM. This may be proxied, so use relative pathsagentOpsURI - URI for agent operations. This will not be proxiedagentStatusURI - URI For agent status. Again: no proxyserviceRecord - service record to build upIOExceptionContainerReleaseSelector createContainerReleaseSelector()
void rebuildContainerDetails(List<org.apache.hadoop.yarn.api.records.Container> liveContainers, String applicationId, Map<Integer,ProviderRole> providerRoles)
liveContainers - applicationId - providerRoles - Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.