forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
21 lines
3.5 KiB
HTML
21 lines
3.5 KiB
HTML
<a name="mrs_01_1793"></a><a name="mrs_01_1793"></a>
|
|
|
|
<h1 class="topictitle1">How Do I Set the Task Priority When Submitting a MapReduce Task?</h1>
|
|
<div id="body1596092470808"><div class="section" id="mrs_01_1793__s01b5051241a542dea30ec0dc3004965f"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1793__a31b91dc79cac4e46ae1425d03c98d2f4">How do I set the job priority when submitting a MapReduce task?</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1793__s9c7127b627f14e77bf2f6729af649505"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1793__a91e581d9695d4a0f93159ed0e233c141">You can add the parameter <span class="parmname" id="mrs_01_1793__parmname36110205318"><b>-Dmapreduce.job.priority=<priority></b></span> in the command to set task priority when submitting MapReduce tasks on the client. The format is as follows:</p>
|
|
<p id="mrs_01_1793__aaaffe3ab5687493bbfd359826caaae46"><i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1793__ce828128c031a4ce99e7b50f2b5c7ee4f">yarn jar</span></b></i> <i><span class="varname" id="mrs_01_1793__v7461e9efaef94af4a01d8480b0d053c5"><jar> [mainClass]</span></i> <i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1793__cb2df259114404873aa019738683ec5d3">-Dmapreduce.job.priority=</span></b></i><i><span class="varname" id="mrs_01_1793__v694fc047b9cd4e118c31c7b794133630"><priority> [path1] [path2]</span></i></p>
|
|
<p id="mrs_01_1793__a5392df41ad8949788b06e072fe2b7334">The parameters in the command are described as follows:</p>
|
|
<ul id="mrs_01_1793__u3494475d08f24d93ad07a5d46c6239f0"><li id="mrs_01_1793__lc2271dbf055043038fc5c60d768a166e"><em id="mrs_01_1793__i29338235312"><jar></em>: specifies the name of the JAR package to be run.</li><li id="mrs_01_1793__l38b4259daed941f1a5812dec61c7bd6c"><em id="mrs_01_1793__i198823247318">[mainClass]</em>: specifies the <strong id="mrs_01_1793__b78828242315">main</strong> method of the class for an application project in a JAR file.</li><li id="mrs_01_1793__l2c8f5f8592df4cbd9c17cecae2b3a782"><em id="mrs_01_1793__i7643202614316"><priority></em>: specifies the priority of a task. The value can be <strong id="mrs_01_1793__b264312663116">VERY_HIGH</strong>, <strong id="mrs_01_1793__b16431726143110">HIGH</strong>, <strong id="mrs_01_1793__b164452611313">NORMAL</strong>, <strong id="mrs_01_1793__b176441226163115">LOW</strong>, or <strong id="mrs_01_1793__b1964413263316">VERY_LOW</strong>.</li></ul>
|
|
<ul id="mrs_01_1793__ufd3bee1339074f3f8597e3d73a6808fc"><li id="mrs_01_1793__l995248d294c247a7be7c687647899bd7"><em id="mrs_01_1793__i1798132717312">[path1]</em>: specifies the data input path.</li><li id="mrs_01_1793__l1451a4a394d448c7a30eb134c0404cf2"><em id="mrs_01_1793__i17387429173118">[path2]</em>: specifies the data output path.</li></ul>
|
|
<p id="mrs_01_1793__a9ff3452cfdc841d685a4214e5a41a031">For example, set the <span class="filepath" id="mrs_01_1793__fdb3307db51c74c869e96f850d5e039ba"><b>/opt/client/HDFS/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples*.jar</b></span> package to a high-priority task.</p>
|
|
<p id="mrs_01_1793__a556002f4ce60475e844dc56d1c23c00b"><b><span class="cmdname" id="mrs_01_1793__cmdname56811352104414">yarn jar /opt/client/HDFS/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples*.jar wordcount -Dmapreduce.job.priority=VERY_HIGH /DATA.txt /out/</span></b></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1788.html">Common Issues About MapReduce</a></div>
|
|
</div>
|
|
</div>
|
|
|