大規模なデータHadoopHDFS運用コマンドの概要を共有するチュートリアル良いプログラマ

  大規模なデータHadoopHDFS共有するチュートリアル良いプログラマ運用コマンドの概要を

 

  1. リストのすべてのディレクトリやファイルのルートディレクトリにあります

 

  hadoopfs-LS /

 

  2. リスト/ログインするディレクトリ内のすべてのディレクトリとファイルを

 

  hadoopfs-LS /ウィンドウ

 

  3. リスト/ユーザー・ディレクトリとサブディレクトリ内のすべてのファイル注意して

 

  hadoopfs-LS-R /ユーザ

 

  4. 作成/ソフトディレクトリを

 

  hadoopfs-ます。mkdir /ソフト

 

  5. マルチレベルディレクトリを作成します。

 

  hadoopfs-ます。mkdir-P /アプリケーション/窓/ 2017/01/01

 

  6. ローカルwordcount.jarのへのアップロードファイルWORDCOUNT / ディレクトリ

 

  hadoopfs-putwordcount.jar / WORDCOUNT

 

  7. /stu/students.txtは、ローカルにファイルをコピー

 

  hadoopfs-copyToLocal / STU / students.txt

 

  8. word.txt 文書のコピー/語数/入力/ ディレクトリ

 

  hadoopfs-copyFromLocalword.txt/wordcount/input

 

  9.word.txt文件从本地移动到/wordcount/input/目录下

 

  hadoopfs-moveFromLocalword.txt/wordcount/input/

 

  10./stu/students.txt拷贝一份为/stu/students.txt.bak

 

  hadoopfs-cp/stu/students.txt/stu/students.txt.bak

 

  11./flume/tailout/目录下的子目录或文件都拷贝到/logs目录(如果此目录不存在会创建)

 

  hadoopfs-cp/flume/tailout//logs

 

  12./word.txt文件重命名为/words.txt

 

  hadoopfs-mv/word.txt/words.txt

 

  13./words.txt文件移动到/wordcount/input/目录下

 

  hadoopfs-mv/words.txt/wordcount/input/

 

  14./ws目录以及子目录和文件都删除(谨慎使用)

 

  hadoopfs-rm-r/ws

 

  15./wordcount/output2/目录下的a.txt文件删除

 

  hadoopfs-rm/wordcount/output2/a.txt

 

  16./wordcount/input/目录下面的所有文件都删除

 

  hadoopfs-rm/wordcount/input/*

 

  17.查看HDFS集群的磁盘空间使用情况

 

  hadoopfs-df-h

 

  18.查看/word.txt文件的内容

 

  hadoopfs-cat/word.txt

 

  19.name.txt文件中的内容添加到/wordcount/input/words.txt文件中

 

  hadoopfs-appendToFilename.txt/wordcount/words.txt

 

  20.动态查看/wordcount/input/words.txt文件的内容

 

  hadoopfs-tail-f/wordcount/words.txt

 

  21.统计/flume目录总大小

 

  hadoopfs-du-s-h/flume

 

  22.分别统计/flume目录下各个子目录(或文件)大小

 

  hadoopfs-du-s-h/flume/*


おすすめ

転載: blog.51cto.com/14573321/2449818