通過 Job History Server 的 web console 查閱在 Yarn 上 MapReduce job 的 job conf xml 檔案

來源:互聯網
上載者:User

標籤:hadoop   yarn   job history server   job.xml   

很多時候,Yarn 的使用者希望知道自己運行過的某個 MapReduce job 的運行參數,此時可以從MapReduce History Server的 web console上查閱該 job的conf xml 檔案內容。當然使用者也可以先登入Yarn 的 web console的地址,然後再從上面跳轉到 Job History Server 的 web console進行查閱。本文將以一個簡單的圖文例子來具體示範該功能。


步驟:

1、在啟動 Job History Server 前,在mapred-site.xml檔案裡面對其相關參數進行設定,如下:

  <property>
    <name>mapreduce.jobhistory.address</name>
    <value>hostname:10020</value>
  </property>
  <property>
    <name>mapreduce.jobhistory.webapp.address</name>
    <value>hostname:19888</value>
  </property>
2、通過命令“sbin/mr-jobhistory-daemon.sh start historyserver”啟動 Job History Server

3、執行一個簡單的 MapReduce job,比如 wordcount。執行時,不加任何參數調整,使用預設設定。

4、執行完後直接登入Job History Server 的 web console,網址為“ http://hostname:19888/jobhistory”

在網頁上可以看到執行過的 job 列表。

5、點擊 Job ID號(比如job_1417166623034_0343),進入具體 Job 的描述頁面



6、點擊“Configuration” 連結,查閱MapReduce job 的 job conf xml 檔案內容



7、過濾查看參數‘mapreduce.reduce.shuffle.input.buffer.percent ’的值——為預設值“0.70”:

8、提交執行一個新的MapReduce job,並指定參數‘mapreduce.reduce.shuffle.input.buffer.percent ’的值為“0.69”:“hadoop jar hadoop-examples-2.2.0.jar wordcount -Dmapreduce.reduce.shuffle.input.buffer.percent=0.69 /tmp/wdinput /tmp/wdoutput”。

9、執行完MR Job後,再次登入Job History Server 的 web console,然後查閱該Job的configuration內容——此時,其參數‘mapreduce.reduce.shuffle.input.buffer.percent ’的值為“0.69”。證明通過“-Dmapreduce.reduce.shuffle.input.buffer.percent=0.69”成功傳遞給了 MR job 新的參數值。


10、另外,除了直接登入Job History Server 的 web console,使用者也可以先登入Yarn 的 web console的地址,然後再從上面跳轉到 Job History Server 的 web console進行查閱:






通過 Job History Server 的 web console 查閱在 Yarn 上 MapReduce job 的 job conf xml 檔案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.