Changes between Version 2 and Version 3 of NCTU110329/Lab4


Ignore:
Timestamp:
Apr 19, 2011, 8:50:41 AM (14 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NCTU110329/Lab4

    v2 v3  
    7575
    7676{{{
    77 hadooper@vPro:~$ hadoop fs
     77hXXXX@vPro:~$ hadoop fs
    7878
    7979Usage: java FsShell
     
    134134$ hadoop fs -ls input
    135135Found 4 items
    136 -rw-r--r--   2 hadooper supergroup  115045564 2009-04-02 11:51 /user/hadooper/input/1.txt
    137 -rw-r--r--   2 hadooper supergroup     987864 2009-04-02 11:51 /user/hadooper/input/2.txt
    138 -rw-r--r--   2 hadooper supergroup    1573048 2009-04-02 11:51 /user/hadooper/input/3.txt
    139 -rw-r--r--   2 hadooper supergroup   25844527 2009-04-02 11:51 /user/hadooper/input/4.txt
     136-rw-r--r--   2 hXXXX supergroup  115045564 2009-04-02 11:51 /user/hXXXX/input/1.txt
     137-rw-r--r--   2 hXXXX supergroup     987864 2009-04-02 11:51 /user/hXXXX/input/2.txt
     138-rw-r--r--   2 hXXXX supergroup    1573048 2009-04-02 11:51 /user/hXXXX/input/3.txt
     139-rw-r--r--   2 hXXXX supergroup   25844527 2009-04-02 11:51 /user/hXXXX/input/4.txt
    140140}}}
    141141 * 完整的路徑則是 '''hdfs://node:port/path''' 如:[[BR]]Or you have to give a __''absolute path''__, such as '''hdfs://node:port/path'''
    142142{{{
    143 $ hadoop fs -ls hdfs://gm1.nchc.org.tw:9000/user/hadooper/input
     143$ hadoop fs -ls hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input
    144144Found 4 items
    145 -rw-r--r--   2 hadooper supergroup  115045564 2009-04-02 11:51 /user/hadooper/input/1.txt
    146 -rw-r--r--   2 hadooper supergroup     987864 2009-04-02 11:51 /user/hadooper/input/2.txt
    147 -rw-r--r--   2 hadooper supergroup    1573048 2009-04-02 11:51 /user/hadooper/input/3.txt
    148 -rw-r--r--   2 hadooper supergroup   25844527 2009-04-02 11:51 /user/hadooper/input/4.txt
     145-rw-r--r--   2 hXXXX supergroup  115045564 2009-04-02 11:51 /user/hXXXX/input/1.txt
     146-rw-r--r--   2 hXXXX supergroup     987864 2009-04-02 11:51 /user/hXXXX/input/2.txt
     147-rw-r--r--   2 hXXXX supergroup    1573048 2009-04-02 11:51 /user/hXXXX/input/3.txt
     148-rw-r--r--   2 hXXXX supergroup   25844527 2009-04-02 11:51 /user/hXXXX/input/4.txt
    149149}}}
    150150
     
    160160 * 改變文件所屬的組 [[BR]] Change '''owner group''' of given file or folder
    161161{{{
    162 $ hadoop fs -chgrp -R hadooper own
     162$ hadoop fs -chgrp -R hXXXX own
    163163}}}
    164164
     
    174174 * 改變文件的擁有者 [[BR]] Change '''owner''' of given file or folder
    175175{{{
    176 $ hadoop fs -chown -R hadooper own
     176$ hadoop fs -chown -R hXXXX own
    177177}}}
    178178
     
    195195 * 將文件從 hdfs 原本路徑複製到 hdfs 目標路徑 [[BR]] Copy given file or folder from HDFS source path to HDFS target path
    196196{{{
    197 $ hadoop fs -cp own hadooper
     197$ hadoop fs -cp own hXXXX
    198198}}}
    199199
     
    205205
    206206Found 4 items
    207 115045564   hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/1.txt
    208 987864      hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/2.txt
    209 1573048     hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/3.txt
    210 25844527    hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/4.txt
     207115045564   hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt
     208987864      hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt
     2091573048     hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt
     21025844527    hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt
    211211}}}
    212212=== -dus ===
     
    216216$ hadoop fs -dus input
    217217
    218 hdfs://gm1.nchc.org.tw:9000/user/hadooper/input 143451003
     218hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input 143451003
    219219}}}
    220220
     
    298298{{{
    299299$ hadoop fs -setrep -w 2 -R input
    300 Replication 2 set: hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/1.txt
    301 Replication 2 set: hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/2.txt
    302 Replication 2 set: hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/3.txt
    303 Replication 2 set: hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/4.txt
    304 Waiting for hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/1.txt ... done
    305 Waiting for hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/2.txt ... done
    306 Waiting for hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/3.txt ... done
    307 Waiting for hdfs://gm1.nchc.org.tw:9000/user/hadooper/input/4.txt ... done
     300Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt
     301Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt
     302Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt
     303Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt
     304Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt ... done
     305Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt ... done
     306Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt ... done
     307Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt ... done
    308308}}}
    309309
     
    337337 
    338338{{{
    339 $ hadoop fs -test -e /user/hadooper/input/5.txt
    340 $ hadoop fs -test -z /user/hadooper/input/5.txt
    341 test: File does not exist: /user/hadooper/input/5.txt
    342 $ hadoop fs -test -d /user/hadooper/input/5.txt
    343 
    344 test: File does not exist: /user/hadooper/input/5.txt
     339$ hadoop fs -test -e /user/hXXXX/input/5.txt
     340$ hadoop fs -test -z /user/hXXXX/input/5.txt
     341test: File does not exist: /user/hXXXX/input/5.txt
     342$ hadoop fs -test -d /user/hXXXX/input/5.txt
     343
     344test: File does not exist: /user/hXXXX/input/5.txt
    345345}}}
    346346