|   | 6 |  | 
                  
                          |   | 7 |  * 下一個範例我們使用了一個 jar 的技巧,直接修改 | 
                  
                          |   | 8 |  | 
                  
                          |   | 9 | {{{ | 
                  
                          |   | 10 |   lab003/FsShell | 
                  
                          |   | 11 | }}} | 
                  
                          |   | 12 |  | 
                  
                          |   | 13 |  | 
                  
                          |   | 14 |   Excercise: | 
                  
                          |   | 15 |   (1) What is the result of Path.CUR_DIR ? | 
                  
                          |   | 16 |   (2) In local mode, which class is srcFs object ? | 
                  
                          |   | 17 |   (3) In full distributed mode, which class is srcFs object ? | 
                  
                          |   | 18 |   (4) Which classes are updated in hadoop-core-*.jar according to the difference between two jar files? | 
                  
                          |   | 19 |   (5) Please observe the source code architecture in ${HOME}/hadoop/src/core/org/apache/hadoop/fs. | 
                  
                          |   | 20 |       Which File Systems are supported by Hadoop 1.0.4? | 
                  
                          |   | 21 |       (A) HDFS (hdfs://namenode:port) | 
                  
                          |   | 22 |       (B) Amazon S3 (s3:// , s3n://) | 
                  
                          |   | 23 |       (C) KFS  | 
                  
                          |   | 24 |       (D) Local File System (file:///) | 
                  
                          |   | 25 |       (F) FTP (ftp://user:passwd@ftp-server:port) | 
                  
                          |   | 26 |       (G) RAMFS (ramfs://) | 
                  
                          |   | 27 |       (H) HAR (Hadoop Archive Filesystem, har://underlyingfsscheme-host:port/archivepath or har:///archivepath ) | 
                  
                          |   | 28 |  | 
                  
                          |   | 29 | {{{ | 
                  
                          |   | 30 | cd ~/hadoop_labs/lab004 | 
                  
                          |   | 31 | ant | 
                  
                          |   | 32 | hadoop fs -ls | 
                  
                          |   | 33 | hadoop jar copyFromLocal.jar doc input | 
                  
                          |   | 34 | hadoop fs -ls | 
                  
                          |   | 35 | touch test | 
                  
                          |   | 36 | hadoop jar copyFromLocal.jar test file | 
                  
                          |   | 37 | hadoop fs -ls | 
                  
                          |   | 38 |  | 
                  
                          |   | 39 | export HADOOP_CONF_DIR=~/hadoop/conf.local/ | 
                  
                          |   | 40 | hadoop fs -ls | 
                  
                          |   | 41 | hadoop jar copyFromLocal.jar doc input | 
                  
                          |   | 42 | hadoop fs -ls | 
                  
                          |   | 43 | hadoop jar copyFromLocal.jar test file | 
                  
                          |   | 44 | hadoop fs -ls | 
                  
                          |   | 45 | unset HADOOP_CONF_DIR | 
                  
                          |   | 46 |  | 
                  
                          |   | 47 | ant clean | 
                  
                          |   | 48 | }}} | 
                  
                          |   | 49 |  | 
                  
                          |   | 50 | == 實作習題 == | 
                  
                          |   | 51 |  | 
                  
                          |   | 52 |  <問題 1> 在全分散模式下, | 
                  
                          |   | 53 |   (1) In full distributed mode, what do you see after running "hadoop fs -ls"? | 
                  
                          |   | 54 |   (2) Change to local mode, what do you see after running "hadoop fs -ls"? |