wiki:Hinet130923/Lab12

Version 2 (modified by jazz, 11 years ago) (diff)

--

◢ <實作十一> | <回課程大綱> ▲ | <實作十三> ◣

實作十二 Lab12

  • 下一個範例我們使用了一個 jar 的技巧,直接修改
  lab003/FsShell

Excercise: (1) What is the result of Path.CUR_DIR ? (2) In local mode, which class is srcFs object ? (3) In full distributed mode, which class is srcFs object ? (4) Which classes are updated in hadoop-core-*.jar according to the difference between two jar files? (5) Please observe the source code architecture in ${HOME}/hadoop/src/core/org/apache/hadoop/fs.

Which File Systems are supported by Hadoop 1.0.4? (A) HDFS (hdfs://namenode:port) (B) Amazon S3 (s3:// , s3n://) (C) KFS (D) Local File System (file:///) (F) FTP (ftp://user:passwd@ftp-server:port) (G) RAMFS (ramfs://) (H) HAR (Hadoop Archive Filesystem, har://underlyingfsscheme-host:port/archivepath or har:///archivepath )

cd ~/hadoop_labs/lab004
ant
hadoop fs -ls
hadoop jar copyFromLocal.jar doc input
hadoop fs -ls
touch test
hadoop jar copyFromLocal.jar test file
hadoop fs -ls

export HADOOP_CONF_DIR=~/hadoop/conf.local/
hadoop fs -ls
hadoop jar copyFromLocal.jar doc input
hadoop fs -ls
hadoop jar copyFromLocal.jar test file
hadoop fs -ls
unset HADOOP_CONF_DIR

ant clean

實作習題

<問題 1> 在全分散模式下,

(1) In full distributed mode, what do you see after running "hadoop fs -ls"? (2) Change to local mode, what do you see after running "hadoop fs -ls"?