hdfsgh

 HDFS commands

-------------------------


hadoop fs or hdfs dfs


all command it wil show


hadoop fs -help ls


show all options we can use with ls


home directory in hdfs /user/sasmitsb4018/


hdfs dfs -ls -t -r /


in root list file in order by tim ein reverse order


hdfs dfs -ls -S /


sort on the basis of size


hdfs dfs -ls -S -h /


-h menas human redable ways


in hdfs we need to pefix every command with hdfs dfs -


camel case--

first word is small and from send word first letter capital


hadoop fs -copyFromLocal 


copyFromLocal or put are same


-cp to copy from hdfs to hdfs location


hdfs dfs -df -h /user/sasmitsb4081

df--disk free free space

-h human readable format


hdfs dfs -du -h /user/sasmitsb4081


-du menas disk usage.

for each folder under that how much space that has taken.


hdfs dfs /data

in coudxlab all free data sets are there


dynamically set replication factor for a file


hadoop fs -Ddfs.replication=5 -put filename /user/sasmitsb4081


D-- for dynamically change


fsck -- stands for filesystem check

---------------------------------

hdfs fsck /user/sasmitsb4081/filename -files -blocks -locations


it will give the block information with datanode information and replication factor



Comments

Popular posts from this blog

scala-4