close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": libtasn1.so.6: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Sep 23, 2013, 5:16:20 PM (12 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v6
|
v7
|
|
| 16 | 16 | |
| 17 | 17 | * 通常一般程式設計師只能取得有限的權限,無法修改 hadoop 叢集的設定,[[BR]]因此是否能夠在 Hadoop Client 端對某些使用者有權修改的參數進行調整呢? |
| | 18 | |
| 18 | 19 | * 答案是可行的! [[BR]]Hadoop Client 執行端可以透過 HADOOP_CONF_DIR 環境變數來修改想要調整的 Hadoop 參數。[[BR]]以下拿前述的三種模式來做示範。 |
| | 20 | |
| 19 | 21 | * 各位前面執行完實作三,目前是運行於全分散模式(Full Distributed Mode)。[[BR]]我們可以透過修改 HADOOP_CONF_DIR 環境變數切換 hadoop 指令會採用的模式: |
| 20 | 22 | {{{ |
| … |
… |
|
| 26 | 28 | user@node1:~/hadoop_labs$ hadoop fs -ls |
| 27 | 29 | }}} |
| | 30 | |
| 28 | 31 | * 甚至透過這種方式,我們可以讓 Hadoop Client 在不同座 Hadoop 叢集之間做切換 |
| 29 | 32 | {{{ |
| … |
… |
|
| 39 | 42 | user@node50:~$ unset HADOOP_ROOT_LOGGER |
| 40 | 43 | }}} |
| | 44 | |
| | 45 | == 實作習題 == |
| | 46 | |
| | 47 | <問題 1> 當運行於全分散模式(Full Distributed Mode),卻使用 HADOOP_CONF_DIR 環境變數切換成偽分散模式(Pseudo-Distributed Mode)時,會出現甚麼情形? |
| | 48 | {{{ |
| | 49 | #!text |
| | 50 | (A) INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 9 time(s). |
| | 51 | (B) 正常可以顯示 hadoop fs -ls 的結果 |
| | 52 | }}} |
| | 53 | |
| | 54 | <問題 2> Hadoop 的三種模式中,哪一個無法跟全分散模式(Full Distributed Mode)並存? |
| | 55 | {{{ |
| | 56 | #!text |
| | 57 | (A) 偽分散模式(Pseudo-Distributed Mode) |
| | 58 | (B) 單機模式(Local Mode) |
| | 59 | }}} |