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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblacklistNode(String nodeName) voidintList<org.apache.hadoop.yarn.api.records.NodeReport> org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponseorg.apache.hadoop.yarn.api.records.ResourcevoidkillContainer(org.apache.hadoop.yarn.api.records.Container container) voidlaunchContainer(org.apache.hadoop.yarn.api.records.Container container, LaunchSpec taskSpec) voidvoidreleaseContainer(org.apache.hadoop.yarn.api.records.Container container) voidremoveBlacklist(String nodeName) voidremoveContainerRequest(org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest containerRequest) org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequestrequestContainer(ContainerRequestSpec containerSpec) voidstart(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:
startin interfaceAMYarnFacade
-
register
- Specified by:
registerin interfaceAMYarnFacade- Throws:
YarnFacadeException
-
getTrackingUrl
- Specified by:
getTrackingUrlin interfaceAMYarnFacade
-
supportsDiskResource
public boolean supportsDiskResource()- Specified by:
supportsDiskResourcein interfaceAMYarnFacade
-
requestContainer
public org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest requestContainer(ContainerRequestSpec containerSpec) - Specified by:
requestContainerin interfaceAMYarnFacade
-
launchContainer
public void launchContainer(org.apache.hadoop.yarn.api.records.Container container, LaunchSpec taskSpec) throws YarnFacadeException - Specified by:
launchContainerin interfaceAMYarnFacade- Throws:
YarnFacadeException
-
finish
- Specified by:
finishin interfaceAMYarnFacade- Throws:
YarnFacadeException
-
releaseContainer
public void releaseContainer(org.apache.hadoop.yarn.api.records.Container container) - Specified by:
releaseContainerin interfaceAMYarnFacade
-
killContainer
public void killContainer(org.apache.hadoop.yarn.api.records.Container container) - Specified by:
killContainerin interfaceAMYarnFacade
-
getNodeCount
public int getNodeCount()- Specified by:
getNodeCountin interfaceAMYarnFacade
-
getResources
public org.apache.hadoop.yarn.api.records.Resource getResources()- Specified by:
getResourcesin interfaceAMYarnFacade
-
removeContainerRequest
public void removeContainerRequest(org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest containerRequest) - Specified by:
removeContainerRequestin interfaceAMYarnFacade
-
getRegistrationResponse
public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse getRegistrationResponse()- Specified by:
getRegistrationResponsein interfaceAMYarnFacade
-
blacklistNode
- Specified by:
blacklistNodein interfaceAMYarnFacade
-
removeBlacklist
- Specified by:
removeBlacklistin interfaceAMYarnFacade
-
getNodeReports
public List<org.apache.hadoop.yarn.api.records.NodeReport> getNodeReports() throws YarnFacadeException- Specified by:
getNodeReportsin interfaceAMYarnFacade- Throws:
YarnFacadeException
-
getAppHostReport
- Specified by:
getAppHostReportin interfaceAMYarnFacade
-