Changes between Initial Version and Version 1 of III131019/Lab4


Ignore:
Timestamp:
Oct 19, 2013, 12:31:16 AM (11 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • III131019/Lab4

    v1 v1  
     1[[PageOutline]]
     2
     3◢ <[wiki:III131019/Lab3 實作三]> | <[wiki:III131019 回課程大綱]> ▲ | <[wiki:III131019/Lab5 實作五]> ◣
     4
     5= 實作四 Lab 4 =
     6
     7{{{
     8#!html
     9<p style="text-align: center;"><big style="font-weight: bold;"><big>HDFS 基本指令操作練習<br/>HDFS in practice (full distributed mode)</big></big></p>
     10}}}
     11
     12{{{
     13#!text
     14請先連線至 nodeN.3du.me , N 為您的報名編號
     15}}}
     16
     17== Content 1: HDFS Shell 基本操作 ==
     18== Content 1: Basic HDFS Shell Commands ==
     19
     20=== 1.1 瀏覽你HDFS目錄 ===
     21=== 1.1 Browsing Your HDFS Folder ===
     22
     23{{{
     24~$ hadoop fs -ls
     25}}}
     26
     27=== 1.2 上傳資料到 HDFS 目錄 ===
     28=== 1.2 Upload Files or Folder to HDFS ===
     29
     30 * 上傳 Upload
     31
     32{{{
     33~$ hadoop fs -put ${HOME}/hadoop/conf toHDFS
     34}}}
     35
     36 * 檢查 Check
     37
     38{{{
     39~$ hadoop fs -ls
     40}}}
     41 
     42=== 1.3 下載 HDFS 的資料到本地目錄 ===
     43=== 1.3 Download HDFS Files or Folder to Local ===
     44
     45 * 下載 Download
     46
     47{{{
     48~$ hadoop fs -get toHDFS fromHDFS
     49}}}
     50
     51 * 檢查 Check
     52{{{
     53~$ ls -al | grep fromHDFS
     54~$ diff ${HOME}/hadoop/conf fromHDFS/
     55}}} 
     56
     57=== 1.4 刪除檔案 ===
     58=== 1.4 Remove Files or Folder ===
     59
     60{{{
     61~$ hadoop fs -ls toHDFS/masters
     62~$ hadoop fs -rm toHDFS/masters
     63}}}
     64
     65=== 1.5 直接看檔案 ===
     66=== 1.5 Browse Files Directly ===
     67
     68{{{
     69~$ hadoop fs -ls toHDFS/slaves
     70~$ hadoop fs -cat toHDFS/slaves
     71}}}
     72
     73=== 1.6 更多指令操作 ===
     74=== 1.6 More Commands -- Help message ===
     75
     76{{{
     77~$ hadoop fs
     78
     79Usage: java FsShell
     80           [-ls <path>]
     81           [-lsr <path>]
     82           [-du <path>]
     83           [-dus <path>]
     84           [-count[-q] <path>]
     85           [-mv <src> <dst>]
     86           [-cp <src> <dst>]
     87           [-rm <path>]
     88           [-rmr <path>]
     89           [-expunge]
     90           [-put <localsrc> ... <dst>]
     91           [-copyFromLocal <localsrc> ... <dst>]
     92           [-moveFromLocal <localsrc> ... <dst>]
     93           [-get [-ignoreCrc] [-crc] <src> <localdst>]
     94           [-getmerge <src> <localdst> [addnl]]
     95           [-cat <src>]
     96           [-text <src>]
     97           [-copyToLocal [-ignoreCrc] [-crc] <src> <localdst>]
     98           [-moveToLocal [-crc] <src> <localdst>]
     99           [-mkdir <path>]
     100           [-setrep [-R] [-w] <rep> <path/file>]
     101           [-touchz <path>]
     102           [-test -[ezd] <path>]
     103           [-stat [format] <path>]
     104           [-tail [-f] <file>]
     105           [-chmod [-R] <MODE[,MODE]... | OCTALMODE> PATH...]
     106           [-chown [-R] [OWNER][:[GROUP]] PATH...]
     107           [-chgrp [-R] GROUP PATH...]
     108           [-help [cmd]]
     109
     110Generic options supported are
     111-conf <configuration file>     specify an application configuration file
     112-D <property=value>            use value for given property
     113-fs <local|namenode:port>      specify a namenode
     114-jt <local|jobtracker:port>    specify a job tracker
     115-files <comma separated list of files>    specify comma separated files to be copied to the map reduce cluster
     116-libjars <comma separated list of jars>    specify comma separated jar files to include in the classpath.
     117-archives <comma separated list of archives>    specify comma separated archives to be unarchived on the compute machines.
     118The general command line syntax is
     119hadoop command [genericOptions] [commandOptions]
     120}}} 
     121 
     122== Content 2: 使用網頁 GUI 瀏覽資訊 ==
     123== Content 2: User Web GUI to browse HDFS ==
     124 
     125 * 連上 http://nodeN.3du.me:50070 的 NameNode Web Interface ,請將 N 取代為您的報名序號
     126{{{
     127w3m http://nodeN.3du.me:50070
     128}}}