basic HDFS commands
basic HDFS commands
Password: training
Hi Hello
Hadoop 0.20.2-cdh3u2
Subversion file:///tmp/topdir/BUILD/hadoop-0.20.2-cdh3u2 -r
95a824e4005b2a94fe1c11f1ef9db4c672ba43cb
Compiled by root on Thu Oct 13 21:51:41 PDT 2011
From source with checksum 644e5db6c59d45bca96cec7f220dda51
Found 6 items
3. Report the amount of space used and available on currently mounted filesystem
4. Count the number of directories, files and bytes under the paths that match the
specified file pattern
6. Add a text file from the local directory to the new directory hadoop in HDFS
8. Delete a directory ‘datascience’ and content inside also from the /user/cloudera
10. copyFromLocal---Add a .txt file from the local directory to the Vinay directory
you created in HDFS.
[cloudera@localhost ]$ hadoop fs
copyFromLocal comedy.txt /user/cloudera/datascience
I love hadoop
Hadoop love you
12. CopyToLocal----Add the txt file from “datascience” directory which is present
in HDFS directory to the local directory
I love hadoop
Hadoop love you
22. fsck: this command is used to check the health of the files in Hadoop File
System
23. stat: stat Command is used to print the information about a file from the
directory, it prints the static information about the file. It has different format such
as
Ex: Vinay
Vinay --> Src --> Build Path --> Configure build Path
/usr/lib/hadoop-0.20/hadoop-core.jar
/usr/lib/hadoop-0.20/lib/commons-cli-1.2.jar
4. Create package:
Vinay --> Src --> New --> Package
Ex: analytics
Ex: WriteToHdfs