Package org.apache.drill.yarn.appMaster
Class AMYarnFacadeImpl
java.lang.Object
org.apache.drill.yarn.appMaster.AMYarnFacadeImpl
- All Implemented Interfaces:
AMYarnFacade
Wrapper around the asynchronous versions of the YARN AM-RM and AM-NM
interfaces. Allows strategy code to factor out the YARN-specific bits so that
strategy code is simpler. Also allows replacing the actual YARN code with a
mock for unit testing.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.yarn.appMaster.AMYarnFacade
AMYarnFacade.YarnAppHostReport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
blacklistNode
(String nodeName) void
int
List<org.apache.hadoop.yarn.api.records.NodeReport>
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse
org.apache.hadoop.yarn.api.records.Resource
void
killContainer
(org.apache.hadoop.yarn.api.records.Container container) void
launchContainer
(org.apache.hadoop.yarn.api.records.Container container, LaunchSpec taskSpec) void
void
releaseContainer
(org.apache.hadoop.yarn.api.records.Container container) void
removeBlacklist
(String nodeName) void
removeContainerRequest
(org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest containerRequest) org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest
requestContainer
(ContainerRequestSpec containerSpec) void
start
(org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler resourceCallback, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler nodeCallback) boolean
-
Constructor Details
-
AMYarnFacadeImpl
public AMYarnFacadeImpl(int pollPeriodMs)
-
-
Method Details
-
start
public void start(org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler resourceCallback, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler nodeCallback) - Specified by:
start
in interfaceAMYarnFacade
-
register
- Specified by:
register
in interfaceAMYarnFacade
- Throws:
YarnFacadeException
-
getTrackingUrl
- Specified by:
getTrackingUrl
in interfaceAMYarnFacade
-
supportsDiskResource
public boolean supportsDiskResource()- Specified by:
supportsDiskResource
in interfaceAMYarnFacade
-
requestContainer
public org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest requestContainer(ContainerRequestSpec containerSpec) - Specified by:
requestContainer
in interfaceAMYarnFacade
-
launchContainer
public void launchContainer(org.apache.hadoop.yarn.api.records.Container container, LaunchSpec taskSpec) throws YarnFacadeException - Specified by:
launchContainer
in interfaceAMYarnFacade
- Throws:
YarnFacadeException
-
finish
- Specified by:
finish
in interfaceAMYarnFacade
- Throws:
YarnFacadeException
-
releaseContainer
public void releaseContainer(org.apache.hadoop.yarn.api.records.Container container) - Specified by:
releaseContainer
in interfaceAMYarnFacade
-
killContainer
public void killContainer(org.apache.hadoop.yarn.api.records.Container container) - Specified by:
killContainer
in interfaceAMYarnFacade
-
getNodeCount
public int getNodeCount()- Specified by:
getNodeCount
in interfaceAMYarnFacade
-
getResources
public org.apache.hadoop.yarn.api.records.Resource getResources()- Specified by:
getResources
in interfaceAMYarnFacade
-
removeContainerRequest
public void removeContainerRequest(org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest containerRequest) - Specified by:
removeContainerRequest
in interfaceAMYarnFacade
-
getRegistrationResponse
public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse getRegistrationResponse()- Specified by:
getRegistrationResponse
in interfaceAMYarnFacade
-
blacklistNode
- Specified by:
blacklistNode
in interfaceAMYarnFacade
-
removeBlacklist
- Specified by:
removeBlacklist
in interfaceAMYarnFacade
-
getNodeReports
public List<org.apache.hadoop.yarn.api.records.NodeReport> getNodeReports() throws YarnFacadeException- Specified by:
getNodeReports
in interfaceAMYarnFacade
- Throws:
YarnFacadeException
-
getAppHostReport
- Specified by:
getAppHostReport
in interfaceAMYarnFacade
-