내용

글번호 724
작성자 허진경
작성일 2017-07-18 11:19:34
제목 하둡 파일시스템 관리 예
내용 [hadoop@master ~]$ hdfs dfs -ls -R /output drwxr-xr-x - hadoop supergroup 0 2017-07-17 01:18 /output/word_count -rw-r--r-- 2 hadoop supergroup 0 2017-07-17 01:18 /output/word_count/_SUCCESS -rw-r--r-- 2 hadoop supergroup 49110 2017-07-17 01:18 /output/word_count/part-r-00000 [hadoop@master ~]$ hadoop fs -lsr /output lsr: DEPRECATED: Please use 'ls -R' instead. drwxr-xr-x - hadoop supergroup 0 2017-07-17 01:18 /output/word_count -rw-r--r-- 2 hadoop supergroup 0 2017-07-17 01:18 /output/word_count/_SUCCESS -rw-r--r-- 2 hadoop supergroup 49110 2017-07-17 01:18 /output/word_count/part-r-00000 [hadoop@master ~]$ clear [hadoop@master ~]$ hdfs dfs -du / 689413344 /airline 65 /hello.txt 49110 /output 174734 /speech 253215 /tmp [hadoop@master ~]$ hdfs dfs -cat /hello.txt 1234567890qwertyuioasdfghjk 123456789qwertyuiop sdfghjk edrtyuio [hadoop@master ~]$ hdfs dfs -text /hello.txt 1234567890qwertyuioasdfghjk 123456789qwertyuiop sdfghjk edrtyuio [hadoop@master ~]$ hdfs dfs -mkdir -p /user/hadoop [hadoop@master ~]$ hdfs dfs -ls [hadoop@master ~]$ hdfs dfs -mkdir test [hadoop@master ~]$ hdfs dfs -ls /user/hadoop Found 1 items drwxr-xr-x - hadoop supergroup 0 2017-07-17 19:02 /user/hadoop/test [hadoop@master ~]$ hdfs dfs -put hello.txt test/ [hadoop@master ~]$ hdfs dfs -ls test Found 1 items -rw-r--r-- 2 hadoop supergroup 65 2017-07-17 19:03 test/hello.txt [hadoop@master ~]$ rm hello.txt [hadoop@master ~]$ cat hello.txt cat: hello.txt: No such file or directory [hadoop@master ~]$ hdfs dfs -get test/hello.txt [hadoop@master ~]$ cat hello.txt 1234567890qwertyuioasdfghjk 123456789qwertyuiop sdfghjk edrtyuio [hadoop@master ~]$