Apache_Hadoop_YARN_Client_2.8.2.xml 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316
  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 Thu Oct 19 22:12:15 UTC 2017 -->
  5. <api
  6. xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  7. xsi:noNamespaceSchemaLocation='api.xsd'
  8. name="Apache Hadoop YARN Client 2.8.2"
  9. jdversion="1.0.9">
  10. <!-- Command line arguments = -doclet org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet -docletpath /build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/hadoop-annotations.jar:/build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/jdiff.jar -verbose -classpath /build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/classes:/build/source/hadoop-common-project/hadoop-common/target/hadoop-common-2.8.2.jar:/maven/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/maven/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/maven/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar:/maven/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar:/maven/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/maven/commons-io/commons-io/2.4/commons-io-2.4.jar:/maven/commons-net/commons-net/3.1/commons-net-3.1.jar:/maven/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/maven/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/maven/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/maven/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/maven/org/mortbay/jetty/jetty-sslengine/6.1.26/jetty-sslengine-6.1.26.jar:/maven/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar:/maven/com/sun/jersey/jersey-core/1.9/jersey-core-1.9.jar:/maven/com/sun/jersey/jersey-json/1.9/jersey-json-1.9.jar:/maven/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:/maven/com/sun/jersey/jersey-server/1.9/jersey-server-1.9.jar:/maven/asm/asm/3.2/asm-3.2.jar:/maven/net/java/dev/jets3t/jets3t/0.9.0/jets3t-0.9.0.jar:/maven/com/jamesmurty/utils/java-xmlbuilder/0.4/java-xmlbuilder-0.4.jar:/maven/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/maven/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/maven/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/maven/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/maven/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar:/maven/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar:/maven/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/maven/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/maven/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/maven/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/maven/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/maven/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/maven/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/build/source/hadoop-common-project/hadoop-auth/target/hadoop-auth-2.8.2.jar:/maven/com/nimbusds/nimbus-jose-jwt/3.9/nimbus-jose-jwt-3.9.jar:/maven/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar:/maven/net/minidev/json-smart/1.1.1/json-smart-1.1.1.jar:/maven/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/maven/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/maven/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/maven/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/maven/org/apache/curator/curator-framework/2.7.1/curator-framework-2.7.1.jar:/maven/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar:/maven/org/apache/curator/curator-client/2.7.1/curator-client-2.7.1.jar:/maven/org/apache/curator/curator-recipes/2.7.1/curator-recipes-2.7.1.jar:/maven/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar:/maven/org/apache/htrace/htrace-core4/4.0.1-incubating/htrace-core4-4.0.1-incubating.jar:/maven/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/maven/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/maven/org/tukaani/xz/1.0/xz-1.0.jar:/maven/com/google/guava/guava/11.0.2/guava-11.0.2.jar:/maven/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/maven/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/maven/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/maven/log4j/log4j/1.2.17/log4j-1.2.17.jar:/build/source/hadoop-common-project/hadoop-annotations/target/hadoop-annotations-2.8.2.jar:/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar:/maven/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/target/hadoop-yarn-api-2.8.2.jar:/build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/hadoop-yarn-common-2.8.2.jar:/maven/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/maven/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/maven/javax/activation/activation/1.1/activation-1.1.jar:/maven/com/sun/jersey/jersey-client/1.9/jersey-client-1.9.jar:/maven/org/codehaus/jackson/jackson-jaxrs/1.9.13/jackson-jaxrs-1.9.13.jar:/maven/org/codehaus/jackson/jackson-xc/1.9.13/jackson-xc-1.9.13.jar:/maven/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar:/maven/com/google/inject/guice/3.0/guice-3.0.jar:/maven/javax/inject/javax.inject/1/javax.inject-1.jar:/maven/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/maven/com/sun/jersey/contribs/jersey-guice/1.9/jersey-guice-1.9.jar:/maven/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar -sourcepath /build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java -apidir /build/source/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/target/site/jdiff/xml -apiname Apache Hadoop YARN Client 2.8.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="requestContainerResourceChange"
  281. abstract="true" native="false" synchronized="false"
  282. static="false" final="false" visibility="public"
  283. deprecated="not deprecated">
  284. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  285. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  286. <doc>
  287. <![CDATA[Request container resource change before calling <code>allocate</code>.
  288. Any previous pending resource change request of the same container will be
  289. removed.
  290. Application that calls this method is expected to maintain the
  291. <code>Container</code>s that are returned from previous successful
  292. allocations or resource changes. By passing in the existing container and a
  293. target resource capability to this method, the application requests the
  294. ResourceManager to change the existing resource allocation to the target
  295. resource allocation.
  296. @param container The container returned from the last successful resource
  297. allocation or resource change
  298. @param capability The target resource capability of the container]]>
  299. </doc>
  300. </method>
  301. <method name="releaseAssignedContainer"
  302. abstract="true" native="false" synchronized="false"
  303. static="false" final="false" visibility="public"
  304. deprecated="not deprecated">
  305. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  306. <doc>
  307. <![CDATA[Release containers assigned by the Resource Manager. If the app cannot use
  308. the container or wants to give up the container then it can release them.
  309. The app needs to make new requests for the released resource capability if
  310. it still needs it. eg. it released non-local resources
  311. @param containerId]]>
  312. </doc>
  313. </method>
  314. <method name="getAvailableResources" return="org.apache.hadoop.yarn.api.records.Resource"
  315. abstract="true" native="false" synchronized="false"
  316. static="false" final="false" visibility="public"
  317. deprecated="not deprecated">
  318. <doc>
  319. <![CDATA[Get the currently available resources in the cluster.
  320. A valid value is available after a call to allocate has been made
  321. @return Currently available resources]]>
  322. </doc>
  323. </method>
  324. <method name="getClusterNodeCount" return="int"
  325. abstract="true" native="false" synchronized="false"
  326. static="false" final="false" visibility="public"
  327. deprecated="not deprecated">
  328. <doc>
  329. <![CDATA[Get the current number of nodes in the cluster.
  330. A valid values is available after a call to allocate has been made
  331. @return Current number of nodes in the cluster]]>
  332. </doc>
  333. </method>
  334. <method name="getMatchingRequests" return="java.util.List"
  335. abstract="true" native="false" synchronized="false"
  336. static="false" final="false" visibility="public"
  337. deprecated="not deprecated">
  338. <param name="priority" type="org.apache.hadoop.yarn.api.records.Priority"/>
  339. <param name="resourceName" type="java.lang.String"/>
  340. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  341. <doc>
  342. <![CDATA[Get outstanding <code>ContainerRequest</code>s matching the given
  343. parameters. These ContainerRequests should have been added via
  344. <code>addContainerRequest</code> earlier in the lifecycle. For performance,
  345. the AMRMClient may return its internal collection directly without creating
  346. a copy. Users should not perform mutable operations on the return value.
  347. Each collection in the list contains requests with identical
  348. <code>Resource</code> size that fit in the given capability. In a
  349. collection, requests will be returned in the same order as they were added.
  350. @return Collection of request matching the parameters]]>
  351. </doc>
  352. </method>
  353. <method name="updateBlacklist"
  354. abstract="true" native="false" synchronized="false"
  355. static="false" final="false" visibility="public"
  356. deprecated="not deprecated">
  357. <param name="blacklistAdditions" type="java.util.List"/>
  358. <param name="blacklistRemovals" type="java.util.List"/>
  359. <doc>
  360. <![CDATA[Update application's blacklist with addition or removal resources.
  361. @param blacklistAdditions list of resources which should be added to the
  362. application blacklist
  363. @param blacklistRemovals list of resources which should be removed from the
  364. application blacklist]]>
  365. </doc>
  366. </method>
  367. <method name="setNMTokenCache"
  368. abstract="false" native="false" synchronized="false"
  369. static="false" final="false" visibility="public"
  370. deprecated="not deprecated">
  371. <param name="nmTokenCache" type="org.apache.hadoop.yarn.client.api.NMTokenCache"/>
  372. <doc>
  373. <![CDATA[Set the NM token cache for the <code>AMRMClient</code>. This cache must
  374. be shared with the {@link NMClient} used to manage containers for the
  375. <code>AMRMClient</code>
  376. <p>
  377. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  378. singleton instance will be used.
  379. @param nmTokenCache the NM token cache to use.]]>
  380. </doc>
  381. </method>
  382. <method name="getNMTokenCache" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  383. abstract="false" native="false" synchronized="false"
  384. static="false" final="false" visibility="public"
  385. deprecated="not deprecated">
  386. <doc>
  387. <![CDATA[Get the NM token cache of the <code>AMRMClient</code>. This cache must be
  388. shared with the {@link NMClient} used to manage containers for the
  389. <code>AMRMClient</code>.
  390. <p>
  391. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  392. singleton instance will be used.
  393. @return the NM token cache.]]>
  394. </doc>
  395. </method>
  396. <method name="waitFor"
  397. abstract="false" native="false" synchronized="false"
  398. static="false" final="false" visibility="public"
  399. deprecated="not deprecated">
  400. <param name="check" type="com.google.common.base.Supplier"/>
  401. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  402. <doc>
  403. <![CDATA[Wait for <code>check</code> to return true for each 1000 ms.
  404. See also {@link #waitFor(com.google.common.base.Supplier, int)}
  405. and {@link #waitFor(com.google.common.base.Supplier, int, int)}
  406. @param check]]>
  407. </doc>
  408. </method>
  409. <method name="waitFor"
  410. abstract="false" native="false" synchronized="false"
  411. static="false" final="false" visibility="public"
  412. deprecated="not deprecated">
  413. <param name="check" type="com.google.common.base.Supplier"/>
  414. <param name="checkEveryMillis" type="int"/>
  415. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  416. <doc>
  417. <![CDATA[Wait for <code>check</code> to return true for each
  418. <code>checkEveryMillis</code> ms.
  419. See also {@link #waitFor(com.google.common.base.Supplier, int, int)}
  420. @param check user defined checker
  421. @param checkEveryMillis interval to call <code>check</code>]]>
  422. </doc>
  423. </method>
  424. <method name="waitFor"
  425. abstract="false" native="false" synchronized="false"
  426. static="false" final="false" visibility="public"
  427. deprecated="not deprecated">
  428. <param name="check" type="com.google.common.base.Supplier"/>
  429. <param name="checkEveryMillis" type="int"/>
  430. <param name="logInterval" type="int"/>
  431. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  432. <doc>
  433. <![CDATA[Wait for <code>check</code> to return true for each
  434. <code>checkEveryMillis</code> ms. In the main loop, this method will log
  435. the message "waiting in main loop" for each <code>logInterval</code> times
  436. iteration to confirm the thread is alive.
  437. @param check user defined checker
  438. @param checkEveryMillis interval to call <code>check</code>
  439. @param logInterval interval to log for each]]>
  440. </doc>
  441. </method>
  442. </class>
  443. <!-- end class org.apache.hadoop.yarn.client.api.AMRMClient -->
  444. <!-- start class org.apache.hadoop.yarn.client.api.NMClient -->
  445. <class name="NMClient" extends="org.apache.hadoop.service.AbstractService"
  446. abstract="true"
  447. static="false" final="false" visibility="public"
  448. deprecated="not deprecated">
  449. <constructor name="NMClient" type="java.lang.String"
  450. static="false" final="false" visibility="protected"
  451. deprecated="not deprecated">
  452. </constructor>
  453. <method name="createNMClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  454. abstract="false" native="false" synchronized="false"
  455. static="true" final="false" visibility="public"
  456. deprecated="not deprecated">
  457. <doc>
  458. <![CDATA[Create a new instance of NMClient.]]>
  459. </doc>
  460. </method>
  461. <method name="createNMClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  462. abstract="false" native="false" synchronized="false"
  463. static="true" final="false" visibility="public"
  464. deprecated="not deprecated">
  465. <param name="name" type="java.lang.String"/>
  466. <doc>
  467. <![CDATA[Create a new instance of NMClient.]]>
  468. </doc>
  469. </method>
  470. <method name="startContainer" return="java.util.Map"
  471. abstract="true" native="false" synchronized="false"
  472. static="false" final="false" visibility="public"
  473. deprecated="not deprecated">
  474. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  475. <param name="containerLaunchContext" type="org.apache.hadoop.yarn.api.records.ContainerLaunchContext"/>
  476. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  477. <exception name="IOException" type="java.io.IOException"/>
  478. <doc>
  479. <![CDATA[<p>Start an allocated container.</p>
  480. <p>The <code>ApplicationMaster</code> or other applications that use the
  481. client must provide the details of the allocated container, including the
  482. Id, the assigned node's Id and the token via {@link Container}. In
  483. addition, the AM needs to provide the {@link ContainerLaunchContext} as
  484. well.</p>
  485. @param container the allocated container
  486. @param containerLaunchContext the context information needed by the
  487. <code>NodeManager</code> to launch the
  488. container
  489. @return a map between the auxiliary service names and their outputs
  490. @throws YarnException
  491. @throws IOException]]>
  492. </doc>
  493. </method>
  494. <method name="increaseContainerResource"
  495. abstract="true" native="false" synchronized="false"
  496. static="false" final="false" visibility="public"
  497. deprecated="not deprecated">
  498. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  499. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  500. <exception name="IOException" type="java.io.IOException"/>
  501. <doc>
  502. <![CDATA[<p>Increase the resource of a container.</p>
  503. <p>The <code>ApplicationMaster</code> or other applications that use the
  504. client must provide the details of the container, including the Id and
  505. the target resource encapsulated in the updated container token via
  506. {@link Container}.
  507. </p>
  508. @param container the container with updated token
  509. @throws YarnException
  510. @throws IOException]]>
  511. </doc>
  512. </method>
  513. <method name="stopContainer"
  514. abstract="true" native="false" synchronized="false"
  515. static="false" final="false" visibility="public"
  516. deprecated="not deprecated">
  517. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  518. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  519. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  520. <exception name="IOException" type="java.io.IOException"/>
  521. <doc>
  522. <![CDATA[<p>Stop an started container.</p>
  523. @param containerId the Id of the started container
  524. @param nodeId the Id of the <code>NodeManager</code>
  525. @throws YarnException
  526. @throws IOException]]>
  527. </doc>
  528. </method>
  529. <method name="getContainerStatus" return="org.apache.hadoop.yarn.api.records.ContainerStatus"
  530. abstract="true" native="false" synchronized="false"
  531. static="false" final="false" visibility="public"
  532. deprecated="not deprecated">
  533. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  534. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  535. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  536. <exception name="IOException" type="java.io.IOException"/>
  537. <doc>
  538. <![CDATA[<p>Query the status of a container.</p>
  539. @param containerId the Id of the started container
  540. @param nodeId the Id of the <code>NodeManager</code>
  541. @return the status of a container
  542. @throws YarnException
  543. @throws IOException]]>
  544. </doc>
  545. </method>
  546. <method name="cleanupRunningContainersOnStop"
  547. abstract="true" native="false" synchronized="false"
  548. static="false" final="false" visibility="public"
  549. deprecated="not deprecated">
  550. <param name="enabled" type="boolean"/>
  551. <doc>
  552. <![CDATA[<p>Set whether the containers that are started by this client, and are
  553. still running should be stopped when the client stops. By default, the
  554. feature should be enabled.</p> However, containers will be stopped only
  555. when service is stopped. i.e. after {@link NMClient#stop()}.
  556. @param enabled whether the feature is enabled or not]]>
  557. </doc>
  558. </method>
  559. <method name="setNMTokenCache"
  560. abstract="false" native="false" synchronized="false"
  561. static="false" final="false" visibility="public"
  562. deprecated="not deprecated">
  563. <param name="nmTokenCache" type="org.apache.hadoop.yarn.client.api.NMTokenCache"/>
  564. <doc>
  565. <![CDATA[Set the NM Token cache of the <code>NMClient</code>. This cache must be
  566. shared with the {@link AMRMClient} that requested the containers managed
  567. by this <code>NMClient</code>
  568. <p>
  569. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  570. singleton instance will be used.
  571. @param nmTokenCache the NM token cache to use.]]>
  572. </doc>
  573. </method>
  574. <method name="getNMTokenCache" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  575. abstract="false" native="false" synchronized="false"
  576. static="false" final="false" visibility="public"
  577. deprecated="not deprecated">
  578. <doc>
  579. <![CDATA[Get the NM token cache of the <code>NMClient</code>. This cache must be
  580. shared with the {@link AMRMClient} that requested the containers managed
  581. by this <code>NMClient</code>
  582. <p>
  583. If a NM token cache is not set, the {@link NMTokenCache#getSingleton()}
  584. singleton instance will be used.
  585. @return the NM token cache]]>
  586. </doc>
  587. </method>
  588. </class>
  589. <!-- end class org.apache.hadoop.yarn.client.api.NMClient -->
  590. <!-- start class org.apache.hadoop.yarn.client.api.NMTokenCache -->
  591. <class name="NMTokenCache" extends="java.lang.Object"
  592. abstract="false"
  593. static="false" final="false" visibility="public"
  594. deprecated="not deprecated">
  595. <constructor name="NMTokenCache"
  596. static="false" final="false" visibility="public"
  597. deprecated="not deprecated">
  598. <doc>
  599. <![CDATA[Creates a NM token cache instance.]]>
  600. </doc>
  601. </constructor>
  602. <method name="getSingleton" return="org.apache.hadoop.yarn.client.api.NMTokenCache"
  603. abstract="false" native="false" synchronized="false"
  604. static="true" final="false" visibility="public"
  605. deprecated="not deprecated">
  606. <doc>
  607. <![CDATA[Returns the singleton NM token cache.
  608. @return the singleton NM token cache.]]>
  609. </doc>
  610. </method>
  611. <method name="getNMToken" return="org.apache.hadoop.yarn.api.records.Token"
  612. abstract="false" native="false" synchronized="false"
  613. static="true" final="false" visibility="public"
  614. deprecated="not deprecated">
  615. <param name="nodeAddr" type="java.lang.String"/>
  616. <doc>
  617. <![CDATA[Returns NMToken, null if absent. Only the singleton obtained from
  618. {@link #getSingleton()} is looked at for the tokens. If you are using your
  619. own NMTokenCache that is different from the singleton, use
  620. {@link #getToken(String) }
  621. @param nodeAddr
  622. @return {@link Token} NMToken required for communicating with node manager]]>
  623. </doc>
  624. </method>
  625. <method name="setNMToken"
  626. abstract="false" native="false" synchronized="false"
  627. static="true" final="false" visibility="public"
  628. deprecated="not deprecated">
  629. <param name="nodeAddr" type="java.lang.String"/>
  630. <param name="token" type="org.apache.hadoop.yarn.api.records.Token"/>
  631. <doc>
  632. <![CDATA[Sets the NMToken for node address only in the singleton obtained from
  633. {@link #getSingleton()}. If you are using your own NMTokenCache that is
  634. different from the singleton, use {@link #setToken(String, Token) }
  635. @param nodeAddr
  636. node address (host:port)
  637. @param token
  638. NMToken]]>
  639. </doc>
  640. </method>
  641. <method name="getToken" return="org.apache.hadoop.yarn.api.records.Token"
  642. abstract="false" native="false" synchronized="false"
  643. static="false" final="false" visibility="public"
  644. deprecated="not deprecated">
  645. <param name="nodeAddr" type="java.lang.String"/>
  646. <doc>
  647. <![CDATA[Returns NMToken, null if absent
  648. @param nodeAddr
  649. @return {@link Token} NMToken required for communicating with node
  650. manager]]>
  651. </doc>
  652. </method>
  653. <method name="setToken"
  654. abstract="false" native="false" synchronized="false"
  655. static="false" final="false" visibility="public"
  656. deprecated="not deprecated">
  657. <param name="nodeAddr" type="java.lang.String"/>
  658. <param name="token" type="org.apache.hadoop.yarn.api.records.Token"/>
  659. <doc>
  660. <![CDATA[Sets the NMToken for node address
  661. @param nodeAddr node address (host:port)
  662. @param token NMToken]]>
  663. </doc>
  664. </method>
  665. <doc>
  666. <![CDATA[NMTokenCache manages NMTokens required for an Application Master
  667. communicating with individual NodeManagers.
  668. <p>
  669. By default Yarn client libraries {@link AMRMClient} and {@link NMClient} use
  670. {@link #getSingleton()} instance of the cache.
  671. <ul>
  672. <li>
  673. Using the singleton instance of the cache is appropriate when running a
  674. single ApplicationMaster in the same JVM.
  675. </li>
  676. <li>
  677. When using the singleton, users don't need to do anything special,
  678. {@link AMRMClient} and {@link NMClient} are already set up to use the
  679. default singleton {@link NMTokenCache}
  680. </li>
  681. </ul>
  682. If running multiple Application Masters in the same JVM, a different cache
  683. instance should be used for each Application Master.
  684. <ul>
  685. <li>
  686. If using the {@link AMRMClient} and the {@link NMClient}, setting up
  687. and using an instance cache is as follows:
  688. <pre>
  689. NMTokenCache nmTokenCache = new NMTokenCache();
  690. AMRMClient rmClient = AMRMClient.createAMRMClient();
  691. NMClient nmClient = NMClient.createNMClient();
  692. nmClient.setNMTokenCache(nmTokenCache);
  693. ...
  694. </pre>
  695. </li>
  696. <li>
  697. If using the {@link AMRMClientAsync} and the {@link NMClientAsync},
  698. setting up and using an instance cache is as follows:
  699. <pre>
  700. NMTokenCache nmTokenCache = new NMTokenCache();
  701. AMRMClient rmClient = AMRMClient.createAMRMClient();
  702. NMClient nmClient = NMClient.createNMClient();
  703. nmClient.setNMTokenCache(nmTokenCache);
  704. AMRMClientAsync rmClientAsync = new AMRMClientAsync(rmClient, 1000, [AMRM_CALLBACK]);
  705. NMClientAsync nmClientAsync = new NMClientAsync("nmClient", nmClient, [NM_CALLBACK]);
  706. ...
  707. </pre>
  708. </li>
  709. <li>
  710. If using {@link ApplicationMasterProtocol} and
  711. {@link ContainerManagementProtocol} directly, setting up and using an
  712. instance cache is as follows:
  713. <pre>
  714. NMTokenCache nmTokenCache = new NMTokenCache();
  715. ...
  716. ApplicationMasterProtocol amPro = ClientRMProxy.createRMProxy(conf, ApplicationMasterProtocol.class);
  717. ...
  718. AllocateRequest allocateRequest = ...
  719. ...
  720. AllocateResponse allocateResponse = rmClient.allocate(allocateRequest);
  721. for (NMToken token : allocateResponse.getNMTokens()) {
  722. nmTokenCache.setToken(token.getNodeId().toString(), token.getToken());
  723. }
  724. ...
  725. ContainerManagementProtocolProxy nmPro = ContainerManagementProtocolProxy(conf, nmTokenCache);
  726. ...
  727. nmPro.startContainer(container, containerContext);
  728. ...
  729. </pre>
  730. </li>
  731. </ul>
  732. It is also possible to mix the usage of a client ({@code AMRMClient} or
  733. {@code NMClient}, or the async versions of them) with a protocol proxy
  734. ({@code ContainerManagementProtocolProxy} or
  735. {@code ApplicationMasterProtocol}).]]>
  736. </doc>
  737. </class>
  738. <!-- end class org.apache.hadoop.yarn.client.api.NMTokenCache -->
  739. <!-- start class org.apache.hadoop.yarn.client.api.SharedCacheClient -->
  740. <class name="SharedCacheClient" extends="org.apache.hadoop.service.AbstractService"
  741. abstract="true"
  742. static="false" final="false" visibility="public"
  743. deprecated="not deprecated">
  744. <constructor name="SharedCacheClient" type="java.lang.String"
  745. static="false" final="false" visibility="public"
  746. deprecated="not deprecated">
  747. </constructor>
  748. <method name="createSharedCacheClient" return="org.apache.hadoop.yarn.client.api.SharedCacheClient"
  749. abstract="false" native="false" synchronized="false"
  750. static="true" final="false" visibility="public"
  751. deprecated="not deprecated">
  752. </method>
  753. <method name="use" return="org.apache.hadoop.fs.Path"
  754. abstract="true" native="false" synchronized="false"
  755. static="false" final="false" visibility="public"
  756. deprecated="not deprecated">
  757. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  758. <param name="resourceKey" type="java.lang.String"/>
  759. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  760. <doc>
  761. <![CDATA[<p>
  762. The method to claim a resource with the <code>SharedCacheManager.</code>
  763. The client uses a checksum to identify the resource and an
  764. {@link ApplicationId} to identify which application will be using the
  765. resource.
  766. </p>
  767. <p>
  768. The <code>SharedCacheManager</code> responds with whether or not the
  769. resource exists in the cache. If the resource exists, a <code>Path</code>
  770. to the resource in the shared cache is returned. If the resource does not
  771. exist, null is returned instead.
  772. </p>
  773. @param applicationId ApplicationId of the application using the resource
  774. @param resourceKey the key (i.e. checksum) that identifies the resource
  775. @return Path to the resource, or null if it does not exist]]>
  776. </doc>
  777. </method>
  778. <method name="release"
  779. abstract="true" native="false" synchronized="false"
  780. static="false" final="false" visibility="public"
  781. deprecated="not deprecated">
  782. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  783. <param name="resourceKey" type="java.lang.String"/>
  784. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  785. <doc>
  786. <![CDATA[<p>
  787. The method to release a resource with the <code>SharedCacheManager.</code>
  788. This method is called once an application is no longer using a claimed
  789. resource in the shared cache. The client uses a checksum to identify the
  790. resource and an {@link ApplicationId} to identify which application is
  791. releasing the resource.
  792. </p>
  793. <p>
  794. Note: This method is an optimization and the client is not required to call
  795. it for correctness.
  796. </p>
  797. @param applicationId ApplicationId of the application releasing the
  798. resource
  799. @param resourceKey the key (i.e. checksum) that identifies the resource]]>
  800. </doc>
  801. </method>
  802. <method name="getFileChecksum" return="java.lang.String"
  803. abstract="true" native="false" synchronized="false"
  804. static="false" final="false" visibility="public"
  805. deprecated="not deprecated">
  806. <param name="sourceFile" type="org.apache.hadoop.fs.Path"/>
  807. <exception name="IOException" type="java.io.IOException"/>
  808. <doc>
  809. <![CDATA[A convenience method to calculate the checksum of a specified file.
  810. @param sourceFile A path to the input file
  811. @return A hex string containing the checksum digest
  812. @throws IOException]]>
  813. </doc>
  814. </method>
  815. <doc>
  816. <![CDATA[This is the client for YARN's shared cache.]]>
  817. </doc>
  818. </class>
  819. <!-- end class org.apache.hadoop.yarn.client.api.SharedCacheClient -->
  820. <!-- start class org.apache.hadoop.yarn.client.api.YarnClient -->
  821. <class name="YarnClient" extends="org.apache.hadoop.service.AbstractService"
  822. abstract="true"
  823. static="false" final="false" visibility="public"
  824. deprecated="not deprecated">
  825. <constructor name="YarnClient" type="java.lang.String"
  826. static="false" final="false" visibility="protected"
  827. deprecated="not deprecated">
  828. </constructor>
  829. <method name="createYarnClient" return="org.apache.hadoop.yarn.client.api.YarnClient"
  830. abstract="false" native="false" synchronized="false"
  831. static="true" final="false" visibility="public"
  832. deprecated="not deprecated">
  833. <doc>
  834. <![CDATA[Create a new instance of YarnClient.]]>
  835. </doc>
  836. </method>
  837. <method name="createApplication" return="org.apache.hadoop.yarn.client.api.YarnClientApplication"
  838. abstract="true" native="false" synchronized="false"
  839. static="false" final="false" visibility="public"
  840. deprecated="not deprecated">
  841. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  842. <exception name="IOException" type="java.io.IOException"/>
  843. <doc>
  844. <![CDATA[<p>
  845. Obtain a {@link YarnClientApplication} for a new application,
  846. which in turn contains the {@link ApplicationSubmissionContext} and
  847. {@link org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse}
  848. objects.
  849. </p>
  850. @return {@link YarnClientApplication} built for a new application
  851. @throws YarnException
  852. @throws IOException]]>
  853. </doc>
  854. </method>
  855. <method name="submitApplication" return="org.apache.hadoop.yarn.api.records.ApplicationId"
  856. abstract="true" native="false" synchronized="false"
  857. static="false" final="false" visibility="public"
  858. deprecated="not deprecated">
  859. <param name="appContext" type="org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"/>
  860. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  861. <exception name="IOException" type="java.io.IOException"/>
  862. <doc>
  863. <![CDATA[<p>
  864. Submit a new application to <code>YARN.</code> It is a blocking call - it
  865. will not return {@link ApplicationId} until the submitted application is
  866. submitted successfully and accepted by the ResourceManager.
  867. </p>
  868. <p>
  869. Users should provide an {@link ApplicationId} as part of the parameter
  870. {@link ApplicationSubmissionContext} when submitting a new application,
  871. otherwise it will throw the {@link ApplicationIdNotProvidedException}.
  872. </p>
  873. <p>This internally calls {@link ApplicationClientProtocol#submitApplication
  874. (SubmitApplicationRequest)}, and after that, it internally invokes
  875. {@link ApplicationClientProtocol#getApplicationReport
  876. (GetApplicationReportRequest)} and waits till it can make sure that the
  877. application gets properly submitted. If RM fails over or RM restart
  878. happens before ResourceManager saves the application's state,
  879. {@link ApplicationClientProtocol
  880. #getApplicationReport(GetApplicationReportRequest)} will throw
  881. the {@link ApplicationNotFoundException}. This API automatically resubmits
  882. the application with the same {@link ApplicationSubmissionContext} when it
  883. catches the {@link ApplicationNotFoundException}</p>
  884. @param appContext
  885. {@link ApplicationSubmissionContext} containing all the details
  886. needed to submit a new application
  887. @return {@link ApplicationId} of the accepted application
  888. @throws YarnException
  889. @throws IOException
  890. @see #createApplication()]]>
  891. </doc>
  892. </method>
  893. <method name="failApplicationAttempt"
  894. abstract="true" native="false" synchronized="false"
  895. static="false" final="false" visibility="public"
  896. deprecated="not deprecated">
  897. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  898. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  899. <exception name="IOException" type="java.io.IOException"/>
  900. <doc>
  901. <![CDATA[<p>
  902. Fail an application attempt identified by given ID.
  903. </p>
  904. @param applicationAttemptId
  905. {@link ApplicationAttemptId} of the attempt to fail.
  906. @throws YarnException
  907. in case of errors or if YARN rejects the request due to
  908. access-control restrictions.
  909. @throws IOException
  910. @see #getQueueAclsInfo()]]>
  911. </doc>
  912. </method>
  913. <method name="killApplication"
  914. abstract="true" native="false" synchronized="false"
  915. static="false" final="false" visibility="public"
  916. deprecated="not deprecated">
  917. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  918. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  919. <exception name="IOException" type="java.io.IOException"/>
  920. <doc>
  921. <![CDATA[<p>
  922. Kill an application identified by given ID.
  923. </p>
  924. @param applicationId
  925. {@link ApplicationId} of the application that needs to be killed
  926. @throws YarnException
  927. in case of errors or if YARN rejects the request due to
  928. access-control restrictions.
  929. @throws IOException
  930. @see #getQueueAclsInfo()]]>
  931. </doc>
  932. </method>
  933. <method name="killApplication"
  934. abstract="true" native="false" synchronized="false"
  935. static="false" final="false" visibility="public"
  936. deprecated="not deprecated">
  937. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  938. <param name="diagnostics" type="java.lang.String"/>
  939. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  940. <exception name="IOException" type="java.io.IOException"/>
  941. <doc>
  942. <![CDATA[<p>
  943. Kill an application identified by given ID.
  944. </p>
  945. @param applicationId {@link ApplicationId} of the application that needs to
  946. be killed
  947. @param diagnostics for killing an application.
  948. @throws YarnException in case of errors or if YARN rejects the request due
  949. to access-control restrictions.
  950. @throws IOException]]>
  951. </doc>
  952. </method>
  953. <method name="getApplicationReport" return="org.apache.hadoop.yarn.api.records.ApplicationReport"
  954. abstract="true" native="false" synchronized="false"
  955. static="false" final="false" visibility="public"
  956. deprecated="not deprecated">
  957. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  958. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  959. <exception name="IOException" type="java.io.IOException"/>
  960. <doc>
  961. <![CDATA[<p>
  962. Get a report of the given Application.
  963. </p>
  964. <p>
  965. In secure mode, <code>YARN</code> verifies access to the application, queue
  966. etc. before accepting the request.
  967. </p>
  968. <p>
  969. If the user does not have <code>VIEW_APP</code> access then the following
  970. fields in the report will be set to stubbed values:
  971. <ul>
  972. <li>host - set to "N/A"</li>
  973. <li>RPC port - set to -1</li>
  974. <li>client token - set to "N/A"</li>
  975. <li>diagnostics - set to "N/A"</li>
  976. <li>tracking URL - set to "N/A"</li>
  977. <li>original tracking URL - set to "N/A"</li>
  978. <li>resource usage report - all values are -1</li>
  979. </ul>
  980. @param appId
  981. {@link ApplicationId} of the application that needs a report
  982. @return application report
  983. @throws YarnException
  984. @throws IOException]]>
  985. </doc>
  986. </method>
  987. <method name="getAMRMToken" return="org.apache.hadoop.security.token.Token"
  988. abstract="true" native="false" synchronized="false"
  989. static="false" final="false" visibility="public"
  990. deprecated="not deprecated">
  991. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  992. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  993. <exception name="IOException" type="java.io.IOException"/>
  994. <doc>
  995. <![CDATA[Get the AMRM token of the application.
  996. <p>
  997. The AMRM token is required for AM to RM scheduling operations. For
  998. managed Application Masters Yarn takes care of injecting it. For unmanaged
  999. Applications Masters, the token must be obtained via this method and set
  1000. in the {@link org.apache.hadoop.security.UserGroupInformation} of the
  1001. current user.
  1002. <p>
  1003. The AMRM token will be returned only if all the following conditions are
  1004. met:
  1005. <ul>
  1006. <li>the requester is the owner of the ApplicationMaster</li>
  1007. <li>the application master is an unmanaged ApplicationMaster</li>
  1008. <li>the application master is in ACCEPTED state</li>
  1009. </ul>
  1010. Else this method returns NULL.
  1011. @param appId {@link ApplicationId} of the application to get the AMRM token
  1012. @return the AMRM token if available
  1013. @throws YarnException
  1014. @throws IOException]]>
  1015. </doc>
  1016. </method>
  1017. <method name="getApplications" return="java.util.List"
  1018. abstract="true" native="false" synchronized="false"
  1019. static="false" final="false" visibility="public"
  1020. deprecated="not deprecated">
  1021. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1022. <exception name="IOException" type="java.io.IOException"/>
  1023. <doc>
  1024. <![CDATA[<p>
  1025. Get a report (ApplicationReport) of all Applications in the cluster.
  1026. </p>
  1027. <p>
  1028. If the user does not have <code>VIEW_APP</code> access for an application
  1029. then the corresponding report will be filtered as described in
  1030. {@link #getApplicationReport(ApplicationId)}.
  1031. </p>
  1032. @return a list of reports of all running applications
  1033. @throws YarnException
  1034. @throws IOException]]>
  1035. </doc>
  1036. </method>
  1037. <method name="getApplications" return="java.util.List"
  1038. abstract="true" native="false" synchronized="false"
  1039. static="false" final="false" visibility="public"
  1040. deprecated="not deprecated">
  1041. <param name="applicationTypes" type="java.util.Set"/>
  1042. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1043. <exception name="IOException" type="java.io.IOException"/>
  1044. <doc>
  1045. <![CDATA[<p>
  1046. Get a report (ApplicationReport) of Applications
  1047. matching the given application types in the cluster.
  1048. </p>
  1049. <p>
  1050. If the user does not have <code>VIEW_APP</code> access for an application
  1051. then the corresponding report will be filtered as described in
  1052. {@link #getApplicationReport(ApplicationId)}.
  1053. </p>
  1054. @param applicationTypes set of application types you are interested in
  1055. @return a list of reports of applications
  1056. @throws YarnException
  1057. @throws IOException]]>
  1058. </doc>
  1059. </method>
  1060. <method name="getApplications" return="java.util.List"
  1061. abstract="true" native="false" synchronized="false"
  1062. static="false" final="false" visibility="public"
  1063. deprecated="not deprecated">
  1064. <param name="applicationStates" type="java.util.EnumSet"/>
  1065. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1066. <exception name="IOException" type="java.io.IOException"/>
  1067. <doc>
  1068. <![CDATA[<p>
  1069. Get a report (ApplicationReport) of Applications matching the given
  1070. application states in the cluster.
  1071. </p>
  1072. <p>
  1073. If the user does not have <code>VIEW_APP</code> access for an application
  1074. then the corresponding report will be filtered as described in
  1075. {@link #getApplicationReport(ApplicationId)}.
  1076. </p>
  1077. @param applicationStates set of application states you are interested in
  1078. @return a list of reports of applications
  1079. @throws YarnException
  1080. @throws IOException]]>
  1081. </doc>
  1082. </method>
  1083. <method name="getApplications" return="java.util.List"
  1084. abstract="true" native="false" synchronized="false"
  1085. static="false" final="false" visibility="public"
  1086. deprecated="not deprecated">
  1087. <param name="applicationTypes" type="java.util.Set"/>
  1088. <param name="applicationStates" type="java.util.EnumSet"/>
  1089. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1090. <exception name="IOException" type="java.io.IOException"/>
  1091. <doc>
  1092. <![CDATA[<p>
  1093. Get a report (ApplicationReport) of Applications matching the given
  1094. application types and application states in the cluster.
  1095. </p>
  1096. <p>
  1097. If the user does not have <code>VIEW_APP</code> access for an application
  1098. then the corresponding report will be filtered as described in
  1099. {@link #getApplicationReport(ApplicationId)}.
  1100. </p>
  1101. @param applicationTypes set of application types you are interested in
  1102. @param applicationStates set of application states you are interested in
  1103. @return a list of reports of applications
  1104. @throws YarnException
  1105. @throws IOException]]>
  1106. </doc>
  1107. </method>
  1108. <method name="getApplications" return="java.util.List"
  1109. abstract="true" native="false" synchronized="false"
  1110. static="false" final="false" visibility="public"
  1111. deprecated="not deprecated">
  1112. <param name="queues" type="java.util.Set"/>
  1113. <param name="users" type="java.util.Set"/>
  1114. <param name="applicationTypes" type="java.util.Set"/>
  1115. <param name="applicationStates" type="java.util.EnumSet"/>
  1116. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1117. <exception name="IOException" type="java.io.IOException"/>
  1118. <doc>
  1119. <![CDATA[<p>
  1120. Get a report (ApplicationReport) of Applications matching the given users,
  1121. queues, application types and application states in the cluster. If any of
  1122. the params is set to null, it is not used when filtering.
  1123. </p>
  1124. <p>
  1125. If the user does not have <code>VIEW_APP</code> access for an application
  1126. then the corresponding report will be filtered as described in
  1127. {@link #getApplicationReport(ApplicationId)}.
  1128. </p>
  1129. @param queues set of queues you are interested in
  1130. @param users set of users you are interested in
  1131. @param applicationTypes set of application types you are interested in
  1132. @param applicationStates set of application states you are interested in
  1133. @return a list of reports of applications
  1134. @throws YarnException
  1135. @throws IOException]]>
  1136. </doc>
  1137. </method>
  1138. <method name="getYarnClusterMetrics" return="org.apache.hadoop.yarn.api.records.YarnClusterMetrics"
  1139. abstract="true" native="false" synchronized="false"
  1140. static="false" final="false" visibility="public"
  1141. deprecated="not deprecated">
  1142. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1143. <exception name="IOException" type="java.io.IOException"/>
  1144. <doc>
  1145. <![CDATA[<p>
  1146. Get metrics ({@link YarnClusterMetrics}) about the cluster.
  1147. </p>
  1148. @return cluster metrics
  1149. @throws YarnException
  1150. @throws IOException]]>
  1151. </doc>
  1152. </method>
  1153. <method name="getNodeReports" return="java.util.List"
  1154. abstract="true" native="false" synchronized="false"
  1155. static="false" final="false" visibility="public"
  1156. deprecated="not deprecated">
  1157. <param name="states" type="org.apache.hadoop.yarn.api.records.NodeState[]"/>
  1158. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1159. <exception name="IOException" type="java.io.IOException"/>
  1160. <doc>
  1161. <![CDATA[<p>
  1162. Get a report of nodes ({@link NodeReport}) in the cluster.
  1163. </p>
  1164. @param states The {@link NodeState}s to filter on. If no filter states are
  1165. given, nodes in all states will be returned.
  1166. @return A list of node reports
  1167. @throws YarnException
  1168. @throws IOException]]>
  1169. </doc>
  1170. </method>
  1171. <method name="getRMDelegationToken" return="org.apache.hadoop.yarn.api.records.Token"
  1172. abstract="true" native="false" synchronized="false"
  1173. static="false" final="false" visibility="public"
  1174. deprecated="not deprecated">
  1175. <param name="renewer" type="org.apache.hadoop.io.Text"/>
  1176. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1177. <exception name="IOException" type="java.io.IOException"/>
  1178. <doc>
  1179. <![CDATA[<p>
  1180. Get a delegation token so as to be able to talk to YARN using those tokens.
  1181. @param renewer
  1182. Address of the renewer who can renew these tokens when needed by
  1183. securely talking to YARN.
  1184. @return a delegation token ({@link Token}) that can be used to
  1185. talk to YARN
  1186. @throws YarnException
  1187. @throws IOException]]>
  1188. </doc>
  1189. </method>
  1190. <method name="getQueueInfo" return="org.apache.hadoop.yarn.api.records.QueueInfo"
  1191. abstract="true" native="false" synchronized="false"
  1192. static="false" final="false" visibility="public"
  1193. deprecated="not deprecated">
  1194. <param name="queueName" type="java.lang.String"/>
  1195. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1196. <exception name="IOException" type="java.io.IOException"/>
  1197. <doc>
  1198. <![CDATA[<p>
  1199. Get information ({@link QueueInfo}) about a given <em>queue</em>.
  1200. </p>
  1201. @param queueName
  1202. Name of the queue whose information is needed
  1203. @return queue information
  1204. @throws YarnException
  1205. in case of errors or if YARN rejects the request due to
  1206. access-control restrictions.
  1207. @throws IOException]]>
  1208. </doc>
  1209. </method>
  1210. <method name="getAllQueues" return="java.util.List"
  1211. abstract="true" native="false" synchronized="false"
  1212. static="false" final="false" visibility="public"
  1213. deprecated="not deprecated">
  1214. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1215. <exception name="IOException" type="java.io.IOException"/>
  1216. <doc>
  1217. <![CDATA[<p>
  1218. Get information ({@link QueueInfo}) about all queues, recursively if there
  1219. is a hierarchy
  1220. </p>
  1221. @return a list of queue-information for all queues
  1222. @throws YarnException
  1223. @throws IOException]]>
  1224. </doc>
  1225. </method>
  1226. <method name="getRootQueueInfos" return="java.util.List"
  1227. abstract="true" native="false" synchronized="false"
  1228. static="false" final="false" visibility="public"
  1229. deprecated="not deprecated">
  1230. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1231. <exception name="IOException" type="java.io.IOException"/>
  1232. <doc>
  1233. <![CDATA[<p>
  1234. Get information ({@link QueueInfo}) about top level queues.
  1235. </p>
  1236. @return a list of queue-information for all the top-level queues
  1237. @throws YarnException
  1238. @throws IOException]]>
  1239. </doc>
  1240. </method>
  1241. <method name="getChildQueueInfos" return="java.util.List"
  1242. abstract="true" native="false" synchronized="false"
  1243. static="false" final="false" visibility="public"
  1244. deprecated="not deprecated">
  1245. <param name="parent" type="java.lang.String"/>
  1246. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1247. <exception name="IOException" type="java.io.IOException"/>
  1248. <doc>
  1249. <![CDATA[<p>
  1250. Get information ({@link QueueInfo}) about all the immediate children queues
  1251. of the given queue
  1252. </p>
  1253. @param parent
  1254. Name of the queue whose child-queues' information is needed
  1255. @return a list of queue-information for all queues who are direct children
  1256. of the given parent queue.
  1257. @throws YarnException
  1258. @throws IOException]]>
  1259. </doc>
  1260. </method>
  1261. <method name="getQueueAclsInfo" return="java.util.List"
  1262. abstract="true" native="false" synchronized="false"
  1263. static="false" final="false" visibility="public"
  1264. deprecated="not deprecated">
  1265. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1266. <exception name="IOException" type="java.io.IOException"/>
  1267. <doc>
  1268. <![CDATA[<p>
  1269. Get information about <em>acls</em> for <em>current user</em> on all the
  1270. existing queues.
  1271. </p>
  1272. @return a list of queue acls ({@link QueueUserACLInfo}) for
  1273. <em>current user</em>
  1274. @throws YarnException
  1275. @throws IOException]]>
  1276. </doc>
  1277. </method>
  1278. <method name="getApplicationAttemptReport" return="org.apache.hadoop.yarn.api.records.ApplicationAttemptReport"
  1279. abstract="true" native="false" synchronized="false"
  1280. static="false" final="false" visibility="public"
  1281. deprecated="not deprecated">
  1282. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  1283. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1284. <exception name="IOException" type="java.io.IOException"/>
  1285. <doc>
  1286. <![CDATA[<p>
  1287. Get a report of the given ApplicationAttempt.
  1288. </p>
  1289. <p>
  1290. In secure mode, <code>YARN</code> verifies access to the application, queue
  1291. etc. before accepting the request.
  1292. </p>
  1293. @param applicationAttemptId
  1294. {@link ApplicationAttemptId} of the application attempt that needs
  1295. a report
  1296. @return application attempt report
  1297. @throws YarnException
  1298. @throws ApplicationAttemptNotFoundException if application attempt
  1299. not found
  1300. @throws IOException]]>
  1301. </doc>
  1302. </method>
  1303. <method name="getApplicationAttempts" return="java.util.List"
  1304. abstract="true" native="false" synchronized="false"
  1305. static="false" final="false" visibility="public"
  1306. deprecated="not deprecated">
  1307. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  1308. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1309. <exception name="IOException" type="java.io.IOException"/>
  1310. <doc>
  1311. <![CDATA[<p>
  1312. Get a report of all (ApplicationAttempts) of Application in the cluster.
  1313. </p>
  1314. @param applicationId application id of the app
  1315. @return a list of reports for all application attempts for specified
  1316. application.
  1317. @throws YarnException
  1318. @throws IOException]]>
  1319. </doc>
  1320. </method>
  1321. <method name="getContainerReport" return="org.apache.hadoop.yarn.api.records.ContainerReport"
  1322. abstract="true" native="false" synchronized="false"
  1323. static="false" final="false" visibility="public"
  1324. deprecated="not deprecated">
  1325. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1326. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1327. <exception name="IOException" type="java.io.IOException"/>
  1328. <doc>
  1329. <![CDATA[<p>
  1330. Get a report of the given Container.
  1331. </p>
  1332. <p>
  1333. In secure mode, <code>YARN</code> verifies access to the application, queue
  1334. etc. before accepting the request.
  1335. </p>
  1336. @param containerId
  1337. {@link ContainerId} of the container that needs a report
  1338. @return container report
  1339. @throws YarnException
  1340. @throws ContainerNotFoundException if container not found.
  1341. @throws IOException]]>
  1342. </doc>
  1343. </method>
  1344. <method name="getContainers" return="java.util.List"
  1345. abstract="true" native="false" synchronized="false"
  1346. static="false" final="false" visibility="public"
  1347. deprecated="not deprecated">
  1348. <param name="applicationAttemptId" type="org.apache.hadoop.yarn.api.records.ApplicationAttemptId"/>
  1349. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1350. <exception name="IOException" type="java.io.IOException"/>
  1351. <doc>
  1352. <![CDATA[<p>
  1353. Get a report of all (Containers) of ApplicationAttempt in the cluster.
  1354. </p>
  1355. @param applicationAttemptId application attempt id
  1356. @return a list of reports of all containers for specified application
  1357. attempts
  1358. @throws YarnException
  1359. @throws IOException]]>
  1360. </doc>
  1361. </method>
  1362. <method name="moveApplicationAcrossQueues"
  1363. abstract="true" native="false" synchronized="false"
  1364. static="false" final="false" visibility="public"
  1365. deprecated="not deprecated">
  1366. <param name="appId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  1367. <param name="queue" type="java.lang.String"/>
  1368. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1369. <exception name="IOException" type="java.io.IOException"/>
  1370. <doc>
  1371. <![CDATA[<p>
  1372. Attempts to move the given application to the given queue.
  1373. </p>
  1374. @param appId
  1375. Application to move.
  1376. @param queue
  1377. Queue to place it in to.
  1378. @throws YarnException
  1379. @throws IOException]]>
  1380. </doc>
  1381. </method>
  1382. <method name="createReservation" return="org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationResponse"
  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. Obtain a {@link GetNewReservationResponse} for a new reservation,
  1391. which contains the {@link ReservationId} object.
  1392. </p>
  1393. @return The {@link GetNewReservationResponse} containing a new
  1394. {@link ReservationId} object.
  1395. @throws YarnException if reservation cannot be created.
  1396. @throws IOException if reservation cannot be created.]]>
  1397. </doc>
  1398. </method>
  1399. <method name="submitReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse"
  1400. abstract="true" native="false" synchronized="false"
  1401. static="false" final="false" visibility="public"
  1402. deprecated="not deprecated">
  1403. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest"/>
  1404. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1405. <exception name="IOException" type="java.io.IOException"/>
  1406. <doc>
  1407. <![CDATA[<p>
  1408. The interface used by clients to submit a new reservation to the
  1409. {@code ResourceManager}.
  1410. </p>
  1411. <p>
  1412. The client packages all details of its request in a
  1413. {@link ReservationSubmissionRequest} object. This contains information
  1414. about the amount of capacity, temporal constraints, and gang needs.
  1415. Furthermore, the reservation might be composed of multiple stages, with
  1416. ordering dependencies among them.
  1417. </p>
  1418. <p>
  1419. In order to respond, a new admission control component in the
  1420. {@code ResourceManager} performs an analysis of the resources that have
  1421. been committed over the period of time the user is requesting, verify that
  1422. the user requests can be fulfilled, and that it respect a sharing policy
  1423. (e.g., {@code CapacityOverTimePolicy}). Once it has positively determined
  1424. that the ReservationRequest is satisfiable the {@code ResourceManager}
  1425. answers with a {@link ReservationSubmissionResponse} that includes a
  1426. {@link ReservationId}. Upon failure to find a valid allocation the response
  1427. is an exception with the message detailing the reason of failure.
  1428. </p>
  1429. <p>
  1430. The semantics guarantees that the {@link ReservationId} returned,
  1431. corresponds to a valid reservation existing in the time-range request by
  1432. the user. The amount of capacity dedicated to such reservation can vary
  1433. overtime, depending of the allocation that has been determined. But it is
  1434. guaranteed to satisfy all the constraint expressed by the user in the
  1435. {@link ReservationDefinition}
  1436. </p>
  1437. @param request request to submit a new Reservation
  1438. @return response contains the {@link ReservationId} on accepting the
  1439. submission
  1440. @throws YarnException if the reservation cannot be created successfully
  1441. @throws IOException]]>
  1442. </doc>
  1443. </method>
  1444. <method name="updateReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse"
  1445. abstract="true" native="false" synchronized="false"
  1446. static="false" final="false" visibility="public"
  1447. deprecated="not deprecated">
  1448. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest"/>
  1449. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1450. <exception name="IOException" type="java.io.IOException"/>
  1451. <doc>
  1452. <![CDATA[<p>
  1453. The interface used by clients to update an existing Reservation. This is
  1454. referred to as a re-negotiation process, in which a user that has
  1455. previously submitted a Reservation.
  1456. </p>
  1457. <p>
  1458. The allocation is attempted by virtually substituting all previous
  1459. allocations related to this Reservation with new ones, that satisfy the new
  1460. {@link ReservationDefinition}. Upon success the previous allocation is
  1461. atomically substituted by the new one, and on failure (i.e., if the system
  1462. cannot find a valid allocation for the updated request), the previous
  1463. allocation remains valid.
  1464. </p>
  1465. @param request to update an existing Reservation (the
  1466. {@link ReservationUpdateRequest} should refer to an existing valid
  1467. {@link ReservationId})
  1468. @return response empty on successfully updating the existing reservation
  1469. @throws YarnException if the request is invalid or reservation cannot be
  1470. updated successfully
  1471. @throws IOException]]>
  1472. </doc>
  1473. </method>
  1474. <method name="deleteReservation" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse"
  1475. abstract="true" native="false" synchronized="false"
  1476. static="false" final="false" visibility="public"
  1477. deprecated="not deprecated">
  1478. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest"/>
  1479. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1480. <exception name="IOException" type="java.io.IOException"/>
  1481. <doc>
  1482. <![CDATA[<p>
  1483. The interface used by clients to remove an existing Reservation.
  1484. </p>
  1485. @param request to remove an existing Reservation (the
  1486. {@link ReservationDeleteRequest} should refer to an existing valid
  1487. {@link ReservationId})
  1488. @return response empty on successfully deleting the existing reservation
  1489. @throws YarnException if the request is invalid or reservation cannot be
  1490. deleted successfully
  1491. @throws IOException]]>
  1492. </doc>
  1493. </method>
  1494. <method name="listReservations" return="org.apache.hadoop.yarn.api.protocolrecords.ReservationListResponse"
  1495. abstract="true" native="false" synchronized="false"
  1496. static="false" final="false" visibility="public"
  1497. deprecated="not deprecated">
  1498. <param name="request" type="org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest"/>
  1499. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1500. <exception name="IOException" type="java.io.IOException"/>
  1501. <doc>
  1502. <![CDATA[<p>
  1503. The interface used by clients to get the list of reservations in a plan.
  1504. The reservationId will be used to search for reservations to list if it is
  1505. provided. Otherwise, it will select active reservations within the
  1506. startTime and endTime (inclusive).
  1507. </p>
  1508. @param request to list reservations in a plan. Contains fields to select
  1509. String queue, ReservationId reservationId, long startTime,
  1510. long endTime, and a bool includeReservationAllocations.
  1511. queue: Required. Cannot be null or empty. Refers to the
  1512. reservable queue in the scheduler that was selected when
  1513. creating a reservation submission
  1514. {@link ReservationSubmissionRequest}.
  1515. reservationId: Optional. If provided, other fields will
  1516. be ignored.
  1517. startTime: Optional. If provided, only reservations that
  1518. end after the startTime will be selected. This defaults
  1519. to 0 if an invalid number is used.
  1520. endTime: Optional. If provided, only reservations that
  1521. start on or before endTime will be selected. This defaults
  1522. to Long.MAX_VALUE if an invalid number is used.
  1523. includeReservationAllocations: Optional. Flag that
  1524. determines whether the entire reservation allocations are
  1525. to be returned. Reservation allocations are subject to
  1526. change in the event of re-planning as described by
  1527. {@link ReservationDefinition}.
  1528. @return response that contains information about reservations that are
  1529. being searched for.
  1530. @throws YarnException if the request is invalid
  1531. @throws IOException if the request failed otherwise]]>
  1532. </doc>
  1533. </method>
  1534. <method name="getNodeToLabels" return="java.util.Map"
  1535. abstract="true" native="false" synchronized="false"
  1536. static="false" final="false" visibility="public"
  1537. deprecated="not deprecated">
  1538. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1539. <exception name="IOException" type="java.io.IOException"/>
  1540. <doc>
  1541. <![CDATA[<p>
  1542. The interface used by client to get node to labels mappings in existing cluster
  1543. </p>
  1544. @return node to labels mappings
  1545. @throws YarnException
  1546. @throws IOException]]>
  1547. </doc>
  1548. </method>
  1549. <method name="getLabelsToNodes" return="java.util.Map"
  1550. abstract="true" native="false" synchronized="false"
  1551. static="false" final="false" visibility="public"
  1552. deprecated="not deprecated">
  1553. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1554. <exception name="IOException" type="java.io.IOException"/>
  1555. <doc>
  1556. <![CDATA[<p>
  1557. The interface used by client to get labels to nodes mapping
  1558. in existing cluster
  1559. </p>
  1560. @return node to labels mappings
  1561. @throws YarnException
  1562. @throws IOException]]>
  1563. </doc>
  1564. </method>
  1565. <method name="getLabelsToNodes" return="java.util.Map"
  1566. abstract="true" native="false" synchronized="false"
  1567. static="false" final="false" visibility="public"
  1568. deprecated="not deprecated">
  1569. <param name="labels" type="java.util.Set"/>
  1570. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1571. <exception name="IOException" type="java.io.IOException"/>
  1572. <doc>
  1573. <![CDATA[<p>
  1574. The interface used by client to get labels to nodes mapping
  1575. for specified labels in existing cluster
  1576. </p>
  1577. @param labels labels for which labels to nodes mapping has to be retrieved
  1578. @return labels to nodes mappings for specific labels
  1579. @throws YarnException
  1580. @throws IOException]]>
  1581. </doc>
  1582. </method>
  1583. <method name="getClusterNodeLabels" return="java.util.List"
  1584. abstract="true" native="false" synchronized="false"
  1585. static="false" final="false" visibility="public"
  1586. deprecated="not deprecated">
  1587. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1588. <exception name="IOException" type="java.io.IOException"/>
  1589. <doc>
  1590. <![CDATA[<p>
  1591. The interface used by client to get node labels in the cluster
  1592. </p>
  1593. @return cluster node labels collection
  1594. @throws YarnException when there is a failure in
  1595. {@link ApplicationClientProtocol}
  1596. @throws IOException when there is a failure in
  1597. {@link ApplicationClientProtocol}]]>
  1598. </doc>
  1599. </method>
  1600. <method name="updateApplicationPriority" return="org.apache.hadoop.yarn.api.records.Priority"
  1601. abstract="true" native="false" synchronized="false"
  1602. static="false" final="false" visibility="public"
  1603. deprecated="not deprecated">
  1604. <param name="applicationId" type="org.apache.hadoop.yarn.api.records.ApplicationId"/>
  1605. <param name="priority" type="org.apache.hadoop.yarn.api.records.Priority"/>
  1606. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1607. <exception name="IOException" type="java.io.IOException"/>
  1608. <doc>
  1609. <![CDATA[<p>
  1610. The interface used by client to set priority of an application
  1611. </p>
  1612. @param applicationId
  1613. @param priority
  1614. @return updated priority of an application.
  1615. @throws YarnException
  1616. @throws IOException]]>
  1617. </doc>
  1618. </method>
  1619. <method name="signalToContainer"
  1620. abstract="true" native="false" synchronized="false"
  1621. static="false" final="false" visibility="public"
  1622. deprecated="not deprecated">
  1623. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1624. <param name="command" type="org.apache.hadoop.yarn.api.records.SignalContainerCommand"/>
  1625. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1626. <exception name="IOException" type="java.io.IOException"/>
  1627. <doc>
  1628. <![CDATA[<p>
  1629. Signal a container identified by given ID.
  1630. </p>
  1631. @param containerId
  1632. {@link ContainerId} of the container that needs to be signaled
  1633. @param command the signal container command
  1634. @throws YarnException
  1635. @throws IOException]]>
  1636. </doc>
  1637. </method>
  1638. </class>
  1639. <!-- end class org.apache.hadoop.yarn.client.api.YarnClient -->
  1640. <!-- start class org.apache.hadoop.yarn.client.api.YarnClientApplication -->
  1641. <class name="YarnClientApplication" extends="java.lang.Object"
  1642. abstract="false"
  1643. static="false" final="false" visibility="public"
  1644. deprecated="not deprecated">
  1645. <constructor name="YarnClientApplication" type="org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse, org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"
  1646. static="false" final="false" visibility="public"
  1647. deprecated="not deprecated">
  1648. </constructor>
  1649. <method name="getNewApplicationResponse" return="org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse"
  1650. abstract="false" native="false" synchronized="false"
  1651. static="false" final="false" visibility="public"
  1652. deprecated="not deprecated">
  1653. </method>
  1654. <method name="getApplicationSubmissionContext" return="org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext"
  1655. abstract="false" native="false" synchronized="false"
  1656. static="false" final="false" visibility="public"
  1657. deprecated="not deprecated">
  1658. </method>
  1659. </class>
  1660. <!-- end class org.apache.hadoop.yarn.client.api.YarnClientApplication -->
  1661. </package>
  1662. <package name="org.apache.hadoop.yarn.client.api.async">
  1663. <!-- start class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync -->
  1664. <class name="AMRMClientAsync" extends="org.apache.hadoop.service.AbstractService"
  1665. abstract="true"
  1666. static="false" final="false" visibility="public"
  1667. deprecated="not deprecated">
  1668. <constructor name="AMRMClientAsync" type="int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.AbstractCallbackHandler"
  1669. static="false" final="false" visibility="protected"
  1670. deprecated="not deprecated">
  1671. </constructor>
  1672. <constructor name="AMRMClientAsync" type="org.apache.hadoop.yarn.client.api.AMRMClient, int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.AbstractCallbackHandler"
  1673. static="false" final="false" visibility="protected"
  1674. deprecated="not deprecated">
  1675. </constructor>
  1676. <constructor name="AMRMClientAsync" type="int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1677. static="false" final="false" visibility="protected"
  1678. deprecated="not deprecated">
  1679. </constructor>
  1680. <constructor name="AMRMClientAsync" type="org.apache.hadoop.yarn.client.api.AMRMClient, int, org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1681. static="false" final="false" visibility="protected"
  1682. deprecated="not deprecated">
  1683. </constructor>
  1684. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1685. abstract="false" native="false" synchronized="false"
  1686. static="true" final="false" visibility="public"
  1687. deprecated="not deprecated">
  1688. <param name="intervalMs" type="int"/>
  1689. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.AbstractCallbackHandler"/>
  1690. <doc>
  1691. <![CDATA[<p>Create a new instance of AMRMClientAsync.</p>
  1692. @param intervalMs heartbeat interval in milliseconds between AM and RM
  1693. @param callbackHandler callback handler that processes responses from
  1694. the <code>ResourceManager</code>]]>
  1695. </doc>
  1696. </method>
  1697. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1698. abstract="false" native="false" synchronized="false"
  1699. static="true" final="false" visibility="public"
  1700. deprecated="not deprecated">
  1701. <param name="client" type="org.apache.hadoop.yarn.client.api.AMRMClient"/>
  1702. <param name="intervalMs" type="int"/>
  1703. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.AbstractCallbackHandler"/>
  1704. <doc>
  1705. <![CDATA[<p>Create a new instance of AMRMClientAsync.</p>
  1706. @param client the AMRMClient instance
  1707. @param intervalMs heartbeat interval in milliseconds between AM and RM
  1708. @param callbackHandler callback handler that processes responses from
  1709. the <code>ResourceManager</code>]]>
  1710. </doc>
  1711. </method>
  1712. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1713. abstract="false" native="false" synchronized="false"
  1714. static="true" final="false" visibility="public"
  1715. deprecated="Use {@link #createAMRMClientAsync(int,
  1716. AMRMClientAsync.AbstractCallbackHandler)} instead.">
  1717. <param name="intervalMs" type="int"/>
  1718. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"/>
  1719. <doc>
  1720. <![CDATA[@deprecated Use {@link #createAMRMClientAsync(int,
  1721. AMRMClientAsync.AbstractCallbackHandler)} instead.]]>
  1722. </doc>
  1723. </method>
  1724. <method name="createAMRMClientAsync" return="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync"
  1725. abstract="false" native="false" synchronized="false"
  1726. static="true" final="false" visibility="public"
  1727. deprecated="Use {@link #createAMRMClientAsync(AMRMClient,
  1728. int, AMRMClientAsync.AbstractCallbackHandler)} instead.">
  1729. <param name="client" type="org.apache.hadoop.yarn.client.api.AMRMClient"/>
  1730. <param name="intervalMs" type="int"/>
  1731. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"/>
  1732. <doc>
  1733. <![CDATA[@deprecated Use {@link #createAMRMClientAsync(AMRMClient,
  1734. int, AMRMClientAsync.AbstractCallbackHandler)} instead.]]>
  1735. </doc>
  1736. </method>
  1737. <method name="setHeartbeatInterval"
  1738. abstract="false" native="false" synchronized="false"
  1739. static="false" final="false" visibility="public"
  1740. deprecated="not deprecated">
  1741. <param name="interval" type="int"/>
  1742. </method>
  1743. <method name="getMatchingRequests" return="java.util.List"
  1744. abstract="true" native="false" synchronized="false"
  1745. static="false" final="false" visibility="public"
  1746. deprecated="not deprecated">
  1747. <param name="priority" type="org.apache.hadoop.yarn.api.records.Priority"/>
  1748. <param name="resourceName" type="java.lang.String"/>
  1749. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  1750. </method>
  1751. <method name="registerApplicationMaster" return="org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse"
  1752. abstract="true" native="false" synchronized="false"
  1753. static="false" final="false" visibility="public"
  1754. deprecated="not deprecated">
  1755. <param name="appHostName" type="java.lang.String"/>
  1756. <param name="appHostPort" type="int"/>
  1757. <param name="appTrackingUrl" type="java.lang.String"/>
  1758. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1759. <exception name="IOException" type="java.io.IOException"/>
  1760. <doc>
  1761. <![CDATA[Registers this application master with the resource manager. On successful
  1762. registration, starts the heartbeating thread.
  1763. @throws YarnException
  1764. @throws IOException]]>
  1765. </doc>
  1766. </method>
  1767. <method name="unregisterApplicationMaster"
  1768. abstract="true" native="false" synchronized="false"
  1769. static="false" final="false" visibility="public"
  1770. deprecated="not deprecated">
  1771. <param name="appStatus" type="org.apache.hadoop.yarn.api.records.FinalApplicationStatus"/>
  1772. <param name="appMessage" type="java.lang.String"/>
  1773. <param name="appTrackingUrl" type="java.lang.String"/>
  1774. <exception name="YarnException" type="org.apache.hadoop.yarn.exceptions.YarnException"/>
  1775. <exception name="IOException" type="java.io.IOException"/>
  1776. <doc>
  1777. <![CDATA[Unregister the application master. This must be called in the end.
  1778. @param appStatus Success/Failure status of the master
  1779. @param appMessage Diagnostics message on failure
  1780. @param appTrackingUrl New URL to get master info
  1781. @throws YarnException
  1782. @throws IOException]]>
  1783. </doc>
  1784. </method>
  1785. <method name="addContainerRequest"
  1786. abstract="true" native="false" synchronized="false"
  1787. static="false" final="false" visibility="public"
  1788. deprecated="not deprecated">
  1789. <param name="req" type="T"/>
  1790. <doc>
  1791. <![CDATA[Request containers for resources before calling <code>allocate</code>
  1792. @param req Resource request]]>
  1793. </doc>
  1794. </method>
  1795. <method name="removeContainerRequest"
  1796. abstract="true" native="false" synchronized="false"
  1797. static="false" final="false" visibility="public"
  1798. deprecated="not deprecated">
  1799. <param name="req" type="T"/>
  1800. <doc>
  1801. <![CDATA[Remove previous container request. The previous container request may have
  1802. already been sent to the ResourceManager. So even after the remove request
  1803. the app must be prepared to receive an allocation for the previous request
  1804. even after the remove request
  1805. @param req Resource request]]>
  1806. </doc>
  1807. </method>
  1808. <method name="requestContainerResourceChange"
  1809. abstract="true" native="false" synchronized="false"
  1810. static="false" final="false" visibility="public"
  1811. deprecated="not deprecated">
  1812. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  1813. <param name="capability" type="org.apache.hadoop.yarn.api.records.Resource"/>
  1814. <doc>
  1815. <![CDATA[Request container resource change before calling <code>allocate</code>.
  1816. Any previous pending resource change request of the same container will be
  1817. removed.
  1818. Application that calls this method is expected to maintain the
  1819. <code>Container</code>s that are returned from previous successful
  1820. allocations or resource changes. By passing in the existing container and a
  1821. target resource capability to this method, the application requests the
  1822. ResourceManager to change the existing resource allocation to the target
  1823. resource allocation.
  1824. @param container The container returned from the last successful resource
  1825. allocation or resource change
  1826. @param capability The target resource capability of the container]]>
  1827. </doc>
  1828. </method>
  1829. <method name="releaseAssignedContainer"
  1830. abstract="true" native="false" synchronized="false"
  1831. static="false" final="false" visibility="public"
  1832. deprecated="not deprecated">
  1833. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  1834. <doc>
  1835. <![CDATA[Release containers assigned by the Resource Manager. If the app cannot use
  1836. the container or wants to give up the container then it can release them.
  1837. The app needs to make new requests for the released resource capability if
  1838. it still needs it. eg. it released non-local resources
  1839. @param containerId]]>
  1840. </doc>
  1841. </method>
  1842. <method name="getAvailableResources" return="org.apache.hadoop.yarn.api.records.Resource"
  1843. abstract="true" native="false" synchronized="false"
  1844. static="false" final="false" visibility="public"
  1845. deprecated="not deprecated">
  1846. <doc>
  1847. <![CDATA[Get the currently available resources in the cluster.
  1848. A valid value is available after a call to allocate has been made
  1849. @return Currently available resources]]>
  1850. </doc>
  1851. </method>
  1852. <method name="getClusterNodeCount" return="int"
  1853. abstract="true" native="false" synchronized="false"
  1854. static="false" final="false" visibility="public"
  1855. deprecated="not deprecated">
  1856. <doc>
  1857. <![CDATA[Get the current number of nodes in the cluster.
  1858. A valid values is available after a call to allocate has been made
  1859. @return Current number of nodes in the cluster]]>
  1860. </doc>
  1861. </method>
  1862. <method name="updateBlacklist"
  1863. abstract="true" native="false" synchronized="false"
  1864. static="false" final="false" visibility="public"
  1865. deprecated="not deprecated">
  1866. <param name="blacklistAdditions" type="java.util.List"/>
  1867. <param name="blacklistRemovals" type="java.util.List"/>
  1868. <doc>
  1869. <![CDATA[Update application's blacklist with addition or removal resources.
  1870. @param blacklistAdditions list of resources which should be added to the
  1871. application blacklist
  1872. @param blacklistRemovals list of resources which should be removed from the
  1873. application blacklist]]>
  1874. </doc>
  1875. </method>
  1876. <method name="waitFor"
  1877. abstract="false" native="false" synchronized="false"
  1878. static="false" final="false" visibility="public"
  1879. deprecated="not deprecated">
  1880. <param name="check" type="com.google.common.base.Supplier"/>
  1881. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1882. <doc>
  1883. <![CDATA[Wait for <code>check</code> to return true for each 1000 ms.
  1884. See also {@link #waitFor(com.google.common.base.Supplier, int)}
  1885. and {@link #waitFor(com.google.common.base.Supplier, int, int)}
  1886. @param check]]>
  1887. </doc>
  1888. </method>
  1889. <method name="waitFor"
  1890. abstract="false" native="false" synchronized="false"
  1891. static="false" final="false" visibility="public"
  1892. deprecated="not deprecated">
  1893. <param name="check" type="com.google.common.base.Supplier"/>
  1894. <param name="checkEveryMillis" type="int"/>
  1895. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1896. <doc>
  1897. <![CDATA[Wait for <code>check</code> to return true for each
  1898. <code>checkEveryMillis</code> ms.
  1899. See also {@link #waitFor(com.google.common.base.Supplier, int, int)}
  1900. @param check user defined checker
  1901. @param checkEveryMillis interval to call <code>check</code>]]>
  1902. </doc>
  1903. </method>
  1904. <method name="waitFor"
  1905. abstract="false" native="false" synchronized="false"
  1906. static="false" final="false" visibility="public"
  1907. deprecated="not deprecated">
  1908. <param name="check" type="com.google.common.base.Supplier"/>
  1909. <param name="checkEveryMillis" type="int"/>
  1910. <param name="logInterval" type="int"/>
  1911. <exception name="InterruptedException" type="java.lang.InterruptedException"/>
  1912. <doc>
  1913. <![CDATA[Wait for <code>check</code> to return true for each
  1914. <code>checkEveryMillis</code> ms. In the main loop, this method will log
  1915. the message "waiting in main loop" for each <code>logInterval</code> times
  1916. iteration to confirm the thread is alive.
  1917. @param check user defined checker
  1918. @param checkEveryMillis interval to call <code>check</code>
  1919. @param logInterval interval to log for each]]>
  1920. </doc>
  1921. </method>
  1922. <field name="client" type="org.apache.hadoop.yarn.client.api.AMRMClient"
  1923. transient="false" volatile="false"
  1924. static="false" final="true" visibility="protected"
  1925. deprecated="not deprecated">
  1926. </field>
  1927. <field name="handler" type="org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler"
  1928. transient="false" volatile="false"
  1929. static="false" final="true" visibility="protected"
  1930. deprecated="not deprecated">
  1931. </field>
  1932. <field name="heartbeatIntervalMs" type="java.util.concurrent.atomic.AtomicInteger"
  1933. transient="false" volatile="false"
  1934. static="false" final="true" visibility="protected"
  1935. deprecated="not deprecated">
  1936. </field>
  1937. <doc>
  1938. <![CDATA[<code>AMRMClientAsync</code> handles communication with the ResourceManager
  1939. and provides asynchronous updates on events such as container allocations and
  1940. completions. It contains a thread that sends periodic heartbeats to the
  1941. ResourceManager.
  1942. It should be used by implementing a CallbackHandler:
  1943. <pre>
  1944. {@code
  1945. class MyCallbackHandler extends AMRMClientAsync.AbstractCallbackHandler {
  1946. public void onContainersAllocated(List<Container> containers) {
  1947. [run tasks on the containers]
  1948. }
  1949. public void onContainersUpdated(List<Container> containers) {
  1950. [determine if resource allocation of containers have been increased in
  1951. the ResourceManager, and if so, inform the NodeManagers to increase the
  1952. resource monitor/enforcement on the containers]
  1953. }
  1954. public void onContainersCompleted(List<ContainerStatus> statuses) {
  1955. [update progress, check whether app is done]
  1956. }
  1957. public void onNodesUpdated(List<NodeReport> updated) {}
  1958. public void onReboot() {}
  1959. }
  1960. }
  1961. </pre>
  1962. The client's lifecycle should be managed similarly to the following:
  1963. <pre>
  1964. {@code
  1965. AMRMClientAsync asyncClient =
  1966. createAMRMClientAsync(appAttId, 1000, new MyCallbackhandler());
  1967. asyncClient.init(conf);
  1968. asyncClient.start();
  1969. RegisterApplicationMasterResponse response = asyncClient
  1970. .registerApplicationMaster(appMasterHostname, appMasterRpcPort,
  1971. appMasterTrackingUrl);
  1972. asyncClient.addContainerRequest(containerRequest);
  1973. [... wait for application to complete]
  1974. asyncClient.unregisterApplicationMaster(status, appMsg, trackingUrl);
  1975. asyncClient.stop();
  1976. }
  1977. </pre>]]>
  1978. </doc>
  1979. </class>
  1980. <!-- end class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync -->
  1981. <!-- start class org.apache.hadoop.yarn.client.api.async.NMClientAsync -->
  1982. <class name="NMClientAsync" extends="org.apache.hadoop.service.AbstractService"
  1983. abstract="true"
  1984. static="false" final="false" visibility="public"
  1985. deprecated="not deprecated">
  1986. <constructor name="NMClientAsync" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.AbstractCallbackHandler"
  1987. static="false" final="false" visibility="protected"
  1988. deprecated="not deprecated">
  1989. </constructor>
  1990. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.async.NMClientAsync.AbstractCallbackHandler"
  1991. static="false" final="false" visibility="protected"
  1992. deprecated="not deprecated">
  1993. </constructor>
  1994. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.NMClient, org.apache.hadoop.yarn.client.api.async.NMClientAsync.AbstractCallbackHandler"
  1995. static="false" final="false" visibility="protected"
  1996. deprecated="not deprecated">
  1997. </constructor>
  1998. <constructor name="NMClientAsync" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  1999. static="false" final="false" visibility="protected"
  2000. deprecated="Use {@link #NMClientAsync(AbstractCallbackHandler)}
  2001. instead.">
  2002. <doc>
  2003. <![CDATA[@deprecated Use {@link #NMClientAsync(AbstractCallbackHandler)}
  2004. instead.]]>
  2005. </doc>
  2006. </constructor>
  2007. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  2008. static="false" final="false" visibility="protected"
  2009. deprecated="Use {@link #NMClientAsync(String, AbstractCallbackHandler)}
  2010. instead.">
  2011. <doc>
  2012. <![CDATA[@deprecated Use {@link #NMClientAsync(String, AbstractCallbackHandler)}
  2013. instead.]]>
  2014. </doc>
  2015. </constructor>
  2016. <constructor name="NMClientAsync" type="java.lang.String, org.apache.hadoop.yarn.client.api.NMClient, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  2017. static="false" final="false" visibility="protected"
  2018. deprecated="not deprecated">
  2019. </constructor>
  2020. <method name="createNMClientAsync" return="org.apache.hadoop.yarn.client.api.async.NMClientAsync"
  2021. abstract="false" native="false" synchronized="false"
  2022. static="true" final="false" visibility="public"
  2023. deprecated="not deprecated">
  2024. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.AbstractCallbackHandler"/>
  2025. </method>
  2026. <method name="createNMClientAsync" return="org.apache.hadoop.yarn.client.api.async.NMClientAsync"
  2027. abstract="false" native="false" synchronized="false"
  2028. static="true" final="false" visibility="public"
  2029. deprecated="Use {@link #createNMClientAsync(AbstractCallbackHandler)}
  2030. instead.">
  2031. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"/>
  2032. <doc>
  2033. <![CDATA[@deprecated Use {@link #createNMClientAsync(AbstractCallbackHandler)}
  2034. instead.]]>
  2035. </doc>
  2036. </method>
  2037. <method name="startContainerAsync"
  2038. abstract="true" native="false" synchronized="false"
  2039. static="false" final="false" visibility="public"
  2040. deprecated="not deprecated">
  2041. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  2042. <param name="containerLaunchContext" type="org.apache.hadoop.yarn.api.records.ContainerLaunchContext"/>
  2043. </method>
  2044. <method name="increaseContainerResourceAsync"
  2045. abstract="true" native="false" synchronized="false"
  2046. static="false" final="false" visibility="public"
  2047. deprecated="not deprecated">
  2048. <param name="container" type="org.apache.hadoop.yarn.api.records.Container"/>
  2049. </method>
  2050. <method name="stopContainerAsync"
  2051. abstract="true" native="false" synchronized="false"
  2052. static="false" final="false" visibility="public"
  2053. deprecated="not deprecated">
  2054. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  2055. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  2056. </method>
  2057. <method name="getContainerStatusAsync"
  2058. abstract="true" native="false" synchronized="false"
  2059. static="false" final="false" visibility="public"
  2060. deprecated="not deprecated">
  2061. <param name="containerId" type="org.apache.hadoop.yarn.api.records.ContainerId"/>
  2062. <param name="nodeId" type="org.apache.hadoop.yarn.api.records.NodeId"/>
  2063. </method>
  2064. <method name="getClient" return="org.apache.hadoop.yarn.client.api.NMClient"
  2065. abstract="false" native="false" synchronized="false"
  2066. static="false" final="false" visibility="public"
  2067. deprecated="not deprecated">
  2068. </method>
  2069. <method name="setClient"
  2070. abstract="false" native="false" synchronized="false"
  2071. static="false" final="false" visibility="public"
  2072. deprecated="not deprecated">
  2073. <param name="client" type="org.apache.hadoop.yarn.client.api.NMClient"/>
  2074. </method>
  2075. <method name="getCallbackHandler" return="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  2076. abstract="false" native="false" synchronized="false"
  2077. static="false" final="false" visibility="public"
  2078. deprecated="not deprecated">
  2079. </method>
  2080. <method name="setCallbackHandler"
  2081. abstract="false" native="false" synchronized="false"
  2082. static="false" final="false" visibility="public"
  2083. deprecated="not deprecated">
  2084. <param name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"/>
  2085. </method>
  2086. <field name="client" type="org.apache.hadoop.yarn.client.api.NMClient"
  2087. transient="false" volatile="false"
  2088. static="false" final="false" visibility="protected"
  2089. deprecated="not deprecated">
  2090. </field>
  2091. <field name="callbackHandler" type="org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler"
  2092. transient="false" volatile="false"
  2093. static="false" final="false" visibility="protected"
  2094. deprecated="not deprecated">
  2095. </field>
  2096. <doc>
  2097. <![CDATA[<code>NMClientAsync</code> handles communication with all the NodeManagers
  2098. and provides asynchronous updates on getting responses from them. It
  2099. maintains a thread pool to communicate with individual NMs where a number of
  2100. worker threads process requests to NMs by using {@link NMClientImpl}. The max
  2101. size of the thread pool is configurable through
  2102. {@link YarnConfiguration#NM_CLIENT_ASYNC_THREAD_POOL_MAX_SIZE}.
  2103. It should be used in conjunction with a CallbackHandler. For example
  2104. <pre>
  2105. {@code
  2106. class MyCallbackHandler extends NMClientAsync.AbstractCallbackHandler {
  2107. public void onContainerStarted(ContainerId containerId,
  2108. Map<String, ByteBuffer> allServiceResponse) {
  2109. [post process after the container is started, process the response]
  2110. }
  2111. public void onContainerResourceIncreased(ContainerId containerId,
  2112. Resource resource) {
  2113. [post process after the container resource is increased]
  2114. }
  2115. public void onContainerStatusReceived(ContainerId containerId,
  2116. ContainerStatus containerStatus) {
  2117. [make use of the status of the container]
  2118. }
  2119. public void onContainerStopped(ContainerId containerId) {
  2120. [post process after the container is stopped]
  2121. }
  2122. public void onStartContainerError(
  2123. ContainerId containerId, Throwable t) {
  2124. [handle the raised exception]
  2125. }
  2126. public void onGetContainerStatusError(
  2127. ContainerId containerId, Throwable t) {
  2128. [handle the raised exception]
  2129. }
  2130. public void onStopContainerError(
  2131. ContainerId containerId, Throwable t) {
  2132. [handle the raised exception]
  2133. }
  2134. }
  2135. }
  2136. </pre>
  2137. The client's life-cycle should be managed like the following:
  2138. <pre>
  2139. {@code
  2140. NMClientAsync asyncClient =
  2141. NMClientAsync.createNMClientAsync(new MyCallbackhandler());
  2142. asyncClient.init(conf);
  2143. asyncClient.start();
  2144. asyncClient.startContainer(container, containerLaunchContext);
  2145. [... wait for container being started]
  2146. asyncClient.getContainerStatus(container.getId(), container.getNodeId(),
  2147. container.getContainerToken());
  2148. [... handle the status in the callback instance]
  2149. asyncClient.stopContainer(container.getId(), container.getNodeId(),
  2150. container.getContainerToken());
  2151. [... wait for container being stopped]
  2152. asyncClient.stop();
  2153. }
  2154. </pre>]]>
  2155. </doc>
  2156. </class>
  2157. <!-- end class org.apache.hadoop.yarn.client.api.async.NMClientAsync -->
  2158. </package>
  2159. <package name="org.apache.hadoop.yarn.client.api.async.impl">
  2160. </package>
  2161. <package name="org.apache.hadoop.yarn.client.api.impl">
  2162. </package>
  2163. <package name="org.apache.hadoop.yarn.client.cli">
  2164. <!-- start class org.apache.hadoop.yarn.client.cli.LogsCLI -->
  2165. <class name="LogsCLI" extends="org.apache.hadoop.conf.Configured"
  2166. abstract="false"
  2167. static="false" final="false" visibility="public"
  2168. deprecated="not deprecated">
  2169. <implements name="org.apache.hadoop.util.Tool"/>
  2170. <constructor name="LogsCLI"
  2171. static="false" final="false" visibility="public"
  2172. deprecated="not deprecated">
  2173. </constructor>
  2174. <method name="run" return="int"
  2175. abstract="false" native="false" synchronized="false"
  2176. static="false" final="false" visibility="public"
  2177. deprecated="not deprecated">
  2178. <param name="args" type="java.lang.String[]"/>
  2179. <exception name="Exception" type="java.lang.Exception"/>
  2180. </method>
  2181. <method name="createYarnClient" return="org.apache.hadoop.yarn.client.api.YarnClient"
  2182. abstract="false" native="false" synchronized="false"
  2183. static="false" final="false" visibility="protected"
  2184. deprecated="not deprecated">
  2185. </method>
  2186. <method name="main"
  2187. abstract="false" native="false" synchronized="false"
  2188. static="true" final="false" visibility="public"
  2189. deprecated="not deprecated">
  2190. <param name="args" type="java.lang.String[]"/>
  2191. <exception name="Exception" type="java.lang.Exception"/>
  2192. </method>
  2193. <field name="HELP_CMD" type="java.lang.String"
  2194. transient="false" volatile="false"
  2195. static="true" final="true" visibility="public"
  2196. deprecated="not deprecated">
  2197. </field>
  2198. </class>
  2199. <!-- end class org.apache.hadoop.yarn.client.cli.LogsCLI -->
  2200. </package>
  2201. </api>