HDFS distributed file system practice

1. Directory Operations

Create a user directory (hadoop user) for the hadoop user in HDFS

 

 

 

Create a directory in the user directory input

Create a name in the root directory of the directory input of HDFS

 

Delete HDFS root directory of the "input" directory

 

 

 

2. File operations

Use vim editor, create a file in the "/ home / hadoop /" directory on the local Linux file system: Name .txt

Free to enter some word in the document which, as student number

The local file system "/ home / hadoop / Name .txt" upload directory of the current user to input the next HDFS directory

 

 

Check to see what files have been successfully uploaded to the HDFS

View HDFS in this name .txt file

 

 

 

The input file from the HDFS current directory are copied to the user directory of the root directory HDFS

Delete this file from the root of HDFS

Name downloaded .txt file in HDFS to the local file system under "/ home / hadoop / download /" directory

To the local file system view downloaded files

 

 

 

 

Guess you like

Origin www.cnblogs.com/lijiajie/p/10929830.html