Apache_Hadoop_YARN_Client_2.7.2.xml 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972
  1. <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
  2. <!-- Generated by the JDiff Javadoc doclet -->
  3. <!-- (http://www.jdiff.org) -->
  4. <!-- on Wed Aug 24 13:55:59 PDT 2016 -->
  5. <api
  6. xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  7. xsi:noNamespaceSchemaLocation='api.xsd'
  8. name="hadoop-yarn-client 2.7.2"
  9. jdversion="1.0.9">
  10. <!-- Command line arguments = -doclet org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet -docletpath /Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/hadoop-annotations.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/jdiff.jar -verbose -classpath /Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/classes:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-common-project/hadoop-common/target/hadoop-common-2.7.2.jar:/Users/vinodkv/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/vinodkv/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/vinodkv/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/vinodkv/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/Users/vinodkv/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/vinodkv/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/vinodkv/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/vinodkv/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/Users/vinodkv/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/Users/vinodkv/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/vinodkv/.m2/repository/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar:/Users/vinodkv/.m2/repository/com/sun/jersey/jersey-core/1.9/jersey-core-1.9.jar:/Users/vinodkv/.m2/repository/com/sun/jersey/jersey-json/1.9/jersey-json-1.9.jar:/Users/vinodkv/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:/Users/vinodkv/.m2/repository/com/sun/jersey/jersey-server/1.9/jersey-server-1.9.jar:/Users/vinodkv/.m2/repository/asm/asm/3.2/asm-3.2.jar:/Users/vinodkv/.m2/repository/net/java/dev/jets3t/jets3t/0.9.0/jets3t-0.9.0.jar:/Users/vinodkv/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/vinodkv/.m2/repository/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.jar:/Users/vinodkv/.m2/repository/com/jamesmurty/utils/java-xmlbuilder/0.4/java-xmlbuilder-0.4.jar:/Users/vinodkv/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/vinodkv/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/vinodkv/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/vinodkv/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/vinodkv/.m2/repository/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar:/Users/vinodkv/.m2/repository/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar:/Users/vinodkv/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/vinodkv/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/vinodkv/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/vinodkv/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/vinodkv/.m2/repository/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/Users/vinodkv/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/vinodkv/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-common-project/hadoop-auth/target/hadoop-auth-2.7.2.jar:/Users/vinodkv/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/vinodkv/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/vinodkv/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/vinodkv/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/vinodkv/.m2/repository/org/apache/curator/curator-framework/2.7.1/curator-framework-2.7.1.jar:/Users/vinodkv/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/vinodkv/.m2/repository/org/apache/curator/curator-client/2.7.1/curator-client-2.7.1.jar:/Users/vinodkv/.m2/repository/org/apache/curator/curator-recipes/2.7.1/curator-recipes-2.7.1.jar:/Users/vinodkv/.m2/repository/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar:/Users/vinodkv/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/vinodkv/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/vinodkv/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/vinodkv/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/vinodkv/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.jar:/Users/vinodkv/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/Users/vinodkv/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/vinodkv/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/vinodkv/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-common-project/hadoop-annotations/target/hadoop-annotations-2.7.2.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/lib/tools.jar:/Users/vinodkv/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/target/hadoop-yarn-api-2.7.2.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/hadoop-yarn-common-2.7.2.jar:/Users/vinodkv/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/vinodkv/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/vinodkv/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/vinodkv/.m2/repository/com/sun/jersey/jersey-client/1.9/jersey-client-1.9.jar:/Users/vinodkv/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.9.13/jackson-jaxrs-1.9.13.jar:/Users/vinodkv/.m2/repository/org/codehaus/jackson/jackson-xc/1.9.13/jackson-xc-1.9.13.jar:/Users/vinodkv/.m2/repository/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar:/Users/vinodkv/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar:/Users/vinodkv/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/Users/vinodkv/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/vinodkv/.m2/repository/com/sun/jersey/contribs/jersey-guice/1.9/jersey-guice-1.9.jar:/Users/vinodkv/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar -sourcepath /Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java -doclet org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet -docletpath /Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/hadoop-annotations.jar:/Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/jdiff.jar -apidir /Users/vinodkv/Workspace/eclipse-workspace/apache-git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/site/jdiff/xml -apiname hadoop-yarn-client 2.7.2 -->
  11. <package name="org.apache.hadoop.yarn.client">
  12. </package>
  13. <package name="org.apache.hadoop.yarn.client.api">
  14. <!-- start class org.apache.hadoop.yarn.client.api.AHSClient -->
  15. <class name="AHSClient" extends="org.apache.hadoop.service.AbstractService"
  16. abstract="true"
  17. static="false" final="false" visibility="public"
  18. deprecated="not deprecated">
  19. <constructor name="AHSClient" type="java.lang.String"
  20. static="false" final="false" visibility="public"
  21. deprecated="not deprecated">
  22. </constructor>
  23. <method name="createAHSClient" return="org.apache.hadoop.yarn.client.api.AHSClient"
  24. abstract="false" native="false" synchronized="false"
  25. static="true" final="false" visibility="public"
  26. deprecated="not deprecated">
  27. <doc>
  28. <![CDATA[Create a new instance of AHSClient.]]>
  29. </doc>
  30. </method>
  31. <method name="getApplicationReport" return="org.apache.hadoop.yarn.api.records.ApplicationReport"
  32. abstract="true" native="false" synchronized="false"
  33. static="false" final="false" visibility="public"
  34. deprecated="not deprecated">
  35. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  36. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  37. <exception name="IOException" type="java.io.IOException"/>
  38. <doc>
  39. <![CDATA[Get a report of the given Application.
  40. <p>
  41. In secure mode, <code>YARN</code> verifies access to the application, queue
  42. etc. before accepting the request.
  43. <p>
  44. If the user does not have <code>VIEW_APP</code> access then the following
  45. fields in the report will be set to stubbed values:
  46. <ul>
  47. <li>host - set to "N/A"</li>
  48. <li>RPC port - set to -1</li>
  49. <li>client token - set to "N/A"</li>
  50. <li>diagnostics - set to "N/A"</li>
  51. <li>tracking URL - set to "N/A"</li>
  52. <li>original tracking URL - set to "N/A"</li>
  53. <li>resource usage report - all values are -1</li>
  54. </ul>
  55. @param appId
  56. {@link ApplicationId} of the application that needs a report
  57. @return application report
  58. @throws YarnException
  59. @throws IOException]]>
  60. </doc>
  61. </method>
  62. <method name="getApplications" return="java.util.List"
  63. abstract="true" native="false" synchronized="false"
  64. static="false" final="false" visibility="public"
  65. deprecated="not deprecated">
  66. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  67. <exception name="IOException" type="java.io.IOException"/>
  68. <doc>
  69. <![CDATA[<p>
  70. Get a report (ApplicationReport) of all Applications in the cluster.
  71. </p>
  72. <p>
  73. If the user does not have <code>VIEW_APP</code> access for an application
  74. then the corresponding report will be filtered as described in
  75. {@link #getApplicationReport(ApplicationId)}.
  76. </p>
  77. @return a list of reports for all applications
  78. @throws YarnException
  79. @throws IOException]]>
  80. </doc>
  81. </method>
  82. <method name="getApplicationAttemptReport" return="org.apache.hadoop.yarn.api.records.ApplicationAttemptReport"
  83. abstract="true" native="false" synchronized="false"
  84. static="false" final="false" visibility="public"
  85. deprecated="not deprecated">
  86. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  87. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  88. <exception name="IOException" type="java.io.IOException"/>
  89. <doc>
  90. <![CDATA[<p>
  91. Get a report of the given ApplicationAttempt.
  92. </p>
  93. <p>
  94. In secure mode, <code>YARN</code> verifies access to the application, queue
  95. etc. before accepting the request.
  96. </p>
  97. @param applicationAttemptId
  98. {@link ApplicationAttemptId} of the application attempt that needs
  99. a report
  100. @return application attempt report
  101. @throws YarnException
  102. @throws ApplicationAttemptNotFoundException if application attempt
  103. not found
  104. @throws IOException]]>
  105. </doc>
  106. </method>
  107. <method name="getApplicationAttempts" return="java.util.List"
  108. abstract="true" native="false" synchronized="false"
  109. static="false" final="false" visibility="public"
  110. deprecated="not deprecated">
  111. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  112. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  113. <exception name="IOException" type="java.io.IOException"/>
  114. <doc>
  115. <![CDATA[<p>
  116. Get a report of all (ApplicationAttempts) of Application in the cluster.
  117. </p>
  118. @param applicationId
  119. @return a list of reports for all application attempts for specified
  120. application
  121. @throws YarnException
  122. @throws IOException]]>
  123. </doc>
  124. </method>
  125. <method name="getContainerReport" return="org.apache.hadoop.yarn.api.records.ContainerReport"
  126. abstract="true" native="false" synchronized="false"
  127. static="false" final="false" visibility="public"
  128. deprecated="not deprecated">
  129. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  130. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  131. <exception name="IOException" type="java.io.IOException"/>
  132. <doc>
  133. <![CDATA[<p>
  134. Get a report of the given Container.
  135. </p>
  136. <p>
  137. In secure mode, <code>YARN</code> verifies access to the application, queue
  138. etc. before accepting the request.
  139. </p>
  140. @param containerId
  141. {@link ContainerId} of the container that needs a report
  142. @return container report
  143. @throws YarnException
  144. @throws ContainerNotFoundException if container not found
  145. @throws IOException]]>
  146. </doc>
  147. </method>
  148. <method name="getContainers" return="java.util.List"
  149. abstract="true" native="false" synchronized="false"
  150. static="false" final="false" visibility="public"
  151. deprecated="not deprecated">
  152. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  153. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  154. <exception name="IOException" type="java.io.IOException"/>
  155. <doc>
  156. <![CDATA[<p>
  157. Get a report of all (Containers) of ApplicationAttempt in the cluster.
  158. </p>
  159. @param applicationAttemptId
  160. @return a list of reports of all containers for specified application
  161. attempt
  162. @throws YarnException
  163. @throws IOException]]>
  164. </doc>
  165. </method>
  166. </class>
  167. <!-- end class org.apache.hadoop.yarn.client.api.AHSClient -->
  168. <!-- start class org.apache.hadoop.yarn.client.api.AMRMClient -->
  169. <class name="AMRMClient" extends="org.apache.hadoop.service.AbstractService"
  170. abstract="true"
  171. static="false" final="false" visibility="public"
  172. deprecated="not deprecated">
  173. <constructor name="AMRMClient" type="java.lang.String"
  174. static="false" final="false" visibility="protected"
  175. deprecated="not deprecated">
  176. </constructor>
  177. <method name="createAMRMClient" return="org.apache.hadoop.yarn.client.api.AMRMClient"
  178. abstract="false" native="false" synchronized="false"
  179. static="true" final="false" visibility="public"
  180. deprecated="not deprecated">
  181. <doc>
  182. <![CDATA[Create a new instance of AMRMClient.
  183. For usage:
  184. <pre>
  185. {@code
  186. AMRMClient.<T>createAMRMClientContainerRequest()
  187. }</pre>
  188. @return the newly create AMRMClient instance.]]>
  189. </doc>
  190. </method>
  191. <method name="registerApplicationMaster" return="org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse"
  192. abstract="true" native="false" synchronized="false"
  193. static="false" final="false" visibility="public"
  194. deprecated="not deprecated">
  195. <param name="appHostName" type="java.lang.String"/>
  196. <param name="appHostPort" type="int"/>
  197. <param name="appTrackingUrl" type="java.lang.String"/>
  198. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  199. <exception name="IOException" type="java.io.IOException"/>
  200. <doc>
  201. <![CDATA[Register the application master. This must be called before any
  202. other interaction
  203. @param appHostName Name of the host on which master is running
  204. @param appHostPort Port master is listening on
  205. @param appTrackingUrl URL at which the master info can be seen
  206. @return <code>RegisterApplicationMasterResponse</code>
  207. @throws YarnException
  208. @throws IOException]]>
  209. </doc>
  210. </method>
  211. <method name="allocate" return="org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse"
  212. abstract="true" native="false" synchronized="false"
  213. static="false" final="false" visibility="public"
  214. deprecated="not deprecated">
  215. <param name="progressIndicator" type="float"/>
  216. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  217. <exception name="IOException" type="java.io.IOException"/>
  218. <doc>
  219. <![CDATA[Request additional containers and receive new container allocations.
  220. Requests made via <code>addContainerRequest</code> are sent to the
  221. <code>ResourceManager</code>. New containers assigned to the master are
  222. retrieved. Status of completed containers and node health updates are also
  223. retrieved. This also doubles up as a heartbeat to the ResourceManager and
  224. must be made periodically. The call may not always return any new
  225. allocations of containers. App should not make concurrent allocate
  226. requests. May cause request loss.
  227. <p>
  228. Note : If the user has not removed container requests that have already
  229. been satisfied, then the re-register may end up sending the entire
  230. container requests to the RM (including matched requests). Which would mean
  231. the RM could end up giving it a lot of new allocated containers.
  232. </p>
  233. @param progressIndicator Indicates progress made by the master
  234. @return the response of the allocate request
  235. @throws YarnException
  236. @throws IOException]]>
  237. </doc>
  238. </method>
  239. <method name="unregisterApplicationMaster"
  240. abstract="true" native="false" synchronized="false"
  241. static="false" final="false" visibility="public"
  242. deprecated="not deprecated">
  243. <param name="appStatus" type="org.apache.hadoop.yarn.api.records.FinalApplicationStatus"/>
  244. <param name="appMessage" type="java.lang.String"/>
  245. <param name="appTrackingUrl" type="java.lang.String"/>
  246. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  247. <exception name="IOException" type="java.io.IOException"/>
  248. <doc>
  249. <![CDATA[Unregister the application master. This must be called in the end.
  250. @param appStatus Success/Failure status of the master
  251. @param appMessage Diagnostics message on failure
  252. @param appTrackingUrl New URL to get master info
  253. @throws YarnException
  254. @throws IOException]]>
  255. </doc>
  256. </method>
  257. <method name="addContainerRequest"
  258. abstract="true" native="false" synchronized="false"
  259. static="false" final="false" visibility="public"
  260. deprecated="not deprecated">
  261. <param name="req" type="T"/>
  262. <doc>
  263. <![CDATA[Request containers for resources before calling <code>allocate</code>
  264. @param req Resource request]]>
  265. </doc>
  266. </method>
  267. <method name="removeContainerRequest"
  268. abstract="true" native="false" synchronized="false"
  269. static="false" final="false" visibility="public"
  270. deprecated="not deprecated">
  271. <param name="req" type="T"/>
  272. <doc>
  273. <![CDATA[Remove previous container request. The previous container request may have
  274. already been sent to the ResourceManager. So even after the remove request
  275. the app must be prepared to receive an allocation for the previous request
  276. even after the remove request
  277. @param req Resource request]]>
  278. </doc>
  279. </method>
  280. <method name="releaseAssignedContainer"
  281. abstract="true" native="false" synchronized="false"
  282. static="false" final="false" visibility="public"
  283. deprecated="not deprecated">
  284. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  285. <doc>
  286. <![CDATA[Release containers assigned by the Resource Manager. If the app cannot use
  287. the container or wants to give up the container then it can release them.
  288. The app needs to make new requests for the released resource capability if
  289. it still needs it. eg. it released non-local resources
  290. @param containerId]]>
  291. </doc>
  292. </method>
  293. <method name="getAvailableResources" return="org.apache.hadoop.yarn.api.records.Resource"
  294. abstract="true" native="false" synchronized="false"
  295. static="false" final="false" visibility="public"
  296. deprecated="not deprecated">
  297. <doc>
  298. <![CDATA[Get the currently available resources in the cluster.
  299. A valid value is available after a call to allocate has been made
  300. @return Currently available resources]]>
  301. </doc>
  302. </method>
  303. <method name="getClusterNodeCount" return="int"
  304. abstract="true" native="false" synchronized="false"
  305. static="false" final="false" visibility="public"
  306. deprecated="not deprecated">
  307. <doc>
  308. <![CDATA[Get the current number of nodes in the cluster.
  309. A valid values is available after a call to allocate has been made
  310. @return Current number of nodes in the cluster]]>
  311. </doc>
  312. </method>
  313. <method name="getMatchingRequests" return="java.util.List"
  314. abstract="true" native="false" synchronized="false"
  315. static="false" final="false" visibility="public"
  316. deprecated="not deprecated">
  317. <param name="priority" type="org.apache.hadoop.yarn.api.records.Priority"/>
  318. <param name="resourceName" type="java.lang.String"/>
  319. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  320. <doc>
  321. <![CDATA[Get outstanding <code>ContainerRequest</code>s matching the given
  322. parameters. These ContainerRequests should have been added via
  323. <code>addContainerRequest</code> earlier in the lifecycle. For performance,
  324. the AMRMClient may return its internal collection directly without creating
  325. a copy. Users should not perform mutable operations on the return value.
  326. Each collection in the list contains requests with identical
  327. <code>Resource</code> size that fit in the given capability. In a
  328. collection, requests will be returned in the same order as they were added.
  329. @return Collection of request matching the parameters]]>
  330. </doc>
  331. </method>
  332. <method name="updateBlacklist"
  333. abstract="true" native="false" synchronized="false"
  334. static="false" final="false" visibility="public"
  335. deprecated="not deprecated">
  336. <param name="blacklistAdditions" type="java.util.List"/>
  337. <param name="blacklistRemovals" type="java.util.List"/>
  338. <doc>
  339. <![CDATA[Update application's blacklist with addition or removal resources.
  340. @param blacklistAdditions list of resources which should be added to the
  341. application blacklist
  342. @param blacklistRemovals list of resources which should be removed from the
  343. application blacklist]]>
  344. </doc>
  345. </method>
  346. <method name="setNMTokenCache"
  347. abstract="false" native="false" synchronized="false"
  348. static="false" final="false" visibility="public"
  349. deprecated="not deprecated">
  350. <param name="nmTokenCache" type="org.apache.hadoop.yarn.client.api.NMTokenCache"/>
  351. <doc>
  352. <![CDATA[Set the NM token cache for the <code>AMRMClient</code>. This cache must
  353. be shared with the {@link NMClient} used to manage containers for the
  354. <code>AMRMClient</code>
  355. <p>
  356. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  357. singleton instance will be used.
  358. @param nmTokenCache the NM token cache to use.]]>
  359. </doc>
  360. </method>
  361. <method name="getNMTokenCache" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  362. abstract="false" native="false" synchronized="false"
  363. static="false" final="false" visibility="public"
  364. deprecated="not deprecated">
  365. <doc>
  366. <![CDATA[Get the NM token cache of the <code>AMRMClient</code>. This cache must be
  367. shared with the {@link NMClient} used to manage containers for the
  368. <code>AMRMClient</code>.
  369. <p>
  370. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  371. singleton instance will be used.
  372. @return the NM token cache.]]>
  373. </doc>
  374. </method>
  375. <method name="waitFor"
  376. abstract="false" native="false" synchronized="false"
  377. static="false" final="false" visibility="public"
  378. deprecated="not deprecated">
  379. <param name="check" type="com.google.common.base.Supplier"/>
  380. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  381. <doc>
  382. <![CDATA[Wait for <code>check</code> to return true for each 1000 ms.
  383. See also {@link #waitFor(com.google.common.base.Supplier, int)}
  384. and {@link #waitFor(com.google.common.base.Supplier, int, int)}
  385. @param check]]>
  386. </doc>
  387. </method>
  388. <method name="waitFor"
  389. abstract="false" native="false" synchronized="false"
  390. static="false" final="false" visibility="public"
  391. deprecated="not deprecated">
  392. <param name="check" type="com.google.common.base.Supplier"/>
  393. <param name="checkEveryMillis" type="int"/>
  394. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  395. <doc>
  396. <![CDATA[Wait for <code>check</code> to return true for each
  397. <code>checkEveryMillis</code> ms.
  398. See also {@link #waitFor(com.google.common.base.Supplier, int, int)}
  399. @param check user defined checker
  400. @param checkEveryMillis interval to call <code>check</code>]]>
  401. </doc>
  402. </method>
  403. <method name="waitFor"
  404. abstract="false" native="false" synchronized="false"
  405. static="false" final="false" visibility="public"
  406. deprecated="not deprecated">
  407. <param name="check" type="com.google.common.base.Supplier"/>
  408. <param name="checkEveryMillis" type="int"/>
  409. <param name="logInterval" type="int"/>
  410. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  411. <doc>
  412. <![CDATA[Wait for <code>check</code> to return true for each
  413. <code>checkEveryMillis</code> ms. In the main loop, this method will log
  414. the message "waiting in main loop" for each <code>logInterval</code> times
  415. iteration to confirm the thread is alive.
  416. @param check user defined checker
  417. @param checkEveryMillis interval to call <code>check</code>
  418. @param logInterval interval to log for each]]>
  419. </doc>
  420. </method>
  421. </class>
  422. <!-- end class org.apache.hadoop.yarn.client.api.AMRMClient -->
  423. <!-- start class org.apache.hadoop.yarn.client.api.NMClient -->
  424. <class name="NMClient" extends="org.apache.hadoop.service.AbstractService"
  425. abstract="true"
  426. static="false" final="false" visibility="public"
  427. deprecated="not deprecated">
  428. <constructor name="NMClient" type="java.lang.String"
  429. static="false" final="false" visibility="protected"
  430. deprecated="not deprecated">
  431. </constructor>
  432. <method name="createNMClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  433. abstract="false" native="false" synchronized="false"
  434. static="true" final="false" visibility="public"
  435. deprecated="not deprecated">
  436. <doc>
  437. <![CDATA[Create a new instance of NMClient.]]>
  438. </doc>
  439. </method>
  440. <method name="createNMClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  441. abstract="false" native="false" synchronized="false"
  442. static="true" final="false" visibility="public"
  443. deprecated="not deprecated">
  444. <param name="name" type="java.lang.String"/>
  445. <doc>
  446. <![CDATA[Create a new instance of NMClient.]]>
  447. </doc>
  448. </method>
  449. <method name="startContainer" return="java.util.Map"
  450. abstract="true" native="false" synchronized="false"
  451. static="false" final="false" visibility="public"
  452. deprecated="not deprecated">
  453. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  454. <param name="containerLaunchContext" type="org.apache.hadoop.yarn.api.records.ContainerLaunchContext"/>
  455. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  456. <exception name="IOException" type="java.io.IOException"/>
  457. <doc>
  458. <![CDATA[<p>Start an allocated container.</p>
  459. <p>The <code>ApplicationMaster</code> or other applications that use the
  460. client must provide the details of the allocated container, including the
  461. Id, the assigned node's Id and the token via {@link Container}. In
  462. addition, the AM needs to provide the {@link ContainerLaunchContext} as
  463. well.</p>
  464. @param container the allocated container
  465. @param containerLaunchContext the context information needed by the
  466. <code>NodeManager</code> to launch the
  467. container
  468. @return a map between the auxiliary service names and their outputs
  469. @throws YarnException
  470. @throws IOException]]>
  471. </doc>
  472. </method>
  473. <method name="stopContainer"
  474. abstract="true" native="false" synchronized="false"
  475. static="false" final="false" visibility="public"
  476. deprecated="not deprecated">
  477. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  478. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  479. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  480. <exception name="IOException" type="java.io.IOException"/>
  481. <doc>
  482. <![CDATA[<p>Stop an started container.</p>
  483. @param containerId the Id of the started container
  484. @param nodeId the Id of the <code>NodeManager</code>
  485. @throws YarnException
  486. @throws IOException]]>
  487. </doc>
  488. </method>
  489. <method name="getContainerStatus" return="org.apache.hadoop.yarn.api.records.ContainerStatus"
  490. abstract="true" native="false" synchronized="false"
  491. static="false" final="false" visibility="public"
  492. deprecated="not deprecated">
  493. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  494. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  495. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  496. <exception name="IOException" type="java.io.IOException"/>
  497. <doc>
  498. <![CDATA[<p>Query the status of a container.</p>
  499. @param containerId the Id of the started container
  500. @param nodeId the Id of the <code>NodeManager</code>
  501. @return the status of a container
  502. @throws YarnException
  503. @throws IOException]]>
  504. </doc>
  505. </method>
  506. <method name="cleanupRunningContainersOnStop"
  507. abstract="true" native="false" synchronized="false"
  508. static="false" final="false" visibility="public"
  509. deprecated="not deprecated">
  510. <param name="enabled" type="boolean"/>
  511. <doc>
  512. <![CDATA[<p>Set whether the containers that are started by this client, and are
  513. still running should be stopped when the client stops. By default, the
  514. feature should be enabled.</p> However, containers will be stopped only
  515. when service is stopped. i.e. after {@link NMClient#stop()}.
  516. @param enabled whether the feature is enabled or not]]>
  517. </doc>
  518. </method>
  519. <method name="setNMTokenCache"
  520. abstract="false" native="false" synchronized="false"
  521. static="false" final="false" visibility="public"
  522. deprecated="not deprecated">
  523. <param name="nmTokenCache" type="org.apache.hadoop.yarn.client.api.NMTokenCache"/>
  524. <doc>
  525. <![CDATA[Set the NM Token cache of the <code>NMClient</code>. This cache must be
  526. shared with the {@link AMRMClient} that requested the containers managed
  527. by this <code>NMClient</code>
  528. <p>
  529. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  530. singleton instance will be used.
  531. @param nmTokenCache the NM token cache to use.]]>
  532. </doc>
  533. </method>
  534. <method name="getNMTokenCache" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  535. abstract="false" native="false" synchronized="false"
  536. static="false" final="false" visibility="public"
  537. deprecated="not deprecated">
  538. <doc>
  539. <![CDATA[Get the NM token cache of the <code>NMClient</code>. This cache must be
  540. shared with the {@link AMRMClient} that requested the containers managed
  541. by this <code>NMClient</code>
  542. <p>
  543. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  544. singleton instance will be used.
  545. @return the NM token cache]]>
  546. </doc>
  547. </method>
  548. </class>
  549. <!-- end class org.apache.hadoop.yarn.client.api.NMClient -->
  550. <!-- start class org.apache.hadoop.yarn.client.api.NMTokenCache -->
  551. <class name="NMTokenCache" extends="java.lang.Object"
  552. abstract="false"
  553. static="false" final="false" visibility="public"
  554. deprecated="not deprecated">
  555. <constructor name="NMTokenCache"
  556. static="false" final="false" visibility="public"
  557. deprecated="not deprecated">
  558. <doc>
  559. <![CDATA[Creates a NM token cache instance.]]>
  560. </doc>
  561. </constructor>
  562. <method name="getSingleton" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  563. abstract="false" native="false" synchronized="false"
  564. static="true" final="false" visibility="public"
  565. deprecated="not deprecated">
  566. <doc>
  567. <![CDATA[Returns the singleton NM token cache.
  568. @return the singleton NM token cache.]]>
  569. </doc>
  570. </method>
  571. <method name="getNMToken" return="org.apache.hadoop.yarn.api.records.Token"
  572. abstract="false" native="false" synchronized="false"
  573. static="true" final="false" visibility="public"
  574. deprecated="not deprecated">
  575. <param name="nodeAddr" type="java.lang.String"/>
  576. <doc>
  577. <![CDATA[Returns NMToken, null if absent. Only the singleton obtained from
  578. {@link #getSingleton()} is looked at for the tokens. If you are using your
  579. own NMTokenCache that is different from the singleton, use
  580. {@link #getToken(String) }
  581. @param nodeAddr
  582. @return {@link Token} NMToken required for communicating with node manager]]>
  583. </doc>
  584. </method>
  585. <method name="setNMToken"
  586. abstract="false" native="false" synchronized="false"
  587. static="true" final="false" visibility="public"
  588. deprecated="not deprecated">
  589. <param name="nodeAddr" type="java.lang.String"/>
  590. <param name="token" type="org.apache.hadoop.yarn.api.records.Token"/>
  591. <doc>
  592. <![CDATA[Sets the NMToken for node address only in the singleton obtained from
  593. {@link #getSingleton()}. If you are using your own NMTokenCache that is
  594. different from the singleton, use {@link #setToken(String, Token) }
  595. @param nodeAddr
  596. node address (host:port)
  597. @param token
  598. NMToken]]>
  599. </doc>
  600. </method>
  601. <method name="getToken" return="org.apache.hadoop.yarn.api.records.Token"
  602. abstract="false" native="false" synchronized="false"
  603. static="false" final="false" visibility="public"
  604. deprecated="not deprecated">
  605. <param name="nodeAddr" type="java.lang.String"/>
  606. <doc>
  607. <![CDATA[Returns NMToken, null if absent
  608. @param nodeAddr
  609. @return {@link Token} NMToken required for communicating with node
  610. manager]]>
  611. </doc>
  612. </method>
  613. <method name="setToken"
  614. abstract="false" native="false" synchronized="false"
  615. static="false" final="false" visibility="public"
  616. deprecated="not deprecated">
  617. <param name="nodeAddr" type="java.lang.String"/>
  618. <param name="token" type="org.apache.hadoop.yarn.api.records.Token"/>
  619. <doc>
  620. <![CDATA[Sets the NMToken for node address
  621. @param nodeAddr node address (host:port)
  622. @param token NMToken]]>
  623. </doc>
  624. </method>
  625. <doc>
  626. <![CDATA[NMTokenCache manages NMTokens required for an Application Master
  627. communicating with individual NodeManagers.
  628. <p>
  629. By default Yarn client libraries {@link AMRMClient} and {@link NMClient} use
  630. {@link #getSingleton()} instance of the cache.
  631. <ul>
  632. <li>
  633. Using the singleton instance of the cache is appropriate when running a
  634. single ApplicationMaster in the same JVM.
  635. </li>
  636. <li>
  637. When using the singleton, users don't need to do anything special,
  638. {@link AMRMClient} and {@link NMClient} are already set up to use the
  639. default singleton {@link NMTokenCache}
  640. </li>
  641. </ul>
  642. If running multiple Application Masters in the same JVM, a different cache
  643. instance should be used for each Application Master.
  644. <ul>
  645. <li>
  646. If using the {@link AMRMClient} and the {@link NMClient}, setting up
  647. and using an instance cache is as follows:
  648. <pre>
  649. NMTokenCache nmTokenCache = new NMTokenCache();
  650. AMRMClient rmClient = AMRMClient.createAMRMClient();
  651. NMClient nmClient = NMClient.createNMClient();
  652. nmClient.setNMTokenCache(nmTokenCache);
  653. ...
  654. </pre>
  655. </li>
  656. <li>
  657. If using the {@link AMRMClientAsync} and the {@link NMClientAsync},
  658. setting up and using an instance cache is as follows:
  659. <pre>
  660. NMTokenCache nmTokenCache = new NMTokenCache();
  661. AMRMClient rmClient = AMRMClient.createAMRMClient();
  662. NMClient nmClient = NMClient.createNMClient();
  663. nmClient.setNMTokenCache(nmTokenCache);
  664. AMRMClientAsync rmClientAsync = new AMRMClientAsync(rmClient, 1000, [AMRM_CALLBACK]);
  665. NMClientAsync nmClientAsync = new NMClientAsync("nmClient", nmClient, [NM_CALLBACK]);
  666. ...
  667. </pre>
  668. </li>
  669. <li>
  670. If using {@link ApplicationMasterProtocol} and
  671. {@link ContainerManagementProtocol} directly, setting up and using an
  672. instance cache is as follows:
  673. <pre>
  674. NMTokenCache nmTokenCache = new NMTokenCache();
  675. ...
  676. ApplicationMasterProtocol amPro = ClientRMProxy.createRMProxy(conf, ApplicationMasterProtocol.class);
  677. ...
  678. AllocateRequest allocateRequest = ...
  679. ...
  680. AllocateResponse allocateResponse = rmClient.allocate(allocateRequest);
  681. for (NMToken token : allocateResponse.getNMTokens()) {
  682. nmTokenCache.setToken(token.getNodeId().toString(), token.getToken());
  683. }
  684. ...
  685. ContainerManagementProtocolProxy nmPro = ContainerManagementProtocolProxy(conf, nmTokenCache);
  686. ...
  687. nmPro.startContainer(container, containerContext);
  688. ...
  689. </pre>
  690. </li>
  691. </ul>
  692. It is also possible to mix the usage of a client ({@code AMRMClient} or
  693. {@code NMClient}, or the async versions of them) with a protocol proxy
  694. ({@code ContainerManagementProtocolProxy} or
  695. {@code ApplicationMasterProtocol}).]]>
  696. </doc>
  697. </class>
  698. <!-- end class org.apache.hadoop.yarn.client.api.NMTokenCache -->
  699. <!-- start class org.apache.hadoop.yarn.client.api.SharedCacheClient -->
  700. <class name="SharedCacheClient" extends="org.apache.hadoop.service.AbstractService"
  701. abstract="true"
  702. static="false" final="false" visibility="public"
  703. deprecated="not deprecated">
  704. <constructor name="SharedCacheClient" type="java.lang.String"
  705. static="false" final="false" visibility="public"
  706. deprecated="not deprecated">
  707. </constructor>
  708. <method name="createSharedCacheClient" return="org.apache.hadoop.yarn.client.api.SharedCacheClient"
  709. abstract="false" native="false" synchronized="false"
  710. static="true" final="false" visibility="public"
  711. deprecated="not deprecated">
  712. </method>
  713. <method name="use" return="org.apache.hadoop.fs.Path"
  714. abstract="true" native="false" synchronized="false"
  715. static="false" final="false" visibility="public"
  716. deprecated="not deprecated">
  717. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  718. <param name="resourceKey" type="java.lang.String"/>
  719. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  720. <doc>
  721. <![CDATA[<p>
  722. The method to claim a resource with the <code>SharedCacheManager.</code>
  723. The client uses a checksum to identify the resource and an
  724. {@link ApplicationId} to identify which application will be using the
  725. resource.
  726. </p>
  727. <p>
  728. The <code>SharedCacheManager</code> responds with whether or not the
  729. resource exists in the cache. If the resource exists, a <code>Path</code>
  730. to the resource in the shared cache is returned. If the resource does not
  731. exist, null is returned instead.
  732. </p>
  733. @param applicationId ApplicationId of the application using the resource
  734. @param resourceKey the key (i.e. checksum) that identifies the resource
  735. @return Path to the resource, or null if it does not exist]]>
  736. </doc>
  737. </method>
  738. <method name="release"
  739. abstract="true" native="false" synchronized="false"
  740. static="false" final="false" visibility="public"
  741. deprecated="not deprecated">
  742. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  743. <param name="resourceKey" type="java.lang.String"/>
  744. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  745. <doc>
  746. <![CDATA[<p>
  747. The method to release a resource with the <code>SharedCacheManager.</code>
  748. This method is called once an application is no longer using a claimed
  749. resource in the shared cache. The client uses a checksum to identify the
  750. resource and an {@link ApplicationId} to identify which application is
  751. releasing the resource.
  752. </p>
  753. <p>
  754. Note: This method is an optimization and the client is not required to call
  755. it for correctness.
  756. </p>
  757. @param applicationId ApplicationId of the application releasing the
  758. resource
  759. @param resourceKey the key (i.e. checksum) that identifies the resource]]>
  760. </doc>
  761. </method>
  762. <method name="getFileChecksum" return="java.lang.String"
  763. abstract="true" native="false" synchronized="false"
  764. static="false" final="false" visibility="public"
  765. deprecated="not deprecated">
  766. <param name="sourceFile" type="org.apache.hadoop.fs.Path"/>
  767. <exception name="IOException" type="java.io.IOException"/>
  768. <doc>
  769. <![CDATA[A convenience method to calculate the checksum of a specified file.
  770. @param sourceFile A path to the input file
  771. @return A hex string containing the checksum digest
  772. @throws IOException]]>
  773. </doc>
  774. </method>
  775. <doc>
  776. <![CDATA[This is the client for YARN's shared cache.]]>
  777. </doc>
  778. </class>
  779. <!-- end class org.apache.hadoop.yarn.client.api.SharedCacheClient -->
  780. <!-- start class org.apache.hadoop.yarn.client.api.YarnClient -->
  781. <class name="YarnClient" extends="org.apache.hadoop.service.AbstractService"
  782. abstract="true"
  783. static="false" final="false" visibility="public"
  784. deprecated="not deprecated">
  785. <constructor name="YarnClient" type="java.lang.String"
  786. static="false" final="false" visibility="protected"
  787. deprecated="not deprecated">
  788. </constructor>
  789. <method name="createYarnClient" return="org.apache.hadoop.yarn.client.api.YarnClient"
  790. abstract="false" native="false" synchronized="false"
  791. static="true" final="false" visibility="public"
  792. deprecated="not deprecated">
  793. <doc>
  794. <![CDATA[Create a new instance of YarnClient.]]>
  795. </doc>
  796. </method>
  797. <method name="createApplication" return="org.apache.hadoop.yarn.client.api.YarnClientApplication"
  798. abstract="true" native="false" synchronized="false"
  799. static="false" final="false" visibility="public"
  800. deprecated="not deprecated">
  801. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  802. <exception name="IOException" type="java.io.IOException"/>
  803. <doc>
  804. <![CDATA[<p>
  805. Obtain a {@link YarnClientApplication} for a new application,
  806. which in turn contains the {@link ApplicationSubmissionContext} and
  807. {@link org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse}
  808. objects.
  809. </p>
  810. @return {@link YarnClientApplication} built for a new application
  811. @throws YarnException
  812. @throws IOException]]>
  813. </doc>
  814. </method>
  815. <method name="submitApplication" return="org.apache.hadoop.yarn.api.records.ApplicationId"
  816. abstract="true" native="false" synchronized="false"
  817. static="false" final="false" visibility="public"
  818. deprecated="not deprecated">
  819. <param name="appContext" type="org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"/>
  820. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  821. <exception name="IOException" type="java.io.IOException"/>
  822. <doc>
  823. <![CDATA[<p>
  824. Submit a new application to <code>YARN.</code> It is a blocking call - it
  825. will not return {@link ApplicationId} until the submitted application is
  826. submitted successfully and accepted by the ResourceManager.
  827. </p>
  828. <p>
  829. Users should provide an {@link ApplicationId} as part of the parameter
  830. {@link ApplicationSubmissionContext} when submitting a new application,
  831. otherwise it will throw the {@link ApplicationIdNotProvidedException}.
  832. </p>
  833. <p>This internally calls {@link ApplicationClientProtocol#submitApplication
  834. (SubmitApplicationRequest)}, and after that, it internally invokes
  835. {@link ApplicationClientProtocol#getApplicationReport
  836. (GetApplicationReportRequest)} and waits till it can make sure that the
  837. application gets properly submitted. If RM fails over or RM restart
  838. happens before ResourceManager saves the application's state,
  839. {@link ApplicationClientProtocol
  840. #getApplicationReport(GetApplicationReportRequest)} will throw
  841. the {@link ApplicationNotFoundException}. This API automatically resubmits
  842. the application with the same {@link ApplicationSubmissionContext} when it
  843. catches the {@link ApplicationNotFoundException}</p>
  844. @param appContext
  845. {@link ApplicationSubmissionContext} containing all the details
  846. needed to submit a new application
  847. @return {@link ApplicationId} of the accepted application
  848. @throws YarnException
  849. @throws IOException
  850. @see #createApplication()]]>
  851. </doc>
  852. </method>
  853. <method name="killApplication"
  854. abstract="true" native="false" synchronized="false"
  855. static="false" final="false" visibility="public"
  856. deprecated="not deprecated">
  857. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  858. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  859. <exception name="IOException" type="java.io.IOException"/>
  860. <doc>
  861. <![CDATA[<p>
  862. Kill an application identified by given ID.
  863. </p>
  864. @param applicationId
  865. {@link ApplicationId} of the application that needs to be killed
  866. @throws YarnException
  867. in case of errors or if YARN rejects the request due to
  868. access-control restrictions.
  869. @throws IOException
  870. @see #getQueueAclsInfo()]]>
  871. </doc>
  872. </method>
  873. <method name="getApplicationReport" return="org.apache.hadoop.yarn.api.records.ApplicationReport"
  874. abstract="true" native="false" synchronized="false"
  875. static="false" final="false" visibility="public"
  876. deprecated="not deprecated">
  877. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  878. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  879. <exception name="IOException" type="java.io.IOException"/>
  880. <doc>
  881. <![CDATA[<p>
  882. Get a report of the given Application.
  883. </p>
  884. <p>
  885. In secure mode, <code>YARN</code> verifies access to the application, queue
  886. etc. before accepting the request.
  887. </p>
  888. <p>
  889. If the user does not have <code>VIEW_APP</code> access then the following
  890. fields in the report will be set to stubbed values:
  891. <ul>
  892. <li>host - set to "N/A"</li>
  893. <li>RPC port - set to -1</li>
  894. <li>client token - set to "N/A"</li>
  895. <li>diagnostics - set to "N/A"</li>
  896. <li>tracking URL - set to "N/A"</li>
  897. <li>original tracking URL - set to "N/A"</li>
  898. <li>resource usage report - all values are -1</li>
  899. </ul>
  900. @param appId
  901. {@link ApplicationId} of the application that needs a report
  902. @return application report
  903. @throws YarnException
  904. @throws IOException]]>
  905. </doc>
  906. </method>
  907. <method name="getAMRMToken" return="org.apache.hadoop.security.token.Token"
  908. abstract="true" native="false" synchronized="false"
  909. static="false" final="false" visibility="public"
  910. deprecated="not deprecated">
  911. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  912. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  913. <exception name="IOException" type="java.io.IOException"/>
  914. <doc>
  915. <![CDATA[Get the AMRM token of the application.
  916. <p>
  917. The AMRM token is required for AM to RM scheduling operations. For
  918. managed Application Masters Yarn takes care of injecting it. For unmanaged
  919. Applications Masters, the token must be obtained via this method and set
  920. in the {@link org.apache.hadoop.security.UserGroupInformation} of the
  921. current user.
  922. <p>
  923. The AMRM token will be returned only if all the following conditions are
  924. met:
  925. <ul>
  926. <li>the requester is the owner of the ApplicationMaster</li>
  927. <li>the application master is an unmanaged ApplicationMaster</li>
  928. <li>the application master is in ACCEPTED state</li>
  929. </ul>
  930. Else this method returns NULL.
  931. @param appId {@link ApplicationId} of the application to get the AMRM token
  932. @return the AMRM token if available
  933. @throws YarnException
  934. @throws IOException]]>
  935. </doc>
  936. </method>
  937. <method name="getApplications" return="java.util.List"
  938. abstract="true" native="false" synchronized="false"
  939. static="false" final="false" visibility="public"
  940. deprecated="not deprecated">
  941. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  942. <exception name="IOException" type="java.io.IOException"/>
  943. <doc>
  944. <![CDATA[<p>
  945. Get a report (ApplicationReport) of all Applications in the cluster.
  946. </p>
  947. <p>
  948. If the user does not have <code>VIEW_APP</code> access for an application
  949. then the corresponding report will be filtered as described in
  950. {@link #getApplicationReport(ApplicationId)}.
  951. </p>
  952. @return a list of reports of all running applications
  953. @throws YarnException
  954. @throws IOException]]>
  955. </doc>
  956. </method>
  957. <method name="getApplications" return="java.util.List"
  958. abstract="true" native="false" synchronized="false"
  959. static="false" final="false" visibility="public"
  960. deprecated="not deprecated">
  961. <param name="applicationTypes" type="java.util.Set"/>
  962. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  963. <exception name="IOException" type="java.io.IOException"/>
  964. <doc>
  965. <![CDATA[<p>
  966. Get a report (ApplicationReport) of Applications
  967. matching the given application types in the cluster.
  968. </p>
  969. <p>
  970. If the user does not have <code>VIEW_APP</code> access for an application
  971. then the corresponding report will be filtered as described in
  972. {@link #getApplicationReport(ApplicationId)}.
  973. </p>
  974. @param applicationTypes
  975. @return a list of reports of applications
  976. @throws YarnException
  977. @throws IOException]]>
  978. </doc>
  979. </method>
  980. <method name="getApplications" return="java.util.List"
  981. abstract="true" native="false" synchronized="false"
  982. static="false" final="false" visibility="public"
  983. deprecated="not deprecated">
  984. <param name="applicationStates" type="java.util.EnumSet"/>
  985. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  986. <exception name="IOException" type="java.io.IOException"/>
  987. <doc>
  988. <![CDATA[<p>
  989. Get a report (ApplicationReport) of Applications matching the given
  990. application states in the cluster.
  991. </p>
  992. <p>
  993. If the user does not have <code>VIEW_APP</code> access for an application
  994. then the corresponding report will be filtered as described in
  995. {@link #getApplicationReport(ApplicationId)}.
  996. </p>
  997. @param applicationStates
  998. @return a list of reports of applications
  999. @throws YarnException
  1000. @throws IOException]]>
  1001. </doc>
  1002. </method>
  1003. <method name="getApplications" return="java.util.List"
  1004. abstract="true" native="false" synchronized="false"
  1005. static="false" final="false" visibility="public"
  1006. deprecated="not deprecated">
  1007. <param name="applicationTypes" type="java.util.Set"/>
  1008. <param name="applicationStates" type="java.util.EnumSet"/>
  1009. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1010. <exception name="IOException" type="java.io.IOException"/>
  1011. <doc>
  1012. <![CDATA[<p>
  1013. Get a report (ApplicationReport) of Applications matching the given
  1014. application types and application states in the cluster.
  1015. </p>
  1016. <p>
  1017. If the user does not have <code>VIEW_APP</code> access for an application
  1018. then the corresponding report will be filtered as described in
  1019. {@link #getApplicationReport(ApplicationId)}.
  1020. </p>
  1021. @param applicationTypes
  1022. @param applicationStates
  1023. @return a list of reports of applications
  1024. @throws YarnException
  1025. @throws IOException]]>
  1026. </doc>
  1027. </method>
  1028. <method name="getYarnClusterMetrics" return="org.apache.hadoop.yarn.api.records.YarnClusterMetrics"
  1029. abstract="true" native="false" synchronized="false"
  1030. static="false" final="false" visibility="public"
  1031. deprecated="not deprecated">
  1032. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1033. <exception name="IOException" type="java.io.IOException"/>
  1034. <doc>
  1035. <![CDATA[<p>
  1036. Get metrics ({@link YarnClusterMetrics}) about the cluster.
  1037. </p>
  1038. @return cluster metrics
  1039. @throws YarnException
  1040. @throws IOException]]>
  1041. </doc>
  1042. </method>
  1043. <method name="getNodeReports" return="java.util.List"
  1044. abstract="true" native="false" synchronized="false"
  1045. static="false" final="false" visibility="public"
  1046. deprecated="not deprecated">
  1047. <param name="states" type="org.apache.hadoop.yarn.api.records.NodeState[]"/>
  1048. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1049. <exception name="IOException" type="java.io.IOException"/>
  1050. <doc>
  1051. <![CDATA[<p>
  1052. Get a report of nodes ({@link NodeReport}) in the cluster.
  1053. </p>
  1054. @param states The {@link NodeState}s to filter on. If no filter states are
  1055. given, nodes in all states will be returned.
  1056. @return A list of node reports
  1057. @throws YarnException
  1058. @throws IOException]]>
  1059. </doc>
  1060. </method>
  1061. <method name="getRMDelegationToken" return="org.apache.hadoop.yarn.api.records.Token"
  1062. abstract="true" native="false" synchronized="false"
  1063. static="false" final="false" visibility="public"
  1064. deprecated="not deprecated">
  1065. <param name="renewer" type="org.apache.hadoop.io.Text"/>
  1066. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1067. <exception name="IOException" type="java.io.IOException"/>
  1068. <doc>
  1069. <![CDATA[<p>
  1070. Get a delegation token so as to be able to talk to YARN using those tokens.
  1071. @param renewer
  1072. Address of the renewer who can renew these tokens when needed by
  1073. securely talking to YARN.
  1074. @return a delegation token ({@link Token}) that can be used to
  1075. talk to YARN
  1076. @throws YarnException
  1077. @throws IOException]]>
  1078. </doc>
  1079. </method>
  1080. <method name="getQueueInfo" return="org.apache.hadoop.yarn.api.records.QueueInfo"
  1081. abstract="true" native="false" synchronized="false"
  1082. static="false" final="false" visibility="public"
  1083. deprecated="not deprecated">
  1084. <param name="queueName" type="java.lang.String"/>
  1085. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1086. <exception name="IOException" type="java.io.IOException"/>
  1087. <doc>
  1088. <![CDATA[<p>
  1089. Get information ({@link QueueInfo}) about a given <em>queue</em>.
  1090. </p>
  1091. @param queueName
  1092. Name of the queue whose information is needed
  1093. @return queue information
  1094. @throws YarnException
  1095. in case of errors or if YARN rejects the request due to
  1096. access-control restrictions.
  1097. @throws IOException]]>
  1098. </doc>
  1099. </method>
  1100. <method name="getAllQueues" return="java.util.List"
  1101. abstract="true" native="false" synchronized="false"
  1102. static="false" final="false" visibility="public"
  1103. deprecated="not deprecated">
  1104. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1105. <exception name="IOException" type="java.io.IOException"/>
  1106. <doc>
  1107. <![CDATA[<p>
  1108. Get information ({@link QueueInfo}) about all queues, recursively if there
  1109. is a hierarchy
  1110. </p>
  1111. @return a list of queue-information for all queues
  1112. @throws YarnException
  1113. @throws IOException]]>
  1114. </doc>
  1115. </method>
  1116. <method name="getRootQueueInfos" return="java.util.List"
  1117. abstract="true" native="false" synchronized="false"
  1118. static="false" final="false" visibility="public"
  1119. deprecated="not deprecated">
  1120. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1121. <exception name="IOException" type="java.io.IOException"/>
  1122. <doc>
  1123. <![CDATA[<p>
  1124. Get information ({@link QueueInfo}) about top level queues.
  1125. </p>
  1126. @return a list of queue-information for all the top-level queues
  1127. @throws YarnException
  1128. @throws IOException]]>
  1129. </doc>
  1130. </method>
  1131. <method name="getChildQueueInfos" return="java.util.List"
  1132. abstract="true" native="false" synchronized="false"
  1133. static="false" final="false" visibility="public"
  1134. deprecated="not deprecated">
  1135. <param name="parent" type="java.lang.String"/>
  1136. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1137. <exception name="IOException" type="java.io.IOException"/>
  1138. <doc>
  1139. <![CDATA[<p>
  1140. Get information ({@link QueueInfo}) about all the immediate children queues
  1141. of the given queue
  1142. </p>
  1143. @param parent
  1144. Name of the queue whose child-queues' information is needed
  1145. @return a list of queue-information for all queues who are direct children
  1146. of the given parent queue.
  1147. @throws YarnException
  1148. @throws IOException]]>
  1149. </doc>
  1150. </method>
  1151. <method name="getQueueAclsInfo" return="java.util.List"
  1152. abstract="true" native="false" synchronized="false"
  1153. static="false" final="false" visibility="public"
  1154. deprecated="not deprecated">
  1155. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1156. <exception name="IOException" type="java.io.IOException"/>
  1157. <doc>
  1158. <![CDATA[<p>
  1159. Get information about <em>acls</em> for <em>current user</em> on all the
  1160. existing queues.
  1161. </p>
  1162. @return a list of queue acls ({@link QueueUserACLInfo}) for
  1163. <em>current user</em>
  1164. @throws YarnException
  1165. @throws IOException]]>
  1166. </doc>
  1167. </method>
  1168. <method name="getApplicationAttemptReport" return="org.apache.hadoop.yarn.api.records.ApplicationAttemptReport"
  1169. abstract="true" native="false" synchronized="false"
  1170. static="false" final="false" visibility="public"
  1171. deprecated="not deprecated">
  1172. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  1173. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1174. <exception name="IOException" type="java.io.IOException"/>
  1175. <doc>
  1176. <![CDATA[<p>
  1177. Get a report of the given ApplicationAttempt.
  1178. </p>
  1179. <p>
  1180. In secure mode, <code>YARN</code> verifies access to the application, queue
  1181. etc. before accepting the request.
  1182. </p>
  1183. @param applicationAttemptId
  1184. {@link ApplicationAttemptId} of the application attempt that needs
  1185. a report
  1186. @return application attempt report
  1187. @throws YarnException
  1188. @throws ApplicationAttemptNotFoundException if application attempt
  1189. not found
  1190. @throws IOException]]>
  1191. </doc>
  1192. </method>
  1193. <method name="getApplicationAttempts" return="java.util.List"
  1194. abstract="true" native="false" synchronized="false"
  1195. static="false" final="false" visibility="public"
  1196. deprecated="not deprecated">
  1197. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  1198. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1199. <exception name="IOException" type="java.io.IOException"/>
  1200. <doc>
  1201. <![CDATA[<p>
  1202. Get a report of all (ApplicationAttempts) of Application in the cluster.
  1203. </p>
  1204. @param applicationId
  1205. @return a list of reports for all application attempts for specified
  1206. application.
  1207. @throws YarnException
  1208. @throws IOException]]>
  1209. </doc>
  1210. </method>
  1211. <method name="getContainerReport" return="org.apache.hadoop.yarn.api.records.ContainerReport"
  1212. abstract="true" native="false" synchronized="false"
  1213. static="false" final="false" visibility="public"
  1214. deprecated="not deprecated">
  1215. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1216. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1217. <exception name="IOException" type="java.io.IOException"/>
  1218. <doc>
  1219. <![CDATA[<p>
  1220. Get a report of the given Container.
  1221. </p>
  1222. <p>
  1223. In secure mode, <code>YARN</code> verifies access to the application, queue
  1224. etc. before accepting the request.
  1225. </p>
  1226. @param containerId
  1227. {@link ContainerId} of the container that needs a report
  1228. @return container report
  1229. @throws YarnException
  1230. @throws ContainerNotFoundException if container not found.
  1231. @throws IOException]]>
  1232. </doc>
  1233. </method>
  1234. <method name="getContainers" return="java.util.List"
  1235. abstract="true" native="false" synchronized="false"
  1236. static="false" final="false" visibility="public"
  1237. deprecated="not deprecated">
  1238. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  1239. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1240. <exception name="IOException" type="java.io.IOException"/>
  1241. <doc>
  1242. <![CDATA[<p>
  1243. Get a report of all (Containers) of ApplicationAttempt in the cluster.
  1244. </p>
  1245. @param applicationAttemptId
  1246. @return a list of reports of all containers for specified application
  1247. attempts
  1248. @throws YarnException
  1249. @throws IOException]]>
  1250. </doc>
  1251. </method>
  1252. <method name="moveApplicationAcrossQueues"
  1253. abstract="true" native="false" synchronized="false"
  1254. static="false" final="false" visibility="public"
  1255. deprecated="not deprecated">
  1256. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  1257. <param name="queue" type="java.lang.String"/>
  1258. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1259. <exception name="IOException" type="java.io.IOException"/>
  1260. <doc>
  1261. <![CDATA[<p>
  1262. Attempts to move the given application to the given queue.
  1263. </p>
  1264. @param appId
  1265. Application to move.
  1266. @param queue
  1267. Queue to place it in to.
  1268. @throws YarnException
  1269. @throws IOException]]>
  1270. </doc>
  1271. </method>
  1272. <method name="submitReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse"
  1273. abstract="true" native="false" synchronized="false"
  1274. static="false" final="false" visibility="public"
  1275. deprecated="not deprecated">
  1276. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest"/>
  1277. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1278. <exception name="IOException" type="java.io.IOException"/>
  1279. <doc>
  1280. <![CDATA[<p>
  1281. The interface used by clients to submit a new reservation to the
  1282. {@code ResourceManager}.
  1283. </p>
  1284. <p>
  1285. The client packages all details of its request in a
  1286. {@link ReservationSubmissionRequest} object. This contains information
  1287. about the amount of capacity, temporal constraints, and gang needs.
  1288. Furthermore, the reservation might be composed of multiple stages, with
  1289. ordering dependencies among them.
  1290. </p>
  1291. <p>
  1292. In order to respond, a new admission control component in the
  1293. {@code ResourceManager} performs an analysis of the resources that have
  1294. been committed over the period of time the user is requesting, verify that
  1295. the user requests can be fulfilled, and that it respect a sharing policy
  1296. (e.g., {@code CapacityOverTimePolicy}). Once it has positively determined
  1297. that the ReservationRequest is satisfiable the {@code ResourceManager}
  1298. answers with a {@link ReservationSubmissionResponse} that includes a
  1299. {@link ReservationId}. Upon failure to find a valid allocation the response
  1300. is an exception with the message detailing the reason of failure.
  1301. </p>
  1302. <p>
  1303. The semantics guarantees that the {@link ReservationId} returned,
  1304. corresponds to a valid reservation existing in the time-range request by
  1305. the user. The amount of capacity dedicated to such reservation can vary
  1306. overtime, depending of the allocation that has been determined. But it is
  1307. guaranteed to satisfy all the constraint expressed by the user in the
  1308. {@link ReservationDefinition}
  1309. </p>
  1310. @param request request to submit a new Reservation
  1311. @return response contains the {@link ReservationId} on accepting the
  1312. submission
  1313. @throws YarnException if the reservation cannot be created successfully
  1314. @throws IOException]]>
  1315. </doc>
  1316. </method>
  1317. <method name="updateReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse"
  1318. abstract="true" native="false" synchronized="false"
  1319. static="false" final="false" visibility="public"
  1320. deprecated="not deprecated">
  1321. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest"/>
  1322. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1323. <exception name="IOException" type="java.io.IOException"/>
  1324. <doc>
  1325. <![CDATA[<p>
  1326. The interface used by clients to update an existing Reservation. This is
  1327. referred to as a re-negotiation process, in which a user that has
  1328. previously submitted a Reservation.
  1329. </p>
  1330. <p>
  1331. The allocation is attempted by virtually substituting all previous
  1332. allocations related to this Reservation with new ones, that satisfy the new
  1333. {@link ReservationDefinition}. Upon success the previous allocation is
  1334. atomically substituted by the new one, and on failure (i.e., if the system
  1335. cannot find a valid allocation for the updated request), the previous
  1336. allocation remains valid.
  1337. </p>
  1338. @param request to update an existing Reservation (the
  1339. {@link ReservationUpdateRequest} should refer to an existing valid
  1340. {@link ReservationId})
  1341. @return response empty on successfully updating the existing reservation
  1342. @throws YarnException if the request is invalid or reservation cannot be
  1343. updated successfully
  1344. @throws IOException]]>
  1345. </doc>
  1346. </method>
  1347. <method name="deleteReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse"
  1348. abstract="true" native="false" synchronized="false"
  1349. static="false" final="false" visibility="public"
  1350. deprecated="not deprecated">
  1351. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest"/>
  1352. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1353. <exception name="IOException" type="java.io.IOException"/>
  1354. <doc>
  1355. <![CDATA[<p>
  1356. The interface used by clients to remove an existing Reservation.
  1357. </p>
  1358. @param request to remove an existing Reservation (the
  1359. {@link ReservationDeleteRequest} should refer to an existing valid
  1360. {@link ReservationId})
  1361. @return response empty on successfully deleting the existing reservation
  1362. @throws YarnException if the request is invalid or reservation cannot be
  1363. deleted successfully
  1364. @throws IOException]]>
  1365. </doc>
  1366. </method>
  1367. <method name="getNodeToLabels" return="java.util.Map"
  1368. abstract="true" native="false" synchronized="false"
  1369. static="false" final="false" visibility="public"
  1370. deprecated="not deprecated">
  1371. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1372. <exception name="IOException" type="java.io.IOException"/>
  1373. <doc>
  1374. <![CDATA[<p>
  1375. The interface used by client to get node to labels mappings in existing cluster
  1376. </p>
  1377. @return node to labels mappings
  1378. @throws YarnException
  1379. @throws IOException]]>
  1380. </doc>
  1381. </method>
  1382. <method name="getLabelsToNodes" return="java.util.Map"
  1383. abstract="true" native="false" synchronized="false"
  1384. static="false" final="false" visibility="public"
  1385. deprecated="not deprecated">
  1386. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1387. <exception name="IOException" type="java.io.IOException"/>
  1388. <doc>
  1389. <![CDATA[<p>
  1390. The interface used by client to get labels to nodes mapping
  1391. in existing cluster
  1392. </p>
  1393. @return node to labels mappings
  1394. @throws YarnException
  1395. @throws IOException]]>
  1396. </doc>
  1397. </method>
  1398. <method name="getLabelsToNodes" return="java.util.Map"
  1399. abstract="true" native="false" synchronized="false"
  1400. static="false" final="false" visibility="public"
  1401. deprecated="not deprecated">
  1402. <param name="labels" type="java.util.Set"/>
  1403. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1404. <exception name="IOException" type="java.io.IOException"/>
  1405. <doc>
  1406. <![CDATA[<p>
  1407. The interface used by client to get labels to nodes mapping
  1408. for specified labels in existing cluster
  1409. </p>
  1410. @param labels labels for which labels to nodes mapping has to be retrieved
  1411. @return labels to nodes mappings for specific labels
  1412. @throws YarnException
  1413. @throws IOException]]>
  1414. </doc>
  1415. </method>
  1416. <method name="getClusterNodeLabels" return="java.util.Set"
  1417. abstract="true" native="false" synchronized="false"
  1418. static="false" final="false" visibility="public"
  1419. deprecated="not deprecated">
  1420. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1421. <exception name="IOException" type="java.io.IOException"/>
  1422. <doc>
  1423. <![CDATA[<p>
  1424. The interface used by client to get node labels in the cluster
  1425. </p>
  1426. @return cluster node labels collection
  1427. @throws YarnException
  1428. @throws IOException]]>
  1429. </doc>
  1430. </method>
  1431. </class>
  1432. <!-- end class org.apache.hadoop.yarn.client.api.YarnClient -->
  1433. <!-- start class org.apache.hadoop.yarn.client.api.YarnClientApplication -->
  1434. <class name="YarnClientApplication" extends="java.lang.Object"
  1435. abstract="false"
  1436. static="false" final="false" visibility="public"
  1437. deprecated="not deprecated">
  1438. <constructor name="YarnClientApplication" type="org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse, org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"
  1439. static="false" final="false" visibility="public"
  1440. deprecated="not deprecated">
  1441. </constructor>
  1442. <method name="getNewApplicationResponse" return="org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse"
  1443. abstract="false" native="false" synchronized="false"
  1444. static="false" final="false" visibility="public"
  1445. deprecated="not deprecated">
  1446. </method>
  1447. <method name="getApplicationSubmissionContext" return="org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"
  1448. abstract="false" native="false" synchronized="false"
  1449. static="false" final="false" visibility="public"
  1450. deprecated="not deprecated">
  1451. </method>
  1452. </class>
  1453. <!-- end class org.apache.hadoop.yarn.client.api.YarnClientApplication -->
  1454. </package>
  1455. <package name="org.apache.hadoop.yarn.client.api.async">
  1456. <!-- start class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync -->
  1457. <class name="AMRMClientAsync" extends="org.apache.hadoop.service.AbstractService"
  1458. abstract="true"
  1459. static="false" final="false" visibility="public"
  1460. deprecated="not deprecated">
  1461. <constructor name="AMRMClientAsync" type="int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1462. static="false" final="false" visibility="protected"
  1463. deprecated="not deprecated">
  1464. </constructor>
  1465. <constructor name="AMRMClientAsync" type="org.apache.hadoop.yarn.client.api.AMRMClient, int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1466. static="false" final="false" visibility="protected"
  1467. deprecated="not deprecated">
  1468. </constructor>
  1469. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1470. abstract="false" native="false" synchronized="false"
  1471. static="true" final="false" visibility="public"
  1472. deprecated="not deprecated">
  1473. <param name="intervalMs" type="int"/>
  1474. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"/>
  1475. </method>
  1476. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1477. abstract="false" native="false" synchronized="false"
  1478. static="true" final="false" visibility="public"
  1479. deprecated="not deprecated">
  1480. <param name="client" type="org.apache.hadoop.yarn.client.api.AMRMClient"/>
  1481. <param name="intervalMs" type="int"/>
  1482. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"/>
  1483. </method>
  1484. <method name="setHeartbeatInterval"
  1485. abstract="false" native="false" synchronized="false"
  1486. static="false" final="false" visibility="public"
  1487. deprecated="not deprecated">
  1488. <param name="interval" type="int"/>
  1489. </method>
  1490. <method name="getMatchingRequests" return="java.util.List"
  1491. abstract="true" native="false" synchronized="false"
  1492. static="false" final="false" visibility="public"
  1493. deprecated="not deprecated">
  1494. <param name="priority" type="org.apache.hadoop.yarn.api.records.Priority"/>
  1495. <param name="resourceName" type="java.lang.String"/>
  1496. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  1497. </method>
  1498. <method name="registerApplicationMaster" return="org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse"
  1499. abstract="true" native="false" synchronized="false"
  1500. static="false" final="false" visibility="public"
  1501. deprecated="not deprecated">
  1502. <param name="appHostName" type="java.lang.String"/>
  1503. <param name="appHostPort" type="int"/>
  1504. <param name="appTrackingUrl" type="java.lang.String"/>
  1505. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1506. <exception name="IOException" type="java.io.IOException"/>
  1507. <doc>
  1508. <![CDATA[Registers this application master with the resource manager. On successful
  1509. registration, starts the heartbeating thread.
  1510. @throws YarnException
  1511. @throws IOException]]>
  1512. </doc>
  1513. </method>
  1514. <method name="unregisterApplicationMaster"
  1515. abstract="true" native="false" synchronized="false"
  1516. static="false" final="false" visibility="public"
  1517. deprecated="not deprecated">
  1518. <param name="appStatus" type="org.apache.hadoop.yarn.api.records.FinalApplicationStatus"/>
  1519. <param name="appMessage" type="java.lang.String"/>
  1520. <param name="appTrackingUrl" type="java.lang.String"/>
  1521. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1522. <exception name="IOException" type="java.io.IOException"/>
  1523. <doc>
  1524. <![CDATA[Unregister the application master. This must be called in the end.
  1525. @param appStatus Success/Failure status of the master
  1526. @param appMessage Diagnostics message on failure
  1527. @param appTrackingUrl New URL to get master info
  1528. @throws YarnException
  1529. @throws IOException]]>
  1530. </doc>
  1531. </method>
  1532. <method name="addContainerRequest"
  1533. abstract="true" native="false" synchronized="false"
  1534. static="false" final="false" visibility="public"
  1535. deprecated="not deprecated">
  1536. <param name="req" type="T"/>
  1537. <doc>
  1538. <![CDATA[Request containers for resources before calling <code>allocate</code>
  1539. @param req Resource request]]>
  1540. </doc>
  1541. </method>
  1542. <method name="removeContainerRequest"
  1543. abstract="true" native="false" synchronized="false"
  1544. static="false" final="false" visibility="public"
  1545. deprecated="not deprecated">
  1546. <param name="req" type="T"/>
  1547. <doc>
  1548. <![CDATA[Remove previous container request. The previous container request may have
  1549. already been sent to the ResourceManager. So even after the remove request
  1550. the app must be prepared to receive an allocation for the previous request
  1551. even after the remove request
  1552. @param req Resource request]]>
  1553. </doc>
  1554. </method>
  1555. <method name="releaseAssignedContainer"
  1556. abstract="true" native="false" synchronized="false"
  1557. static="false" final="false" visibility="public"
  1558. deprecated="not deprecated">
  1559. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1560. <doc>
  1561. <![CDATA[Release containers assigned by the Resource Manager. If the app cannot use
  1562. the container or wants to give up the container then it can release them.
  1563. The app needs to make new requests for the released resource capability if
  1564. it still needs it. eg. it released non-local resources
  1565. @param containerId]]>
  1566. </doc>
  1567. </method>
  1568. <method name="getAvailableResources" return="org.apache.hadoop.yarn.api.records.Resource"
  1569. abstract="true" native="false" synchronized="false"
  1570. static="false" final="false" visibility="public"
  1571. deprecated="not deprecated">
  1572. <doc>
  1573. <![CDATA[Get the currently available resources in the cluster.
  1574. A valid value is available after a call to allocate has been made
  1575. @return Currently available resources]]>
  1576. </doc>
  1577. </method>
  1578. <method name="getClusterNodeCount" return="int"
  1579. abstract="true" native="false" synchronized="false"
  1580. static="false" final="false" visibility="public"
  1581. deprecated="not deprecated">
  1582. <doc>
  1583. <![CDATA[Get the current number of nodes in the cluster.
  1584. A valid values is available after a call to allocate has been made
  1585. @return Current number of nodes in the cluster]]>
  1586. </doc>
  1587. </method>
  1588. <method name="updateBlacklist"
  1589. abstract="true" native="false" synchronized="false"
  1590. static="false" final="false" visibility="public"
  1591. deprecated="not deprecated">
  1592. <param name="blacklistAdditions" type="java.util.List"/>
  1593. <param name="blacklistRemovals" type="java.util.List"/>
  1594. <doc>
  1595. <![CDATA[Update application's blacklist with addition or removal resources.
  1596. @param blacklistAdditions list of resources which should be added to the
  1597. application blacklist
  1598. @param blacklistRemovals list of resources which should be removed from the
  1599. application blacklist]]>
  1600. </doc>
  1601. </method>
  1602. <method name="waitFor"
  1603. abstract="false" native="false" synchronized="false"
  1604. static="false" final="false" visibility="public"
  1605. deprecated="not deprecated">
  1606. <param name="check" type="com.google.common.base.Supplier"/>
  1607. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1608. <doc>
  1609. <![CDATA[Wait for <code>check</code> to return true for each 1000 ms.
  1610. See also {@link #waitFor(com.google.common.base.Supplier, int)}
  1611. and {@link #waitFor(com.google.common.base.Supplier, int, int)}
  1612. @param check]]>
  1613. </doc>
  1614. </method>
  1615. <method name="waitFor"
  1616. abstract="false" native="false" synchronized="false"
  1617. static="false" final="false" visibility="public"
  1618. deprecated="not deprecated">
  1619. <param name="check" type="com.google.common.base.Supplier"/>
  1620. <param name="checkEveryMillis" type="int"/>
  1621. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1622. <doc>
  1623. <![CDATA[Wait for <code>check</code> to return true for each
  1624. <code>checkEveryMillis</code> ms.
  1625. See also {@link #waitFor(com.google.common.base.Supplier, int, int)}
  1626. @param check user defined checker
  1627. @param checkEveryMillis interval to call <code>check</code>]]>
  1628. </doc>
  1629. </method>
  1630. <method name="waitFor"
  1631. abstract="false" native="false" synchronized="false"
  1632. static="false" final="false" visibility="public"
  1633. deprecated="not deprecated">
  1634. <param name="check" type="com.google.common.base.Supplier"/>
  1635. <param name="checkEveryMillis" type="int"/>
  1636. <param name="logInterval" type="int"/>
  1637. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1638. <doc>
  1639. <![CDATA[Wait for <code>check</code> to return true for each
  1640. <code>checkEveryMillis</code> ms. In the main loop, this method will log
  1641. the message "waiting in main loop" for each <code>logInterval</code> times
  1642. iteration to confirm the thread is alive.
  1643. @param check user defined checker
  1644. @param checkEveryMillis interval to call <code>check</code>
  1645. @param logInterval interval to log for each]]>
  1646. </doc>
  1647. </method>
  1648. <field name="client" type="org.apache.hadoop.yarn.client.api.AMRMClient"
  1649. transient="false" volatile="false"
  1650. static="false" final="true" visibility="protected"
  1651. deprecated="not deprecated">
  1652. </field>
  1653. <field name="handler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1654. transient="false" volatile="false"
  1655. static="false" final="true" visibility="protected"
  1656. deprecated="not deprecated">
  1657. </field>
  1658. <field name="heartbeatIntervalMs" type="java.util.concurrent.atomic.AtomicInteger"
  1659. transient="false" volatile="false"
  1660. static="false" final="true" visibility="protected"
  1661. deprecated="not deprecated">
  1662. </field>
  1663. <doc>
  1664. <![CDATA[<code>AMRMClientAsync</code> handles communication with the ResourceManager
  1665. and provides asynchronous updates on events such as container allocations and
  1666. completions. It contains a thread that sends periodic heartbeats to the
  1667. ResourceManager.
  1668. It should be used by implementing a CallbackHandler:
  1669. <pre>
  1670. {@code
  1671. class MyCallbackHandler implements AMRMClientAsync.CallbackHandler {
  1672. public void onContainersAllocated(List<Container> containers) {
  1673. [run tasks on the containers]
  1674. }
  1675. public void onContainersCompleted(List<ContainerStatus> statuses) {
  1676. [update progress, check whether app is done]
  1677. }
  1678. public void onNodesUpdated(List<NodeReport> updated) {}
  1679. public void onReboot() {}
  1680. }
  1681. }
  1682. </pre>
  1683. The client's lifecycle should be managed similarly to the following:
  1684. <pre>
  1685. {@code
  1686. AMRMClientAsync asyncClient =
  1687. createAMRMClientAsync(appAttId, 1000, new MyCallbackhandler());
  1688. asyncClient.init(conf);
  1689. asyncClient.start();
  1690. RegisterApplicationMasterResponse response = asyncClient
  1691. .registerApplicationMaster(appMasterHostname, appMasterRpcPort,
  1692. appMasterTrackingUrl);
  1693. asyncClient.addContainerRequest(containerRequest);
  1694. [... wait for application to complete]
  1695. asyncClient.unregisterApplicationMaster(status, appMsg, trackingUrl);
  1696. asyncClient.stop();
  1697. }
  1698. </pre>]]>
  1699. </doc>
  1700. </class>
  1701. <!-- end class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync -->
  1702. <!-- start class org.apache.hadoop.yarn.client.api.async.NMClientAsync -->
  1703. <class name="NMClientAsync" extends="org.apache.hadoop.service.AbstractService"
  1704. abstract="true"
  1705. static="false" final="false" visibility="public"
  1706. deprecated="not deprecated">
  1707. <constructor name="NMClientAsync" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1708. static="false" final="false" visibility="protected"
  1709. deprecated="not deprecated">
  1710. </constructor>
  1711. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1712. static="false" final="false" visibility="protected"
  1713. deprecated="not deprecated">
  1714. </constructor>
  1715. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.NMClient, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1716. static="false" final="false" visibility="protected"
  1717. deprecated="not deprecated">
  1718. </constructor>
  1719. <method name="createNMClientAsync" return="org.apache.hadoop.yarn.client.api.async.NMClientAsync"
  1720. abstract="false" native="false" synchronized="false"
  1721. static="true" final="false" visibility="public"
  1722. deprecated="not deprecated">
  1723. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"/>
  1724. </method>
  1725. <method name="startContainerAsync"
  1726. abstract="true" native="false" synchronized="false"
  1727. static="false" final="false" visibility="public"
  1728. deprecated="not deprecated">
  1729. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  1730. <param name="containerLaunchContext" type="org.apache.hadoop.yarn.api.records.ContainerLaunchContext"/>
  1731. </method>
  1732. <method name="stopContainerAsync"
  1733. abstract="true" native="false" synchronized="false"
  1734. static="false" final="false" visibility="public"
  1735. deprecated="not deprecated">
  1736. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1737. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  1738. </method>
  1739. <method name="getContainerStatusAsync"
  1740. abstract="true" native="false" synchronized="false"
  1741. static="false" final="false" visibility="public"
  1742. deprecated="not deprecated">
  1743. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1744. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  1745. </method>
  1746. <method name="getClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  1747. abstract="false" native="false" synchronized="false"
  1748. static="false" final="false" visibility="public"
  1749. deprecated="not deprecated">
  1750. </method>
  1751. <method name="setClient"
  1752. abstract="false" native="false" synchronized="false"
  1753. static="false" final="false" visibility="public"
  1754. deprecated="not deprecated">
  1755. <param name="client" type="org.apache.hadoop.yarn.client.api.NMClient"/>
  1756. </method>
  1757. <method name="getCallbackHandler" return="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1758. abstract="false" native="false" synchronized="false"
  1759. static="false" final="false" visibility="public"
  1760. deprecated="not deprecated">
  1761. </method>
  1762. <method name="setCallbackHandler"
  1763. abstract="false" native="false" synchronized="false"
  1764. static="false" final="false" visibility="public"
  1765. deprecated="not deprecated">
  1766. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"/>
  1767. </method>
  1768. <field name="client" type="org.apache.hadoop.yarn.client.api.NMClient"
  1769. transient="false" volatile="false"
  1770. static="false" final="false" visibility="protected"
  1771. deprecated="not deprecated">
  1772. </field>
  1773. <field name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1774. transient="false" volatile="false"
  1775. static="false" final="false" visibility="protected"
  1776. deprecated="not deprecated">
  1777. </field>
  1778. <doc>
  1779. <![CDATA[<code>NMClientAsync</code> handles communication with all the NodeManagers
  1780. and provides asynchronous updates on getting responses from them. It
  1781. maintains a thread pool to communicate with individual NMs where a number of
  1782. worker threads process requests to NMs by using {@link NMClientImpl}. The max
  1783. size of the thread pool is configurable through
  1784. {@link YarnConfiguration#NM_CLIENT_ASYNC_THREAD_POOL_MAX_SIZE}.
  1785. It should be used in conjunction with a CallbackHandler. For example
  1786. <pre>
  1787. {@code
  1788. class MyCallbackHandler implements NMClientAsync.CallbackHandler {
  1789. public void onContainerStarted(ContainerId containerId,
  1790. Map<String, ByteBuffer> allServiceResponse) {
  1791. [post process after the container is started, process the response]
  1792. }
  1793. public void onContainerStatusReceived(ContainerId containerId,
  1794. ContainerStatus containerStatus) {
  1795. [make use of the status of the container]
  1796. }
  1797. public void onContainerStopped(ContainerId containerId) {
  1798. [post process after the container is stopped]
  1799. }
  1800. public void onStartContainerError(
  1801. ContainerId containerId, Throwable t) {
  1802. [handle the raised exception]
  1803. }
  1804. public void onGetContainerStatusError(
  1805. ContainerId containerId, Throwable t) {
  1806. [handle the raised exception]
  1807. }
  1808. public void onStopContainerError(
  1809. ContainerId containerId, Throwable t) {
  1810. [handle the raised exception]
  1811. }
  1812. }
  1813. }
  1814. </pre>
  1815. The client's life-cycle should be managed like the following:
  1816. <pre>
  1817. {@code
  1818. NMClientAsync asyncClient =
  1819. NMClientAsync.createNMClientAsync(new MyCallbackhandler());
  1820. asyncClient.init(conf);
  1821. asyncClient.start();
  1822. asyncClient.startContainer(container, containerLaunchContext);
  1823. [... wait for container being started]
  1824. asyncClient.getContainerStatus(container.getId(), container.getNodeId(),
  1825. container.getContainerToken());
  1826. [... handle the status in the callback instance]
  1827. asyncClient.stopContainer(container.getId(), container.getNodeId(),
  1828. container.getContainerToken());
  1829. [... wait for container being stopped]
  1830. asyncClient.stop();
  1831. }
  1832. </pre>]]>
  1833. </doc>
  1834. </class>
  1835. <!-- end class org.apache.hadoop.yarn.client.api.async.NMClientAsync -->
  1836. </package>
  1837. <package name="org.apache.hadoop.yarn.client.api.async.impl">
  1838. </package>
  1839. <package name="org.apache.hadoop.yarn.client.api.impl">
  1840. </package>
  1841. <package name="org.apache.hadoop.yarn.client.cli">
  1842. <!-- start class org.apache.hadoop.yarn.client.cli.LogsCLI -->
  1843. <class name="LogsCLI" extends="org.apache.hadoop.conf.Configured"
  1844. abstract="false"
  1845. static="false" final="false" visibility="public"
  1846. deprecated="not deprecated">
  1847. <implements name="org.apache.hadoop.util.Tool"/>
  1848. <constructor name="LogsCLI"
  1849. static="false" final="false" visibility="public"
  1850. deprecated="not deprecated">
  1851. </constructor>
  1852. <method name="run" return="int"
  1853. abstract="false" native="false" synchronized="false"
  1854. static="false" final="false" visibility="public"
  1855. deprecated="not deprecated">
  1856. <param name="args" type="java.lang.String[]"/>
  1857. <exception name="Exception" type="java.lang.Exception"/>
  1858. </method>
  1859. <method name="createYarnClient" return="org.apache.hadoop.yarn.client.api.YarnClient"
  1860. abstract="false" native="false" synchronized="false"
  1861. static="false" final="false" visibility="protected"
  1862. deprecated="not deprecated">
  1863. </method>
  1864. <method name="main"
  1865. abstract="false" native="false" synchronized="false"
  1866. static="true" final="false" visibility="public"
  1867. deprecated="not deprecated">
  1868. <param name="args" type="java.lang.String[]"/>
  1869. <exception name="Exception" type="java.lang.Exception"/>
  1870. </method>
  1871. <field name="HELP_CMD" type="java.lang.String"
  1872. transient="false" volatile="false"
  1873. static="true" final="true" visibility="public"
  1874. deprecated="not deprecated">
  1875. </field>
  1876. </class>
  1877. <!-- end class org.apache.hadoop.yarn.client.cli.LogsCLI -->
  1878. </package>
  1879. </api>