HDFS (Hadoop Distributed File System) : HDFS Architecture Components of The Architecture
HDFS (Hadoop Distributed File System) : HDFS Architecture Components of The Architecture
HDFS Architecture
Components of the Architecture :
NameNode : The master server , mainly stores the meta data and the
information about all the data nodes, etc.
Block : The file segments where user data is actually stored are called
as blocks. The default size is 64 MB.
Introduction:
We will be starting the Hadoop system and the HDFS. The commands
will start the NameNode, Secondary NameNode, DataNode, JobTracker,
TaskTracker, jps. We have already discussed about the basic arhitecture
of HDFS.
Pre Requisites:
Step 2 : To check the status of the services started, the command used
is :
$> jps
Step 4: To check the HDFS file system, use the browser and browse with
the following URL:
http://localhost:50070/dfshealth.jsp
The screen shot displays the HDFS in the browser.
1. cat command :
Example:
Exit Code:
Returns 0 on success and -1 on error.
2. chgrp command :
Change group association of files. With -R, make the change recursively
through the directory structure. The user must be the owner of files, or
else a super-user.
3. chmod command:
Change the permissions of files. With -R, make the change recursively
through the directory structure. The user must be the owner of the file,
or else a super-user.
4. chown command:
5. copyFromLocal command:
This copies file(s) from local directory to exsiting file reference at HDFS.
6. copyToLocal
7. cp
8. get
Example:
9. mkdir
Example:
Exit Code:
10. mv
11. put
Copy single src, or multiple srcs from local file system to the destination
filesystem. Also reads input from stdin and writes to destination
filesystem.
Exit Code:
12. rm
Delete files specified as args. Only deletes non empty directory and
files. Refer to rmr for recursive deletes.
Example:
13. rmr
Exit Code:
Conclusion: