close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Oct 19, 2013, 10:24:01 PM (12 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v5
|
v6
|
|
56 | 56 | } else { |
57 | 57 | + // Add by Jazz |
58 | | + System.out.println("ls("+Path.CUR_DIR+",false)"); |
| 58 | + System.out.println("ls("+Path.CUR_DIR+",false), Path.CUR_DIR = " + Path.CUR_DIR); |
59 | 59 | exitCode = ls(Path.CUR_DIR, false); |
60 | 60 | } |
… |
… |
|
80 | 80 | -C 變更至指定目錄並包含後面所列的檔案 |
81 | 81 | }}} |
| 82 | |
| 83 | * lab003/FsShell 所做的動作: |
| 84 | 1. 安裝 ant |
| 85 | 2. 編譯 src/FsShell.java 並使用 jar -u 將產生的 .class 更新到 hadoop-core-$VERSION.jar |
| 86 | 3. 顯示 hadoop-core-$VERSION.jar 與原始備份 hadoop-core-$VERSION.jar.org 的差異(請觀察日期) |
| 87 | 4. 採用 HADOOP_CONF_DIR 環境變數切換成單機模式,請留意畫面中出現的 srcFS 內容 |
| 88 | 5. 切換回全分散式模式,請留意畫面中出現的 srcFS 內容 |
| 89 | |
| 90 | == 實作習題 == |
| 91 | |
| 92 | <問題 1> 執行 lab003/FsShell,在單機模式時,srcFs 物件是哪一個 Java 類別 |
| 93 | {{{ |
| 94 | #!text |
| 95 | (A) org.apache.hadoop.fs.LocalFileSystem |
| 96 | (B) org.apache.hadoop.hdfs.DistributedFileSystem |
| 97 | (C) org.apache.hadoop.fs.shell.Count |
| 98 | (D) org.apache.hadoop.fs.shell.CommandFormat |
| 99 | }}} |
| 100 | |
| 101 | <問題 2> 執行 lab003/FsShell,在全分散模式時,srcFs 物件是哪一個 Java 類別 |
| 102 | {{{ |
| 103 | #!text |
| 104 | (A) org.apache.hadoop.fs.LocalFileSystem |
| 105 | (B) org.apache.hadoop.hdfs.DistributedFileSystem |
| 106 | (C) org.apache.hadoop.fs.shell.Count |
| 107 | (D) org.apache.hadoop.fs.shell.CommandFormat |
| 108 | }}} |