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:
-
Apr 19, 2011, 8:50:41 AM (14 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
75 | 75 | |
76 | 76 | {{{ |
77 | | hadooper@vPro:~$ hadoop fs |
| 77 | hXXXX@vPro:~$ hadoop fs |
78 | 78 | |
79 | 79 | Usage: java FsShell |
… |
… |
|
134 | 134 | $ hadoop fs -ls input |
135 | 135 | Found 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 |
140 | 140 | }}} |
141 | 141 | * 完整的路徑則是 '''hdfs://node:port/path''' 如:[[BR]]Or you have to give a __''absolute path''__, such as '''hdfs://node:port/path''' |
142 | 142 | {{{ |
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 |
144 | 144 | Found 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 |
149 | 149 | }}} |
150 | 150 | |
… |
… |
|
160 | 160 | * 改變文件所屬的組 [[BR]] Change '''owner group''' of given file or folder |
161 | 161 | {{{ |
162 | | $ hadoop fs -chgrp -R hadooper own |
| 162 | $ hadoop fs -chgrp -R hXXXX own |
163 | 163 | }}} |
164 | 164 | |
… |
… |
|
174 | 174 | * 改變文件的擁有者 [[BR]] Change '''owner''' of given file or folder |
175 | 175 | {{{ |
176 | | $ hadoop fs -chown -R hadooper own |
| 176 | $ hadoop fs -chown -R hXXXX own |
177 | 177 | }}} |
178 | 178 | |
… |
… |
|
195 | 195 | * 將文件從 hdfs 原本路徑複製到 hdfs 目標路徑 [[BR]] Copy given file or folder from HDFS source path to HDFS target path |
196 | 196 | {{{ |
197 | | $ hadoop fs -cp own hadooper |
| 197 | $ hadoop fs -cp own hXXXX |
198 | 198 | }}} |
199 | 199 | |
… |
… |
|
205 | 205 | |
206 | 206 | Found 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 |
| 207 | 115045564 hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt |
| 208 | 987864 hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt |
| 209 | 1573048 hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt |
| 210 | 25844527 hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt |
211 | 211 | }}} |
212 | 212 | === -dus === |
… |
… |
|
216 | 216 | $ hadoop fs -dus input |
217 | 217 | |
218 | | hdfs://gm1.nchc.org.tw:9000/user/hadooper/input 143451003 |
| 218 | hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input 143451003 |
219 | 219 | }}} |
220 | 220 | |
… |
… |
|
298 | 298 | {{{ |
299 | 299 | $ 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 |
| 300 | Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt |
| 301 | Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt |
| 302 | Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt |
| 303 | Replication 2 set: hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt |
| 304 | Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/1.txt ... done |
| 305 | Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/2.txt ... done |
| 306 | Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/3.txt ... done |
| 307 | Waiting for hdfs://hadoop.nchc.org.tw:9000/user/hXXXX/input/4.txt ... done |
308 | 308 | }}} |
309 | 309 | |
… |
… |
|
337 | 337 | |
338 | 338 | {{{ |
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 |
| 341 | test: File does not exist: /user/hXXXX/input/5.txt |
| 342 | $ hadoop fs -test -d /user/hXXXX/input/5.txt |
| 343 | |
| 344 | test: File does not exist: /user/hXXXX/input/5.txt |
345 | 345 | }}} |
346 | 346 | |